Commit 7e5bbec8 authored by hbristow's avatar hbristow

Removing trailing whitespace and expanded tabs

parent f57145dc
# ----- Find Matlab/Octave ----- # ----- Find Matlab/Octave -----
# #
# OpenCVFindMatlab.cmake attempts to locate the install path of Matlab in order # OpenCVFindMatlab.cmake attempts to locate the install path of Matlab in order
# to extract the mex headers, libraries and shell scripts. If found # to extract the mex headers, libraries and shell scripts. If found
# successfully, the following variables will be defined # successfully, the following variables will be defined
# #
# MATLAB_FOUND: true/false # MATLAB_FOUND: true/false
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# MATLAB_LIBRARY_DIR: Path to mex and matrix libraries # MATLAB_LIBRARY_DIR: Path to mex and matrix libraries
# MATLAB_LIBS: The Matlab libs, usually mx, mex, mat # MATLAB_LIBS: The Matlab libs, usually mx, mex, mat
# MATLAB_MEXEXT: The mex library extension. It will be one of: # MATLAB_MEXEXT: The mex library extension. It will be one of:
# mexwin32, mexwin64, mexglx, mexa64, mexmac, # mexwin32, mexwin64, mexglx, mexa64, mexmac,
# mexmaci, mexmaci64, mexsol, mexs64 # mexmaci, mexmaci64, mexsol, mexs64
# MATLAB_ARCH: The installation architecture. It is simply # MATLAB_ARCH: The installation architecture. It is simply
# the MEXEXT with the preceding "mex" removed # the MEXEXT with the preceding "mex" removed
...@@ -30,23 +30,23 @@ ...@@ -30,23 +30,23 @@
# #
# Matlab tends to use some non-standard prefixes and suffixes on its libraries. # Matlab tends to use some non-standard prefixes and suffixes on its libraries.
# For example, libmx.dll on Windows (Windows does not add prefixes) and # For example, libmx.dll on Windows (Windows does not add prefixes) and
# mkl.dylib on OS X (OS X uses "lib" prefixes). # mkl.dylib on OS X (OS X uses "lib" prefixes).
# On some versions of Windows the .dll suffix also appears to not be checked. # On some versions of Windows the .dll suffix also appears to not be checked.
# #
# This function modifies the library prefixes and suffixes used by # This function modifies the library prefixes and suffixes used by
# find_library when finding Matlab libraries. It does not affect scopes # find_library when finding Matlab libraries. It does not affect scopes
# outside of this file. # outside of this file.
function(set_libarch_prefix_suffix) function(set_libarch_prefix_suffix)
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE)
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" PARENT_SCOPE) set(CMAKE_FIND_LIBRARY_PREFIXES "lib" PARENT_SCOPE)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a" PARENT_SCOPE) set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a" PARENT_SCOPE)
elseif (APPLE) elseif (APPLE)
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" PARENT_SCOPE) set(CMAKE_FIND_LIBRARY_PREFIXES "lib" PARENT_SCOPE)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".a" PARENT_SCOPE) set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".a" PARENT_SCOPE)
elseif (WIN32) elseif (WIN32)
set(CMAKE_FIND_LIBRARY_PREFIXES "lib" PARENT_SCOPE) set(CMAKE_FIND_LIBRARY_PREFIXES "lib" PARENT_SCOPE)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll" PARENT_SCOPE) set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll" PARENT_SCOPE)
endif() endif()
endfunction() endfunction()
...@@ -56,7 +56,7 @@ endfunction() ...@@ -56,7 +56,7 @@ endfunction()
# Attempt to find the path to the Matlab installation. If successful, sets # Attempt to find the path to the Matlab installation. If successful, sets
# the absolute path in the variable MATLAB_ROOT_DIR # the absolute path in the variable MATLAB_ROOT_DIR
function(locate_matlab_root) function(locate_matlab_root)
# --- LINUX --- # --- LINUX ---
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE)
# possible root locations, in order of likelihood # possible root locations, in order of likelihood
...@@ -90,40 +90,40 @@ function(locate_matlab_root) ...@@ -90,40 +90,40 @@ function(locate_matlab_root)
# --- WINDOWS --- # --- WINDOWS ---
elseif (WIN32) elseif (WIN32)
# search the path to see if Matlab exists there # search the path to see if Matlab exists there
# Contrary to EVERY OTHER REGEX IMPLEMENTATION ON EARTH, cmake returns # Contrary to EVERY OTHER REGEX IMPLEMENTATION ON EARTH, cmake returns
# the entire input string if no matches for the capture group are found. # the entire input string if no matches for the capture group are found.
string(REGEX REPLACE ".*[;=](.*[Mm][Aa][Tt][Ll][Aa][Bb][^;]*)\\\\bin.*" "\\1" MATLAB_ROOT_DIR_ "$ENV{PATH}") string(REGEX REPLACE ".*[;=](.*[Mm][Aa][Tt][Ll][Aa][Bb][^;]*)\\\\bin.*" "\\1" MATLAB_ROOT_DIR_ "$ENV{PATH}")
if ("${MATLAB_ROOT_DIR_}" STREQUAL "$ENV{PATH}") if ("${MATLAB_ROOT_DIR_}" STREQUAL "$ENV{PATH}")
set(MATLAB_ROOT_DIR_) set(MATLAB_ROOT_DIR_)
endif() endif()
# registry-hacking # registry-hacking
# determine the available Matlab versions # determine the available Matlab versions
set(REG_EXTENSION_ "SOFTWARE\\Mathworks\\MATLAB") set(REG_EXTENSION_ "SOFTWARE\\Mathworks\\MATLAB")
set(REG_ROOTS_ "HKEY_LOCAL_MACHINE" "HKEY_CURRENT_USER") set(REG_ROOTS_ "HKEY_LOCAL_MACHINE" "HKEY_CURRENT_USER")
foreach(REG_ROOT_ ${REG_ROOTS_}) foreach(REG_ROOT_ ${REG_ROOTS_})
execute_process(COMMAND reg query "${REG_ROOT_}\\${REG_EXTENSION_}" OUTPUT_VARIABLE QUERY_RESPONSE_) execute_process(COMMAND reg query "${REG_ROOT_}\\${REG_EXTENSION_}" OUTPUT_VARIABLE QUERY_RESPONSE_)
if (QUERY_RESPONSE_) if (QUERY_RESPONSE_)
string(REGEX MATCHALL "[0-9]\\.[0-9]" VERSION_STRINGS_ ${QUERY_RESPONSE_}) string(REGEX MATCHALL "[0-9]\\.[0-9]" VERSION_STRINGS_ ${QUERY_RESPONSE_})
list(APPEND VERSIONS_ ${VERSION_STRINGS_}) list(APPEND VERSIONS_ ${VERSION_STRINGS_})
endif() endif()
endforeach() endforeach()
# select the highest version # select the highest version
list(APPEND VERSIONS_ "0.0") list(APPEND VERSIONS_ "0.0")
list(SORT VERSIONS_) list(SORT VERSIONS_)
list(REVERSE VERSIONS_) list(REVERSE VERSIONS_)
list(GET VERSIONS_ 0 VERSION_) list(GET VERSIONS_ 0 VERSION_)
# request the MATLABROOT from the registry # request the MATLABROOT from the registry
foreach(REG_ROOT_ ${REG_ROOTS_}) foreach(REG_ROOT_ ${REG_ROOTS_})
get_filename_component(QUERY_RESPONSE_ [${REG_ROOT_}\\${REG_EXTENSION_}\\${VERSION_};MATLABROOT] ABSOLUTE) get_filename_component(QUERY_RESPONSE_ [${REG_ROOT_}\\${REG_EXTENSION_}\\${VERSION_};MATLABROOT] ABSOLUTE)
if ("${MATLAB_ROOT_DIR_}" STREQUAL "" AND NOT ${QUERY_RESPONSE_} MATCHES "registry$") if ("${MATLAB_ROOT_DIR_}" STREQUAL "" AND NOT ${QUERY_RESPONSE_} MATCHES "registry$")
set(MATLAB_ROOT_DIR_ ${QUERY_RESPONSE_}) set(MATLAB_ROOT_DIR_ ${QUERY_RESPONSE_})
endif() endif()
endforeach() endforeach()
endif() endif()
# export the root into the parent scope # export the root into the parent scope
if (MATLAB_ROOT_DIR_) if (MATLAB_ROOT_DIR_)
...@@ -149,28 +149,28 @@ function(locate_matlab_components MATLAB_ROOT_DIR) ...@@ -149,28 +149,28 @@ function(locate_matlab_components MATLAB_ROOT_DIR)
return() return()
endif() endif()
string(STRIP ${MATLAB_MEXEXT_} MATLAB_MEXEXT_) string(STRIP ${MATLAB_MEXEXT_} MATLAB_MEXEXT_)
# map the mexext to an architecture extension # map the mexext to an architecture extension
set(ARCHITECTURES_ "maci64" "maci" "glnxa64" "glnx64" "sol64" "sola64" "win32" "win64" ) set(ARCHITECTURES_ "maci64" "maci" "glnxa64" "glnx64" "sol64" "sola64" "win32" "win64" )
foreach(ARCHITECTURE_ ${ARCHITECTURES_}) foreach(ARCHITECTURE_ ${ARCHITECTURES_})
if(EXISTS ${MATLAB_ROOT_DIR}/bin/${ARCHITECTURE_}) if(EXISTS ${MATLAB_ROOT_DIR}/bin/${ARCHITECTURE_})
set(MATLAB_ARCH_ ${ARCHITECTURE_}) set(MATLAB_ARCH_ ${ARCHITECTURE_})
break() break()
endif() endif()
endforeach() endforeach()
# get the path to the libraries # get the path to the libraries
set(MATLAB_LIBRARY_DIR_ ${MATLAB_ROOT_DIR}/bin/${MATLAB_ARCH_}) set(MATLAB_LIBRARY_DIR_ ${MATLAB_ROOT_DIR}/bin/${MATLAB_ARCH_})
# get the libraries # get the libraries
set_libarch_prefix_suffix() set_libarch_prefix_suffix()
find_library(MATLAB_LIB_MX_ mx PATHS ${MATLAB_LIBRARY_DIR_} NO_DEFAULT_PATH) find_library(MATLAB_LIB_MX_ mx PATHS ${MATLAB_LIBRARY_DIR_} NO_DEFAULT_PATH)
find_library(MATLAB_LIB_MEX_ mex PATHS ${MATLAB_LIBRARY_DIR_} NO_DEFAULT_PATH) find_library(MATLAB_LIB_MEX_ mex PATHS ${MATLAB_LIBRARY_DIR_} NO_DEFAULT_PATH)
find_library(MATLAB_LIB_MAT_ mat PATHS ${MATLAB_LIBRARY_DIR_} NO_DEFAULT_PATH) find_library(MATLAB_LIB_MAT_ mat PATHS ${MATLAB_LIBRARY_DIR_} NO_DEFAULT_PATH)
set(MATLAB_LIBS_ ${MATLAB_LIB_MX_} ${MATLAB_LIB_MEX_} ${MATLAB_LIB_MAT_}) set(MATLAB_LIBS_ ${MATLAB_LIB_MX_} ${MATLAB_LIB_MEX_} ${MATLAB_LIB_MAT_})
# get the include path # get the include path
find_path(MATLAB_INCLUDE_DIR_ mex.h ${MATLAB_ROOT_DIR}/extern/include) find_path(MATLAB_INCLUDE_DIR_ mex.h ${MATLAB_ROOT_DIR}/extern/include)
# get the mex shell script # get the mex shell script
find_file(MATLAB_MEX_SCRIPT_ NAMES mex mex.bat PATHS ${MATLAB_ROOT_DIR}/bin NO_DEFAULT_PATH) find_file(MATLAB_MEX_SCRIPT_ NAMES mex mex.bat PATHS ${MATLAB_ROOT_DIR}/bin NO_DEFAULT_PATH)
...@@ -197,7 +197,7 @@ endfunction() ...@@ -197,7 +197,7 @@ endfunction()
# FIND MATLAB COMPONENTS # FIND MATLAB COMPONENTS
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
if (NOT MATLAB_FOUND) if (NOT MATLAB_FOUND)
# guilty until proven innocent # guilty until proven innocent
set(MATLAB_FOUND FALSE) set(MATLAB_FOUND FALSE)
...@@ -206,11 +206,11 @@ if (NOT MATLAB_FOUND) ...@@ -206,11 +206,11 @@ if (NOT MATLAB_FOUND)
locate_matlab_root() locate_matlab_root()
endif() endif()
# given the matlab root folder, find the library locations # given the matlab root folder, find the library locations
if (MATLAB_ROOT_DIR) if (MATLAB_ROOT_DIR)
locate_matlab_components(${MATLAB_ROOT_DIR}) locate_matlab_components(${MATLAB_ROOT_DIR})
endif() endif()
find_package_handle_standard_args(Matlab DEFAULT_MSG MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIR find_package_handle_standard_args(Matlab DEFAULT_MSG MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIR
MATLAB_ROOT_DIR MATLAB_LIBS MATLAB_LIBRARY_DIR MATLAB_ROOT_DIR MATLAB_LIBS MATLAB_LIBRARY_DIR
MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
endif() endif()
...@@ -56,7 +56,7 @@ elseif (NOT PYTHONLIBS_FOUND) ...@@ -56,7 +56,7 @@ elseif (NOT PYTHONLIBS_FOUND)
ocv_module_disable(matlab) ocv_module_disable(matlab)
return() return()
endif() endif()
# If the user built OpenCV as X-bit, but they have a Y-bit version of Matlab, # If the user built OpenCV as X-bit, but they have a Y-bit version of Matlab,
# attempting to link to OpenCV during binding generation will fail, since # attempting to link to OpenCV during binding generation will fail, since
...@@ -89,7 +89,7 @@ ocv_add_module(matlab BINDINGS ...@@ -89,7 +89,7 @@ ocv_add_module(matlab BINDINGS
opencv_objdetect opencv_flann opencv_features2d opencv_objdetect opencv_flann opencv_features2d
opencv_photo opencv_video opencv_videostab opencv_photo opencv_video opencv_videostab
opencv_calib opencv_calib3d opencv_calib opencv_calib3d
opencv_stitching opencv_superres opencv_stitching opencv_superres
opencv_nonfree opencv_nonfree
) )
...@@ -147,14 +147,14 @@ if (NOT MEX_WORKS) ...@@ -147,14 +147,14 @@ if (NOT MEX_WORKS)
# attempt to generate a gateway for a function # attempt to generate a gateway for a function
message(STATUS "Trying to generate Matlab code") message(STATUS "Trying to generate Matlab code")
execute_process( execute_process(
COMMAND ${PYTHON_EXECUTABLE} COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/generator/gen_matlab.py ${CMAKE_CURRENT_SOURCE_DIR}/generator/gen_matlab.py
--hdrparser ${HDR_PARSER_PATH} --hdrparser ${HDR_PARSER_PATH}
--rstparser ${RST_PARSER_PATH} --rstparser ${RST_PARSER_PATH}
--extra "test=${CMAKE_CURRENT_SOURCE_DIR}/test/test_generator.hpp" --extra "test=${CMAKE_CURRENT_SOURCE_DIR}/test/test_generator.hpp"
--outdir ${CMAKE_BINARY_DIR}/junk --outdir ${CMAKE_BINARY_DIR}/junk
ERROR_VARIABLE GEN_ERROR ERROR_VARIABLE GEN_ERROR
OUTPUT_QUIET OUTPUT_QUIET
) )
if (GEN_ERROR) if (GEN_ERROR)
...@@ -207,23 +207,23 @@ file(REMOVE ${GENERATE_PROXY} ${COMPILE_PROXY}) ...@@ -207,23 +207,23 @@ file(REMOVE ${GENERATE_PROXY} ${COMPILE_PROXY})
# call the python executable to generate the Matlab gateways # call the python executable to generate the Matlab gateways
add_custom_command( add_custom_command(
OUTPUT ${GENERATE_PROXY} OUTPUT ${GENERATE_PROXY}
COMMAND ${PYTHON_EXECUTABLE} COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/generator/gen_matlab.py ${CMAKE_CURRENT_SOURCE_DIR}/generator/gen_matlab.py
--hdrparser ${HDR_PARSER_PATH} --hdrparser ${HDR_PARSER_PATH}
--rstparser ${RST_PARSER_PATH} --rstparser ${RST_PARSER_PATH}
--moduleroot ${CMAKE_SOURCE_DIR}/modules --moduleroot ${CMAKE_SOURCE_DIR}/modules
--modules ${opencv_modules} --modules ${opencv_modules}
--extra ${opencv_extra_hdrs} --extra ${opencv_extra_hdrs}
--outdir ${CMAKE_CURRENT_BINARY_DIR} --outdir ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${PYTHON_EXECUTABLE} COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/generator/build_info.py ${CMAKE_CURRENT_SOURCE_DIR}/generator/build_info.py
--os ${CMAKE_SYSTEM} --os ${CMAKE_SYSTEM}
--arch ${ARCH} ${CMAKE_SYSTEM_PROCESSOR} --arch ${ARCH} ${CMAKE_SYSTEM_PROCESSOR}
--compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} --compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}
--mex_arch ${MATLAB_ARCH} --mex_arch ${MATLAB_ARCH}
--mex_script ${MATLAB_MEX_SCRIPT} --mex_script ${MATLAB_MEX_SCRIPT}
--cxx_flags ${MEX_CXXFLAGS} --cxx_flags ${MEX_CXXFLAGS}
--opencv_version ${OPENCV_VERSION} --opencv_version ${OPENCV_VERSION}
--commit ${GIT_COMMIT} --commit ${GIT_COMMIT}
--modules ${opencv_modules} --modules ${opencv_modules}
--configuration "$(Configuration)" ${CMAKE_BUILD_TYPE} --configuration "$(Configuration)" ${CMAKE_BUILD_TYPE}
......
...@@ -39,4 +39,4 @@ ...@@ -39,4 +39,4 @@
// arising in any way out of the use of this software, even if advised of the // arising in any way out of the use of this software, even if advised of the
// possibility of such damage. // possibility of such damage.
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
\ No newline at end of file
This diff is collapsed.
...@@ -34,7 +34,7 @@ foreach(SOURCE_FILE ${SOURCE_FILES}) ...@@ -34,7 +34,7 @@ foreach(SOURCE_FILE ${SOURCE_FILES})
# compile the source file using mex # compile the source file using mex
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/+cv/${FILENAME}.${MATLAB_MEXEXT}) if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/+cv/${FILENAME}.${MATLAB_MEXEXT})
execute_process( execute_process(
COMMAND ${MATLAB_MEX_SCRIPT} ${MEX_OPTS} "CXXFLAGS=\$CXXFLAGS ${MEX_CXXFLAGS}" ${MEX_INCLUDE_DIRS_LIST} COMMAND ${MATLAB_MEX_SCRIPT} ${MEX_OPTS} "CXXFLAGS=\$CXXFLAGS ${MEX_CXXFLAGS}" ${MEX_INCLUDE_DIRS_LIST}
${MEX_LIB_DIR} ${MEX_LIBS_LIST} ${SOURCE_FILE} ${MEX_LIB_DIR} ${MEX_LIBS_LIST} ${SOURCE_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv
OUTPUT_QUIET OUTPUT_QUIET
...@@ -42,7 +42,7 @@ foreach(SOURCE_FILE ${SOURCE_FILES}) ...@@ -42,7 +42,7 @@ foreach(SOURCE_FILE ${SOURCE_FILES})
) )
endif() endif()
# TODO: If a mex file fails to compile, should we error out? # TODO: If a mex file fails to compile, should we error out?
# TODO: Warnings are currently treated as errors... # TODO: Warnings are currently treated as errors...
if (FAILED) if (FAILED)
message(FATAL_ERROR "Failed to compile ${FILENAME}: ${FAILED}") message(FATAL_ERROR "Failed to compile ${FILENAME}: ${FAILED}")
endif() endif()
......
...@@ -44,9 +44,9 @@ if __name__ == "__main__": ...@@ -44,9 +44,9 @@ if __name__ == "__main__":
given the information passed to this module. build_info.py invokes Jinja2 given the information passed to this module. build_info.py invokes Jinja2
on the template_build_info.m template. on the template_build_info.m template.
""" """
# parse the input options # parse the input options
import sys, re, os, time import sys, re, os, time
from argparse import ArgumentParser from argparse import ArgumentParser
parser = ArgumentParser() parser = ArgumentParser()
parser.add_argument('--os') parser.add_argument('--os')
......
...@@ -38,7 +38,7 @@ if __name__ == "__main__": ...@@ -38,7 +38,7 @@ if __name__ == "__main__":
same as the builtin mex compiler, with added cv qualification: same as the builtin mex compiler, with added cv qualification:
>> cv.mex(..., ...); >> cv.mex(..., ...);
""" """
# parse the input options # parse the input options
import sys, re, os, time import sys, re, os, time
from argparse import ArgumentParser from argparse import ArgumentParser
......
...@@ -65,7 +65,7 @@ def binaryToDecimal(string): ...@@ -65,7 +65,7 @@ def binaryToDecimal(string):
def formatMatlabConstant(string, table): def formatMatlabConstant(string, table):
''' '''
Given a string representing a Constant, and a table of all Constants, Given a string representing a Constant, and a table of all Constants,
attempt to resolve the Constant into a valid Matlab expression attempt to resolve the Constant into a valid Matlab expression
For example, the input For example, the input
DEPENDENT_VALUE = 1 << FIXED_VALUE DEPENDENT_VALUE = 1 << FIXED_VALUE
...@@ -75,7 +75,7 @@ def formatMatlabConstant(string, table): ...@@ -75,7 +75,7 @@ def formatMatlabConstant(string, table):
# split the string into expressions # split the string into expressions
words = re.split('(\W+)', string) words = re.split('(\W+)', string)
# add a 'cv' prefix if an expression is also a key in the lookup table # add a 'cv' prefix if an expression is also a key in the lookup table
words = ''.join([('cv.'+word if word in table else word) for word in words]) words = ''.join([('cv.'+word if word in table else word) for word in words])
# attempt to convert arithmetic expressions and binary/hex to decimal # attempt to convert arithmetic expressions and binary/hex to decimal
words = binaryToDecimal(words) words = binaryToDecimal(words)
# convert any remaining bitshifts to Matlab 'bitshift' methods # convert any remaining bitshifts to Matlab 'bitshift' methods
...@@ -155,11 +155,11 @@ def stripExtraSpaces(text): ...@@ -155,11 +155,11 @@ def stripExtraSpaces(text):
'''Removes superfluous whitespace from a string, including the removal '''Removes superfluous whitespace from a string, including the removal
of all leading and trailing whitespace''' of all leading and trailing whitespace'''
return ' '.join(text.split()) return ' '.join(text.split())
def comment(text, wrap=80, escape='% ', escape_first='', escape_last=''): def comment(text, wrap=80, escape='% ', escape_first='', escape_last=''):
'''comment filter '''comment filter
Takes a string in text, and wraps it to wrap characters in length with Takes a string in text, and wraps it to wrap characters in length with
preceding comment escape sequence on each line. escape_first and preceding comment escape sequence on each line. escape_first and
escape_last can be used for languages which define block comments. escape_last can be used for languages which define block comments.
Examples: Examples:
C++ inline comment comment(80, '// ') C++ inline comment comment(80, '// ')
......
...@@ -75,7 +75,7 @@ class MatlabWrapperGenerator(object): ...@@ -75,7 +75,7 @@ class MatlabWrapperGenerator(object):
jtemplate.filters['qualify'] = qualify jtemplate.filters['qualify'] = qualify
jtemplate.filters['slugify'] = slugify jtemplate.filters['slugify'] = slugify
jtemplate.filters['only'] = only jtemplate.filters['only'] = only
jtemplate.filters['void'] = void jtemplate.filters['void'] = void
jtemplate.filters['not'] = flip jtemplate.filters['not'] = flip
# load the templates # load the templates
...@@ -87,7 +87,7 @@ class MatlabWrapperGenerator(object): ...@@ -87,7 +87,7 @@ class MatlabWrapperGenerator(object):
# create the build directory # create the build directory
output_source_dir = output_dir+'/src' output_source_dir = output_dir+'/src'
output_private_dir = output_source_dir+'/private' output_private_dir = output_source_dir+'/private'
output_class_dir = output_dir+'/+cv' output_class_dir = output_dir+'/+cv'
output_map_dir = output_dir+'/map' output_map_dir = output_dir+'/map'
if not os.path.isdir(output_source_dir): if not os.path.isdir(output_source_dir):
...@@ -142,7 +142,7 @@ if __name__ == "__main__": ...@@ -142,7 +142,7 @@ if __name__ == "__main__":
1. constructs the headers to parse from the module root and list of modules 1. constructs the headers to parse from the module root and list of modules
2. parses the headers using CppHeaderParser 2. parses the headers using CppHeaderParser
3. refactors the definitions using ParseTree 3. refactors the definitions using ParseTree
4. parses .rst docs using RstParser 4. parses .rst docs using RstParser
5. populates the templates for classes, function, enums and docs from the 5. populates the templates for classes, function, enums and docs from the
definitions definitions
...@@ -156,14 +156,14 @@ if __name__ == "__main__": ...@@ -156,14 +156,14 @@ if __name__ == "__main__":
to produce bindings for. The path to the include directories to produce bindings for. The path to the include directories
as well as the namespaces are constructed from the modules as well as the namespaces are constructed from the modules
and the moduleroot and the moduleroot
--extra extra headers explicitly defined to parse. This must be in --extra extra headers explicitly defined to parse. This must be in
the format "namepsace=/path/to/extra/header.hpp". For example, the format "namepsace=/path/to/extra/header.hpp". For example,
the core module requires the extra header: the core module requires the extra header:
"core=/opencv/modules/core/include/opencv2/core/core/base.hpp" "core=/opencv/modules/core/include/opencv2/core/core/base.hpp"
--outdir the output directory to put the generated matlab sources. In --outdir the output directory to put the generated matlab sources. In
the OpenCV build this is "${CMAKE_CURRENT_BUILD_DIR}/src" the OpenCV build this is "${CMAKE_CURRENT_BUILD_DIR}/src"
""" """
# parse the input options # parse the input options
import sys, re, os, time import sys, re, os, time
from argparse import ArgumentParser from argparse import ArgumentParser
...@@ -172,7 +172,7 @@ if __name__ == "__main__": ...@@ -172,7 +172,7 @@ if __name__ == "__main__":
parser.add_argument('--rstparser') parser.add_argument('--rstparser')
parser.add_argument('--moduleroot', default='', required=False) parser.add_argument('--moduleroot', default='', required=False)
parser.add_argument('--modules', nargs='*', default=[], required=False) parser.add_argument('--modules', nargs='*', default=[], required=False)
parser.add_argument('--extra', nargs='*', default=[], required=False) parser.add_argument('--extra', nargs='*', default=[], required=False)
parser.add_argument('--outdir') parser.add_argument('--outdir')
args = parser.parse_args() args = parser.parse_args()
......
...@@ -41,7 +41,7 @@ class Markup(text_type): ...@@ -41,7 +41,7 @@ class Markup(text_type):
>>> class Foo(object): >>> class Foo(object):
... def __html__(self): ... def __html__(self):
... return '<a href="#">foo</a>' ... return '<a href="#">foo</a>'
... ...
>>> Markup(Foo()) >>> Markup(Foo())
Markup(u'<a href="#">foo</a>') Markup(u'<a href="#">foo</a>')
......
...@@ -14,7 +14,7 @@ from jinja2.lexer import describe_token, describe_token_expr ...@@ -14,7 +14,7 @@ from jinja2.lexer import describe_token, describe_token_expr
from jinja2._compat import imap from jinja2._compat import imap
#: statements that callinto #: statements that callinto
_statement_keywords = frozenset(['for', 'if', 'block', 'extends', 'print', _statement_keywords = frozenset(['for', 'if', 'block', 'extends', 'print',
'macro', 'include', 'from', 'import', 'macro', 'include', 'from', 'import',
'set']) 'set'])
......
...@@ -4,7 +4,7 @@ from filters import * ...@@ -4,7 +4,7 @@ from filters import *
class ParseTree(object): class ParseTree(object):
""" """
The ParseTree class produces a semantic tree of C++ definitions given The ParseTree class produces a semantic tree of C++ definitions given
the output of the CppHeaderParser (from opencv/modules/python/src2/hdr_parser.py) the output of the CppHeaderParser (from opencv/modules/python/src2/hdr_parser.py)
The full hierarchy is as follows: The full hierarchy is as follows:
...@@ -83,7 +83,7 @@ class ParseTree(object): ...@@ -83,7 +83,7 @@ class ParseTree(object):
methods = [] methods = []
constants = [] constants = []
for defn in definitions: for defn in definitions:
obj = babel.translate(defn) obj = babel.translate(defn)
if obj is None: if obj is None:
continue continue
if type(obj) is Class or obj.clss: if type(obj) is Class or obj.clss:
...@@ -116,7 +116,7 @@ class ParseTree(object): ...@@ -116,7 +116,7 @@ class ParseTree(object):
class Translator(object): class Translator(object):
""" """
The Translator class does the heavy lifting of translating the nested The Translator class does the heavy lifting of translating the nested
list representation of the hdr_parser into individual definitions that list representation of the hdr_parser into individual definitions that
are inserted into the ParseTree. are inserted into the ParseTree.
Translator consists of a top-level method: translate() Translator consists of a top-level method: translate()
...@@ -126,7 +126,7 @@ class Translator(object): ...@@ -126,7 +126,7 @@ class Translator(object):
""" """
def translate(self, defn): def translate(self, defn):
# --- class --- # --- class ---
# classes have 'class' prefixed on their name # classes have 'class' prefixed on their name
if 'class' in defn[0].split(' ') or 'struct' in defn[0].split(' '): if 'class' in defn[0].split(' ') or 'struct' in defn[0].split(' '):
return self.translateClass(defn) return self.translateClass(defn)
# --- operators! --- # --- operators! ---
...@@ -151,16 +151,16 @@ class Translator(object): ...@@ -151,16 +151,16 @@ class Translator(object):
name = self.translateName(defn[0]) name = self.translateName(defn[0])
clss = self.translateClassName(defn[0]) clss = self.translateClassName(defn[0])
rtp = defn[1] rtp = defn[1]
static = True if 'S' in ''.join(defn[2]) else False static = True if 'S' in ''.join(defn[2]) else False
args = defn[3] args = defn[3]
req = [] req = []
opt = [] opt = []
for arg in args: for arg in args:
if arg: if arg:
a = self.translateArgument(arg) a = self.translateArgument(arg)
opt.append(a) if a.default else req.append(a) opt.append(a) if a.default else req.append(a)
return Method(name, clss, static, '', rtp, False, req, opt) return Method(name, clss, static, '', rtp, False, req, opt)
def translateConstant(self, defn): def translateConstant(self, defn):
const = True if 'const' in defn[0] else False const = True if 'const' in defn[0] else False
name = self.translateName(defn[0]) name = self.translateName(defn[0])
...@@ -199,7 +199,7 @@ class Namespace(object): ...@@ -199,7 +199,7 @@ class Namespace(object):
|- Constants |- Constants
|- Methods |- Methods
|- Constants |- Constants
""" """
def __init__(self, name='', constants=None, classes=None, methods=None): def __init__(self, name='', constants=None, classes=None, methods=None):
self.name = name self.name = name
self.constants = constants if constants else [] self.constants = constants if constants else []
...@@ -254,7 +254,7 @@ class Method(object): ...@@ -254,7 +254,7 @@ class Method(object):
self.static = static self.static = static
self.const = const self.const = const
self.namespace = namespace self.namespace = namespace
self.rtp = rtp self.rtp = rtp
self.req = req if req else [] self.req = req if req else []
self.opt = opt if opt else [] self.opt = opt if opt else []
......
/* /*
* compose * compose
* compose a function call * compose a function call
* This macro takes as input a Method object and composes * This macro takes as input a Method object and composes
...@@ -11,23 +11,23 @@ ...@@ -11,23 +11,23 @@
{%- if fun.clss and not fun.constructor -%}inst.{%- else -%} cv:: {%- endif -%} {%- if fun.clss and not fun.constructor -%}inst.{%- else -%} cv:: {%- endif -%}
{{fun.name}}( {{fun.name}}(
{#- ----------- Required ------------- -#} {#- ----------- Required ------------- -#}
{%- for arg in fun.req -%} {%- for arg in fun.req -%}
{%- if arg.ref == '*' -%}&{%- endif -%} {%- if arg.ref == '*' -%}&{%- endif -%}
{{arg.name}} {{arg.name}}
{%- if not loop.last %}, {% endif %} {%- if not loop.last %}, {% endif %}
{% endfor %} {% endfor %}
{#- ----------- Optional ------------- -#} {#- ----------- Optional ------------- -#}
{% if fun.req and fun.opt %}, {% endif %} {% if fun.req and fun.opt %}, {% endif %}
{%- for opt in fun.opt -%} {%- for opt in fun.opt -%}
{%- if opt.ref == '*' -%}&{%- endif -%} {%- if opt.ref == '*' -%}&{%- endif -%}
{{opt.name}} {{opt.name}}
{%- if not loop.last -%}, {% endif %} {%- if not loop.last -%}, {% endif %}
{%- endfor -%} {%- endfor -%}
); );
{%- endmacro %} {%- endmacro %}
/* /*
* composeMatlab * composeMatlab
* compose a Matlab function call * compose a Matlab function call
* This macro takes as input a Method object and composes * This macro takes as input a Method object and composes
......
...@@ -3,7 +3,7 @@ function buildInformation() ...@@ -3,7 +3,7 @@ function buildInformation()
% %
% Call CV.BUILDINFORMATION() to get a printout of diagonstic information % Call CV.BUILDINFORMATION() to get a printout of diagonstic information
% pertaining to your particular build of the OpenCV Toolbox. If you ever % pertaining to your particular build of the OpenCV Toolbox. If you ever
% run into issues with the Toolbox, it is useful to submit this % run into issues with the Toolbox, it is useful to submit this
% information alongside a bug report to the OpenCV team. % information alongside a bug report to the OpenCV team.
% %
% Copyright {{ time.strftime("%Y", time.localtime()) }} The OpenCV Foundation % Copyright {{ time.strftime("%Y", time.localtime()) }} The OpenCV Foundation
...@@ -23,7 +23,7 @@ info = { ...@@ -23,7 +23,7 @@ info = {
[' Version: ' version()] [' Version: ' version()]
[' Mex extension: ' mexext()] [' Mex extension: ' mexext()]
' Architecture: {{ build.mex_arch }}' ' Architecture: {{ build.mex_arch }}'
' Mex path: {{ build.mex_script }}' ' Mex path: {{ build.mex_script }}'
' Mex flags: {{ build.mex_opts | csv(' ') }}' ' Mex flags: {{ build.mex_opts | csv(' ') }}'
' CXX flags: {{ build.cxx_flags | csv(' ') | stripExtraSpaces | wordwrap(60, True, '\'\n\' ') }}' ' CXX flags: {{ build.cxx_flags | csv(' ') | stripExtraSpaces | wordwrap(60, True, '\'\n\' ') }}'
'' ''
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* file: {{clss.name}}Bridge.cpp * file: {{clss.name}}Bridge.cpp
* author: A trusty code generator * author: A trusty code generator
* date: {{time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime())}} * date: {{time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime())}}
* *
* This file was autogenerated, do not modify. * This file was autogenerated, do not modify.
* See LICENSE for full modification and redistribution details. * See LICENSE for full modification and redistribution details.
* Copyright {{time.strftime("%Y", time.localtime())}} The OpenCV Foundation * Copyright {{time.strftime("%Y", time.localtime())}} The OpenCV Foundation
...@@ -56,7 +56,7 @@ static const Map<std::string, MethodSignature> methods = createMethodMap(); ...@@ -56,7 +56,7 @@ static const Map<std::string, MethodSignature> methods = createMethodMap();
// map of created {{clss.name}} instances. Don't trust the user to keep them safe... // map of created {{clss.name}} instances. Don't trust the user to keep them safe...
static Map<void *, {{clss.name}}> instances; static Map<void *, {{clss.name}}> instances;
/* /*
* {{ clss.name }} * {{ clss.name }}
* Gateway routine * Gateway routine
* nlhs - number of return arguments * nlhs - number of return arguments
......
...@@ -8,7 +8,7 @@ classdef {{clss.name}} < handle ...@@ -8,7 +8,7 @@ classdef {{clss.name}} < handle
properties (SetAccess = private, Hidden = true) properties (SetAccess = private, Hidden = true)
ptr_ = 0; % handle to the underlying c++ clss instance ptr_ = 0; % handle to the underlying c++ clss instance
end end
methods methods
% constructor % constructor
function this = {{clss.name}}(varargin) function this = {{clss.name}}(varargin)
......
...@@ -5,16 +5,16 @@ function mex(varargin) ...@@ -5,16 +5,16 @@ function mex(varargin)
% CV.MEX [options ...] file [file file ...] % CV.MEX [options ...] file [file file ...]
% %
% Description: % Description:
% CV.MEX compiles one or more C/C++ source files into a shared-library % CV.MEX compiles one or more C/C++ source files into a shared-library
% called a mex-file. This function is equivalent to the builtin MEX % called a mex-file. This function is equivalent to the builtin MEX
% routine, with the notable exception that it automatically resolves % routine, with the notable exception that it automatically resolves
% OpenCV includes, and links in the OpenCV libraries where appropriate. % OpenCV includes, and links in the OpenCV libraries where appropriate.
% It also forwards the flags used to build OpenCV, so architecture- % It also forwards the flags used to build OpenCV, so architecture-
% specific optimizations can be used. % specific optimizations can be used.
% %
% CV.MEX is designed to be used in situations where the source(s) you % CV.MEX is designed to be used in situations where the source(s) you
% are compiling contain OpenCV definitions. In such cases, it streamlines % are compiling contain OpenCV definitions. In such cases, it streamlines
% the finding and including of appropriate OpenCV libraries. % the finding and including of appropriate OpenCV libraries.
% %
% See also: mex % See also: mex
% %
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* file: {{fun.name}}.cpp * file: {{fun.name}}.cpp
* author: A trusty code generator * author: A trusty code generator
* date: {{time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime())}} * date: {{time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime())}}
* *
* This file was autogenerated, do not modify. * This file was autogenerated, do not modify.
* See LICENSE for full modification and redistribution details. * See LICENSE for full modification and redistribution details.
* Copyright {{time.strftime("%Y", time.localtime())}} The OpenCV Foundation * Copyright {{time.strftime("%Y", time.localtime())}} The OpenCV Foundation
...@@ -18,7 +18,7 @@ using namespace cv; ...@@ -18,7 +18,7 @@ using namespace cv;
using namespace matlab; using namespace matlab;
using namespace bridge; using namespace bridge;
/* /*
* {{ fun.name }} * {{ fun.name }}
* {{ fun }} * {{ fun }}
* Gateway routine * Gateway routine
...@@ -58,4 +58,3 @@ void mexFunction(int nlhs, mxArray*{% if fun|noutputs %} plhs[]{% else %}*{% end ...@@ -58,4 +58,3 @@ void mexFunction(int nlhs, mxArray*{% if fun|noutputs %} plhs[]{% else %}*{% end
} }
{% endif %} {% endif %}
} }
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
% ------------------------------------------------------------------------ % ------------------------------------------------------------------------
% %
% The OpenCV Toolbox allows you to make calls to native OpenCV methods % The OpenCV Toolbox allows you to make calls to native OpenCV methods
% and classes directly from within Matlab. % and classes directly from within Matlab.
% %
% <strong>PATHS</strong> % <strong>PATHS</strong>
% To call OpenCV methods from anywhere in your workspace, add the % To call OpenCV methods from anywhere in your workspace, add the
% directory containing this file to the path: % directory containing this file to the path:
% %
% addpath(fileparts(which('cv'))); % addpath(fileparts(which('cv')));
% %
...@@ -37,18 +37,18 @@ ...@@ -37,18 +37,18 @@
% %
% <strong>HELP</strong> % <strong>HELP</strong>
% Each method has its own help file containing information about the % Each method has its own help file containing information about the
% arguments, return values, and what operation the method performs. % arguments, return values, and what operation the method performs.
% You can access this help information by typing: % You can access this help information by typing:
% %
% help cv.methodName % help cv.methodName
% %
% The full list of methods can be found by inspecting the +cv/ % The full list of methods can be found by inspecting the +cv/
% directory. Note that the methods available to you will depend % directory. Note that the methods available to you will depend
% on which modules you configured OpenCV to build. % on which modules you configured OpenCV to build.
% %
% <strong>DIAGNOSTICS</strong> % <strong>DIAGNOSTICS</strong>
% If you are having problems with the OpenCV Toolbox and need to send a % If you are having problems with the OpenCV Toolbox and need to send a
% bug report to the OpenCV team, you can get a printout of diagnostic % bug report to the OpenCV team, you can get a printout of diagnostic
% information to submit along with your report by typing: % information to submit along with your report by typing:
% %
% <a href="matlab: cv.buildInformation()">cv.buildInformation();</a> % <a href="matlab: cv.buildInformation()">cv.buildInformation();</a>
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
namespace cv { namespace cv {
namespace bridge { namespace bridge {
/* /*
* Custom typedefs * Custom typedefs
* Parsed names from the hdr_parser * Parsed names from the hdr_parser
*/ */
...@@ -92,7 +92,7 @@ void deepCopyAndTranspose(const matlab::MxArray& src, cv::Mat& dst); ...@@ -92,7 +92,7 @@ void deepCopyAndTranspose(const matlab::MxArray& src, cv::Mat& dst);
// BRIDGE // BRIDGE
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
/*! /*!
* @class Bridge * @class Bridge
* @brief Type conversion class for converting OpenCV and native C++ types * @brief Type conversion class for converting OpenCV and native C++ types
* *
...@@ -108,7 +108,7 @@ void deepCopyAndTranspose(const matlab::MxArray& src, cv::Mat& dst); ...@@ -108,7 +108,7 @@ void deepCopyAndTranspose(const matlab::MxArray& src, cv::Mat& dst);
* ObjectType toObjectType(); * ObjectType toObjectType();
* *
* The bridging class provides common conversions between OpenCV types, * The bridging class provides common conversions between OpenCV types,
* std and stl types to Matlab's mxArray format. By inheriting Bridge, * std and stl types to Matlab's mxArray format. By inheriting Bridge,
* you can add your own custom type conversions. * you can add your own custom type conversions.
* *
* Because Matlab uses a homogeneous storage type, all operations are provided * Because Matlab uses a homogeneous storage type, all operations are provided
...@@ -123,7 +123,7 @@ void deepCopyAndTranspose(const matlab::MxArray& src, cv::Mat& dst); ...@@ -123,7 +123,7 @@ void deepCopyAndTranspose(const matlab::MxArray& src, cv::Mat& dst);
* myObject --> MyObject * myObject --> MyObject
* this is because the binding generator standardises the calling syntax. * this is because the binding generator standardises the calling syntax.
* *
* Bridge attempts to make as few assumptions as possible, however in * Bridge attempts to make as few assumptions as possible, however in
* some cases where 1-to-1 mappings don't exist, some assumptions are necessary. * some cases where 1-to-1 mappings don't exist, some assumptions are necessary.
* In particular: * In particular:
* - conversion from of a 2-channel Mat to an mxArray will result in a complex * - conversion from of a 2-channel Mat to an mxArray will result in a complex
...@@ -180,7 +180,7 @@ public: ...@@ -180,7 +180,7 @@ public:
matlab::conditionalError(obj, std::string("Object ").append(std::string(name)).append(std::string(" is NULL"))); matlab::conditionalError(obj, std::string("Object ").append(std::string(name)).append(std::string(" is NULL")));
return obj; return obj;
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// MATLAB TYPES // MATLAB TYPES
...@@ -190,8 +190,8 @@ public: ...@@ -190,8 +190,8 @@ public:
Bridge(const matlab::MxArray& obj) : ptr_(obj) {} Bridge(const matlab::MxArray& obj) : ptr_(obj) {}
Bridge(const mxArray* obj) : ptr_(obj) {} Bridge(const mxArray* obj) : ptr_(obj) {}
matlab::MxArray toMxArray() { return ptr_; } matlab::MxArray toMxArray() { return ptr_; }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// MATRIX CONVERSIONS // MATRIX CONVERSIONS
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -216,7 +216,7 @@ public: ...@@ -216,7 +216,7 @@ public:
} }
template <typename Scalar> template <typename Scalar>
cv::Mat toMat() const { cv::Mat toMat() const {
cv::Mat mat(ptr_.rows(), ptr_.cols(), CV_MAKETYPE(cv::DataType<Scalar>::type, ptr_.channels())); cv::Mat mat(ptr_.rows(), ptr_.cols(), CV_MAKETYPE(cv::DataType<Scalar>::type, ptr_.channels()));
switch (ptr_.ID()) { switch (ptr_.ID()) {
case mxINT8_CLASS: deepCopyAndTranspose<int8_t, Scalar>(ptr_, mat); break; case mxINT8_CLASS: deepCopyAndTranspose<int8_t, Scalar>(ptr_, mat); break;
...@@ -236,15 +236,15 @@ public: ...@@ -236,15 +236,15 @@ public:
return mat; return mat;
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// INTEGRAL TYPES // INTEGRAL TYPES
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// --------------------------- string -------------------------------------- // --------------------------- string --------------------------------------
Bridge& operator=(const std::string& ) { return *this; } Bridge& operator=(const std::string& ) { return *this; }
std::string toString() { std::string toString() {
return ptr_.toString(); return ptr_.toString();
} }
operator std::string() { return toString(); } operator std::string() { return toString(); }
...@@ -268,11 +268,11 @@ public: ...@@ -268,11 +268,11 @@ public:
Bridge& operator=(const int& ) { return *this; } Bridge& operator=(const int& ) { return *this; }
int toInt() { return ptr_.scalar<int>(); } int toInt() { return ptr_.scalar<int>(); }
operator int() { return toInt(); } operator int() { return toInt(); }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// CORE OPENCV TYPES // CORE OPENCV TYPES
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -281,47 +281,47 @@ public: ...@@ -281,47 +281,47 @@ public:
Bridge& operator=(const cv::Point& ) { return *this; } Bridge& operator=(const cv::Point& ) { return *this; }
cv::Point toPoint() const { return cv::Point(); } cv::Point toPoint() const { return cv::Point(); }
operator cv::Point() const { return toPoint(); } operator cv::Point() const { return toPoint(); }
// -------------------------- Point2f ------------------------------------ // -------------------------- Point2f ------------------------------------
Bridge& operator=(const cv::Point2f& ) { return *this; } Bridge& operator=(const cv::Point2f& ) { return *this; }
cv::Point2f toPoint2f() const { return cv::Point2f(); } cv::Point2f toPoint2f() const { return cv::Point2f(); }
operator cv::Point2f() const { return toPoint2f(); } operator cv::Point2f() const { return toPoint2f(); }
// -------------------------- Point2d ------------------------------------ // -------------------------- Point2d ------------------------------------
Bridge& operator=(const cv::Point2d& ) { return *this; } Bridge& operator=(const cv::Point2d& ) { return *this; }
cv::Point2d toPoint2d() const { return cv::Point2d(); } cv::Point2d toPoint2d() const { return cv::Point2d(); }
operator cv::Point2d() const { return toPoint2d(); } operator cv::Point2d() const { return toPoint2d(); }
// -------------------------- Size --------------------------------------- // -------------------------- Size ---------------------------------------
Bridge& operator=(const cv::Size& ) { return *this; } Bridge& operator=(const cv::Size& ) { return *this; }
cv::Size toSize() const { return cv::Size(); } cv::Size toSize() const { return cv::Size(); }
operator cv::Size() const { return toSize(); } operator cv::Size() const { return toSize(); }
// -------------------------- Moments -------------------------------------- // -------------------------- Moments --------------------------------------
Bridge& operator=(const cv::Moments& ) { return *this; } Bridge& operator=(const cv::Moments& ) { return *this; }
cv::Moments toMoments() const { return cv::Moments(); } cv::Moments toMoments() const { return cv::Moments(); }
operator cv::Moments() const { return toMoments(); } operator cv::Moments() const { return toMoments(); }
// -------------------------- Scalar -------------------------------------- // -------------------------- Scalar --------------------------------------
Bridge& operator=(const cv::Scalar& ) { return *this; } Bridge& operator=(const cv::Scalar& ) { return *this; }
cv::Scalar toScalar() { return cv::Scalar(); } cv::Scalar toScalar() { return cv::Scalar(); }
operator cv::Scalar() { return toScalar(); } operator cv::Scalar() { return toScalar(); }
// -------------------------- Rect ----------------------------------------- // -------------------------- Rect -----------------------------------------
Bridge& operator=(const cv::Rect& ) { return *this; } Bridge& operator=(const cv::Rect& ) { return *this; }
cv::Rect toRect() { return cv::Rect(); } cv::Rect toRect() { return cv::Rect(); }
operator cv::Rect() { return toRect(); } operator cv::Rect() { return toRect(); }
// ---------------------- RotatedRect --------------------------------------- // ---------------------- RotatedRect ---------------------------------------
Bridge& operator=(const cv::RotatedRect& ) { return *this; } Bridge& operator=(const cv::RotatedRect& ) { return *this; }
cv::RotatedRect toRotatedRect() { return cv::RotatedRect(); } cv::RotatedRect toRotatedRect() { return cv::RotatedRect(); }
operator cv::RotatedRect() { return toRotatedRect(); } operator cv::RotatedRect() { return toRotatedRect(); }
// ---------------------- TermCriteria -------------------------------------- // ---------------------- TermCriteria --------------------------------------
Bridge& operator=(const cv::TermCriteria& ) { return *this; } Bridge& operator=(const cv::TermCriteria& ) { return *this; }
cv::TermCriteria toTermCriteria() { return cv::TermCriteria(); } cv::TermCriteria toTermCriteria() { return cv::TermCriteria(); }
operator cv::TermCriteria() { return toTermCriteria(); } operator cv::TermCriteria() { return toTermCriteria(); }
// ---------------------- RNG -------------------------------------- // ---------------------- RNG --------------------------------------
Bridge& operator=(const cv::RNG& ) { return *this; } Bridge& operator=(const cv::RNG& ) { return *this; }
/*! @brief explicit conversion to cv::RNG() /*! @brief explicit conversion to cv::RNG()
...@@ -335,14 +335,14 @@ public: ...@@ -335,14 +335,14 @@ public:
} }
operator cv::RNG() { return toRNG(); } operator cv::RNG() { return toRNG(); }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// OPENCV VECTOR TYPES // OPENCV VECTOR TYPES
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// -------------------- vector_Mat ------------------------------------------ // -------------------- vector_Mat ------------------------------------------
Bridge& operator=(const vector_Mat& ) { return *this; } Bridge& operator=(const vector_Mat& ) { return *this; }
vector_Mat toVectorMat() { return vector_Mat(); } vector_Mat toVectorMat() { return vector_Mat(); }
...@@ -352,37 +352,37 @@ public: ...@@ -352,37 +352,37 @@ public:
Bridge& operator=(const vector_int& ) { return *this; } Bridge& operator=(const vector_int& ) { return *this; }
vector_int toVectorInt() { return vector_int(); } vector_int toVectorInt() { return vector_int(); }
operator vector_int() { return toVectorInt(); } operator vector_int() { return toVectorInt(); }
// --------------------------- vector_float -------------------------------- // --------------------------- vector_float --------------------------------
Bridge& operator=(const vector_float& ) { return *this; } Bridge& operator=(const vector_float& ) { return *this; }
vector_float toVectorFloat() { return vector_float(); } vector_float toVectorFloat() { return vector_float(); }
operator vector_float() { return toVectorFloat(); } operator vector_float() { return toVectorFloat(); }
// --------------------------- vector_Rect --------------------------------- // --------------------------- vector_Rect ---------------------------------
Bridge& operator=(const vector_Rect& ) { return *this; } Bridge& operator=(const vector_Rect& ) { return *this; }
vector_Rect toVectorRect() { return vector_Rect(); } vector_Rect toVectorRect() { return vector_Rect(); }
operator vector_Rect() { return toVectorRect(); } operator vector_Rect() { return toVectorRect(); }
// --------------------------- vector_KeyPoint ----------------------------- // --------------------------- vector_KeyPoint -----------------------------
Bridge& operator=(const vector_KeyPoint& ) { return *this; } Bridge& operator=(const vector_KeyPoint& ) { return *this; }
vector_KeyPoint toVectorKeyPoint() { return vector_KeyPoint(); } vector_KeyPoint toVectorKeyPoint() { return vector_KeyPoint(); }
operator vector_KeyPoint() { return toVectorKeyPoint(); } operator vector_KeyPoint() { return toVectorKeyPoint(); }
// --------------------------- vector_String ------------------------------- // --------------------------- vector_String -------------------------------
Bridge& operator=(const vector_String& ) { return *this; } Bridge& operator=(const vector_String& ) { return *this; }
vector_String toVectorString() { return vector_String(); } vector_String toVectorString() { return vector_String(); }
operator vector_String() { return toVectorString(); } operator vector_String() { return toVectorString(); }
// ------------------------ vector_Point ------------------------------------ // ------------------------ vector_Point ------------------------------------
Bridge& operator=(const vector_Point& ) { return *this; } Bridge& operator=(const vector_Point& ) { return *this; }
vector_Point toVectorPoint() { return vector_Point(); } vector_Point toVectorPoint() { return vector_Point(); }
operator vector_Point() { return toVectorPoint(); } operator vector_Point() { return toVectorPoint(); }
// ------------------------ vector_uchar ------------------------------------ // ------------------------ vector_uchar ------------------------------------
Bridge& operator=(const vector_uchar& ) { return *this; } Bridge& operator=(const vector_uchar& ) { return *this; }
vector_uchar toVectorUchar() { return vector_uchar(); } vector_uchar toVectorUchar() { return vector_uchar(); }
operator vector_uchar() { return toVectorUchar(); } operator vector_uchar() { return toVectorUchar(); }
// ------------------------ vector_vector_char ------------------------------ // ------------------------ vector_vector_char ------------------------------
Bridge& operator=(const vector_vector_char& ) { return *this; } Bridge& operator=(const vector_vector_char& ) { return *this; }
vector_vector_char toVectorVectorChar() { return vector_vector_char(); } vector_vector_char toVectorVectorChar() { return vector_vector_char(); }
...@@ -393,9 +393,9 @@ public: ...@@ -393,9 +393,9 @@ public:
vector_vector_DMatch toVectorVectorDMatch() { return vector_vector_DMatch(); } vector_vector_DMatch toVectorVectorDMatch() { return vector_vector_DMatch(); }
operator vector_vector_DMatch() { return toVectorVectorDMatch(); } operator vector_vector_DMatch() { return toVectorVectorDMatch(); }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// OPENCV COMPOUND TYPES // OPENCV COMPOUND TYPES
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -453,7 +453,7 @@ matlab::MxArray Bridge::FromMat<matlab::InheritType>(const cv::Mat& mat) { ...@@ -453,7 +453,7 @@ matlab::MxArray Bridge::FromMat<matlab::InheritType>(const cv::Mat& mat) {
/*! /*!
* @brief template specialization for inheriting types * @brief template specialization for inheriting types
* *
* This template specialization attempts to preserve the best mapping * This template specialization attempts to preserve the best mapping
* between Matlab and OpenCV types. OpenCV has poor support for double precision * between Matlab and OpenCV types. OpenCV has poor support for double precision
* types, so all floating point types are cast to float. Logicals get cast * types, so all floating point types are cast to float. Logicals get cast
...@@ -497,7 +497,7 @@ void deepCopyAndTranspose(const cv::Mat& in, matlab::MxArray& out) { ...@@ -497,7 +497,7 @@ void deepCopyAndTranspose(const cv::Mat& in, matlab::MxArray& out) {
cv::split(in, channels); cv::split(in, channels);
for (size_t c = 0; c < out.channels(); ++c) { for (size_t c = 0; c < out.channels(); ++c) {
cv::transpose(channels[c], channels[c]); cv::transpose(channels[c], channels[c]);
cv::Mat outmat(out.cols(), out.rows(), cv::DataType<OutputScalar>::type, cv::Mat outmat(out.cols(), out.rows(), cv::DataType<OutputScalar>::type,
static_cast<void *>(out.real<OutputScalar>() + out.cols()*out.rows()*c)); static_cast<void *>(out.real<OutputScalar>() + out.cols()*out.rows()*c));
channels[c].convertTo(outmat, cv::DataType<OutputScalar>::type); channels[c].convertTo(outmat, cv::DataType<OutputScalar>::type);
} }
...@@ -525,7 +525,7 @@ void deepCopyAndTranspose(const matlab::MxArray& in, cv::Mat& out) { ...@@ -525,7 +525,7 @@ void deepCopyAndTranspose(const matlab::MxArray& in, cv::Mat& out) {
//const InputScalar* inp = in.real<InputScalar>(); //const InputScalar* inp = in.real<InputScalar>();
//OutputScalar* outp = out.ptr<OutputScalar>(0); //OutputScalar* outp = out.ptr<OutputScalar>(0);
//gemt('C', in.rows(), in.cols(), inp, in.rows(), outp, out.step1()); //gemt('C', in.rows(), in.cols(), inp, in.rows(), outp, out.step1());
} }
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
namespace matlab { namespace matlab {
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
// If we have C++11 support, we just want to use unordered_map // If we have C++11 support, we just want to use unordered_map
#include <unordered_map> #include <unordered_map>
template <typename KeyType, typename ValueType> template <typename KeyType, typename ValueType>
using Map = std::unordered_map<KeyType, ValueType>; using Map = std::unordered_map<KeyType, ValueType>;
......
...@@ -59,7 +59,7 @@ typedef std::set<std::string> StringSet; ...@@ -59,7 +59,7 @@ typedef std::set<std::string> StringSet;
/* /*
* All recent versions of Matlab ship with the MKL library which contains * All recent versions of Matlab ship with the MKL library which contains
* a blas extension called mkl_?omatcopy(). This defines an out-of-place * a blas extension called mkl_?omatcopy(). This defines an out-of-place
* copy and transpose operation. * copy and transpose operation.
* *
* The mkl library is in ${MATLAB_ROOT}/bin/${MATLAB_MEXEXT}/libmkl... * The mkl library is in ${MATLAB_ROOT}/bin/${MATLAB_MEXEXT}/libmkl...
...@@ -225,7 +225,7 @@ private: ...@@ -225,7 +225,7 @@ private:
/*! /*!
* @brief swap all members of this and other * @brief swap all members of this and other
* *
* the swap method is used by the assignment and move constructors * the swap method is used by the assignment and move constructors
* to swap the members of two MxArrays, leaving both in destructible states * to swap the members of two MxArrays, leaving both in destructible states
*/ */
friend void swap(MxArray& first, MxArray& second) { friend void swap(MxArray& first, MxArray& second) {
...@@ -234,7 +234,7 @@ private: ...@@ -234,7 +234,7 @@ private:
swap(first.owns_, second.owns_); swap(first.owns_, second.owns_);
} }
void dealloc() { void dealloc() {
if (owns_ && ptr_) { mxDestroyArray(ptr_); ptr_ = NULL; owns_ = false; } if (owns_ && ptr_) { mxDestroyArray(ptr_); ptr_ = NULL; owns_ = false; }
} }
public: public:
...@@ -255,7 +255,7 @@ public: ...@@ -255,7 +255,7 @@ public:
* just encapsulate it * just encapsulate it
*/ */
MxArray(const mxArray* ptr) : ptr_(const_cast<mxArray *>(ptr)), owns_(false) {} MxArray(const mxArray* ptr) : ptr_(const_cast<mxArray *>(ptr)), owns_(false) {}
MxArray& operator=(const mxArray* ptr) { MxArray& operator=(const mxArray* ptr) {
dealloc(); dealloc();
ptr_ = const_cast<mxArray *>(ptr); ptr_ = const_cast<mxArray *>(ptr);
owns_ = false; owns_ = false;
...@@ -318,9 +318,9 @@ public: ...@@ -318,9 +318,9 @@ public:
return s; return s;
} }
/*! /*!
* @brief destructor * @brief destructor
* *
* The destructor deallocates any data allocated by mxCreate* methods only * The destructor deallocates any data allocated by mxCreate* methods only
* if the object is owned * if the object is owned
*/ */
...@@ -328,7 +328,7 @@ public: ...@@ -328,7 +328,7 @@ public:
dealloc(); dealloc();
} }
/*! /*!
* @brief copy constructor * @brief copy constructor
* *
* All copies are deep copies. If you have a C++11 compatible compiler, prefer * All copies are deep copies. If you have a C++11 compatible compiler, prefer
...@@ -340,7 +340,7 @@ public: ...@@ -340,7 +340,7 @@ public:
* @brief copy-and-swap assignment * @brief copy-and-swap assignment
* *
* This assignment operator uses the copy and swap idiom to provide a strong * This assignment operator uses the copy and swap idiom to provide a strong
* exception guarantee when swapping two objects. * exception guarantee when swapping two objects.
* *
* Note in particular that the other MxArray is passed by value, thus invoking * Note in particular that the other MxArray is passed by value, thus invoking
* the copy constructor which performs a deep copy of the input. The members of * the copy constructor which performs a deep copy of the input. The members of
...@@ -370,9 +370,9 @@ public: ...@@ -370,9 +370,9 @@ public:
* MxArray is not directly convertible back to mxArray types through assignment * MxArray is not directly convertible back to mxArray types through assignment
* because the MxArray may have been allocated on the free store, making it impossible * because the MxArray may have been allocated on the free store, making it impossible
* to know whether the returned pointer will be released by someone else or not. * to know whether the returned pointer will be released by someone else or not.
* *
* Since Matlab requires mxArrays be passed back into the workspace, the only way * Since Matlab requires mxArrays be passed back into the workspace, the only way
* to achieve that is through this function, which explicitly releases ownership * to achieve that is through this function, which explicitly releases ownership
* of the object, assuming the Matlab interpreter receving the object will delete * of the object, assuming the Matlab interpreter receving the object will delete
* it at a later time * it at a later time
* *
...@@ -394,13 +394,13 @@ public: ...@@ -394,13 +394,13 @@ public:
template <typename Scalar> template <typename Scalar>
Scalar* real() { return static_cast<Scalar *>(mxGetData(ptr_)); } Scalar* real() { return static_cast<Scalar *>(mxGetData(ptr_)); }
template <typename Scalar> template <typename Scalar>
Scalar* imag() { return static_cast<Scalar *>(mxGetImagData(ptr_)); } Scalar* imag() { return static_cast<Scalar *>(mxGetImagData(ptr_)); }
template <typename Scalar> template <typename Scalar>
const Scalar* real() const { return static_cast<const Scalar *>(mxGetData(ptr_)); } const Scalar* real() const { return static_cast<const Scalar *>(mxGetData(ptr_)); }
template <typename Scalar> template <typename Scalar>
const Scalar* imag() const { return static_cast<const Scalar *>(mxGetData(ptr_)); } const Scalar* imag() const { return static_cast<const Scalar *>(mxGetData(ptr_)); }
...@@ -457,8 +457,8 @@ public: ...@@ -457,8 +457,8 @@ public:
* Mat sum(Mat& A, Mat& B); % add two matrices * Mat sum(Mat& A, Mat& B); % add two matrices
* \endcode * \endcode
* *
* by adding two variants to ArgumentParser, the correct underlying sum * by adding two variants to ArgumentParser, the correct underlying sum
* method can be called. If the function call is ambiguous, the * method can be called. If the function call is ambiguous, the
* ArgumentParser will fail with an error message. * ArgumentParser will fail with an error message.
* *
* The previous example could be parsed as: * The previous example could be parsed as:
...@@ -491,7 +491,7 @@ private: ...@@ -491,7 +491,7 @@ private:
* *
* When addVariant() is called on an instance to ArgumentParser, this class * When addVariant() is called on an instance to ArgumentParser, this class
* holds the the information that decribes that variant. The parse() method * holds the the information that decribes that variant. The parse() method
* of ArgumentParser then attempts to match a Variant, given a set of * of ArgumentParser then attempts to match a Variant, given a set of
* inputs for a method invocation. * inputs for a method invocation.
*/ */
class Variant { class Variant {
...@@ -568,7 +568,7 @@ private: ...@@ -568,7 +568,7 @@ private:
s << ");"; s << ");";
if (Nreq_ + Nopt_ == 0) return s.str(); if (Nreq_ + Nopt_ == 0) return s.str();
// underscores // underscores
String under = String(req_begin, ' ') + String(req_end-req_begin, '-') String under = String(req_begin, ' ') + String(req_end-req_begin, '-')
+ String(std::max(opt_begin-req_end,0), ' ') + String(opt_end-opt_begin, '-'); + String(std::max(opt_begin-req_end,0), ' ') + String(opt_end-opt_begin, '-');
s << "\n" << under; s << "\n" << under;
// required and optional sets // required and optional sets
...@@ -601,7 +601,7 @@ public: ...@@ -601,7 +601,7 @@ public:
/*! @brief add a function call variant to the parser /*! @brief add a function call variant to the parser
* *
* Adds a function-call signature to the parser. The function call *must* be * Adds a function-call signature to the parser. The function call *must* be
* unique either in its number of arguments, or in the named-syntax. * unique either in its number of arguments, or in the named-syntax.
* Currently this function does not check whether that invariant stands true. * Currently this function does not check whether that invariant stands true.
* *
...@@ -625,9 +625,9 @@ public: ...@@ -625,9 +625,9 @@ public:
} }
/*! @brief parse a vector of input arguments /*! @brief parse a vector of input arguments
* *
* This method parses a vector of input arguments, attempting to match them * This method parses a vector of input arguments, attempting to match them
* to a Variant spec. For each input, the method attempts to cull any * to a Variant spec. For each input, the method attempts to cull any
* Variants which don't match the given inputs so far. * Variants which don't match the given inputs so far.
* *
* Once all inputs have been parsed, if there is one unique spec remaining, * Once all inputs have been parsed, if there is one unique spec remaining,
...@@ -635,7 +635,7 @@ public: ...@@ -635,7 +635,7 @@ public:
* arguments removed. Any optional arguments that have not been encountered * arguments removed. Any optional arguments that have not been encountered
* are set to an empty array. * are set to an empty array.
* *
* If multiple variants or no variants match the given call, an error * If multiple variants or no variants match the given call, an error
* message is emitted * message is emitted
*/ */
MxArrayVector parse(const MxArrayVector& inputs) { MxArrayVector parse(const MxArrayVector& inputs) {
......
...@@ -52,7 +52,7 @@ void transposeBlock(const size_t M, const size_t N, const InputScalar* src, size ...@@ -52,7 +52,7 @@ void transposeBlock(const size_t M, const size_t N, const InputScalar* src, size
cache[m+n*4] = src[m+n*lda]; cache[m+n*4] = src[m+n*lda];
// copy the destination out of the cache contiguously // copy the destination out of the cache contiguously
for (size_t m = 0; m < M; ++m) for (size_t m = 0; m < M; ++m)
for (size_t n = 0; n < N; ++n) for (size_t n = 0; n < N; ++n)
dst[n+m*ldb] = cache[m+n*4]; dst[n+m*ldb] = cache[m+n*4];
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
classdef OpenCVTest < matlab.unittest.TestCase classdef OpenCVTest < matlab.unittest.TestCase
methods(Test) methods(Test)
% ------------------------------------------------------------------------- % -------------------------------------------------------------------------
% EXCEPTIONS % EXCEPTIONS
% Check that errors and exceptions are thrown correctly % Check that errors and exceptions are thrown correctly
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* file: exception.cpp * file: exception.cpp
* author: Hilton Bristow * author: Hilton Bristow
* date: Wed, 19 Jun 2013 11:15:15 * date: Wed, 19 Jun 2013 11:15:15
* *
* See LICENCE for full modification and redistribution details. * See LICENCE for full modification and redistribution details.
* Copyright 2013 The OpenCV Foundation * Copyright 2013 The OpenCV Foundation
*/ */
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <opencv2/core.hpp> #include <opencv2/core.hpp>
#include "mex.h" #include "mex.h"
/* /*
* exception * exception
* Gateway routine * Gateway routine
* nlhs - number of return arguments * nlhs - number of return arguments
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
* file: exception.cpp * file: exception.cpp
* author: Hilton Bristow * author: Hilton Bristow
* date: Wed, 19 Jun 2013 11:15:15 * date: Wed, 19 Jun 2013 11:15:15
* *
* See LICENCE for full modification and redistribution details. * See LICENCE for full modification and redistribution details.
* Copyright 2013 The OpenCV Foundation * Copyright 2013 The OpenCV Foundation
*/ */
#include "mex.h" #include "mex.h"
/* /*
* exception * exception
* Gateway routine * Gateway routine
* nlhs - number of return arguments * nlhs - number of return arguments
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
* file: exception.cpp * file: exception.cpp
* author: Hilton Bristow * author: Hilton Bristow
* date: Wed, 19 Jun 2013 11:15:15 * date: Wed, 19 Jun 2013 11:15:15
* *
* See LICENCE for full modification and redistribution details. * See LICENCE for full modification and redistribution details.
* Copyright 2013 The OpenCV Foundation * Copyright 2013 The OpenCV Foundation
*/ */
#include <exception> #include <exception>
#include "mex.h" #include "mex.h"
/* /*
* exception * exception
* Gateway routine * Gateway routine
* nlhs - number of return arguments * nlhs - number of return arguments
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* file: rand.cpp * file: rand.cpp
* author: A trusty code generator * author: A trusty code generator
* date: Wed, 19 Jun 2013 11:15:15 * date: Wed, 19 Jun 2013 11:15:15
* *
* This file was autogenerated, do not modify. * This file was autogenerated, do not modify.
* See LICENCE for full modification and redistribution details. * See LICENCE for full modification and redistribution details.
* Copyright 2013 The OpenCV Foundation * Copyright 2013 The OpenCV Foundation
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "mex.h" #include "mex.h"
#include <vector> #include <vector>
/* /*
* rand * rand
* Gateway routine * Gateway routine
* nlhs - number of return arguments * nlhs - number of return arguments
......
/* /*
* a rather innocuous-looking function which is actually * a rather innocuous-looking function which is actually
* part of <cstdlib>, so we can be reasonably sure its * part of <cstdlib>, so we can be reasonably sure its
* definition will be found * definition will be found
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment