Merging 'master' into 'wrap'

release/4.3a0
Varun Agrawal 2021-12-06 11:01:43 -05:00
commit ea75666cd8
36 changed files with 625 additions and 247 deletions

View File

@ -62,10 +62,10 @@ macro(find_and_configure_matlab)
endmacro() endmacro()
# Consistent and user-friendly wrap function # Consistent and user-friendly wrap function
function(matlab_wrap interfaceHeader linkLibraries function(matlab_wrap interfaceHeader moduleName linkLibraries
extraIncludeDirs extraMexFlags ignore_classes) extraIncludeDirs extraMexFlags ignore_classes)
find_and_configure_matlab() find_and_configure_matlab()
wrap_and_install_library("${interfaceHeader}" "${linkLibraries}" wrap_and_install_library("${interfaceHeader}" "${moduleName}" "${linkLibraries}"
"${extraIncludeDirs}" "${extraMexFlags}" "${extraIncludeDirs}" "${extraMexFlags}"
"${ignore_classes}") "${ignore_classes}")
endfunction() endfunction()
@ -77,6 +77,7 @@ endfunction()
# Arguments: # Arguments:
# #
# interfaceHeader: The relative path to the wrapper interface definition file. # interfaceHeader: The relative path to the wrapper interface definition file.
# moduleName: The name of the wrapped module, e.g. gtsam
# linkLibraries: Any *additional* libraries to link. Your project library # linkLibraries: Any *additional* libraries to link. Your project library
# (e.g. `lba`), libraries it depends on, and any necessary MATLAB libraries will # (e.g. `lba`), libraries it depends on, and any necessary MATLAB libraries will
# be linked automatically. So normally, leave this empty. # be linked automatically. So normally, leave this empty.
@ -85,15 +86,15 @@ endfunction()
# extraMexFlags: Any *additional* flags to pass to the compiler when building # extraMexFlags: Any *additional* flags to pass to the compiler when building
# the wrap code. Normally, leave this empty. # the wrap code. Normally, leave this empty.
# ignore_classes: List of classes to ignore in the wrapping. # ignore_classes: List of classes to ignore in the wrapping.
function(wrap_and_install_library interfaceHeader linkLibraries function(wrap_and_install_library interfaceHeader moduleName linkLibraries
extraIncludeDirs extraMexFlags ignore_classes) extraIncludeDirs extraMexFlags ignore_classes)
wrap_library_internal("${interfaceHeader}" "${linkLibraries}" wrap_library_internal("${interfaceHeader}" "${moduleName}" "${linkLibraries}"
"${extraIncludeDirs}" "${mexFlags}") "${extraIncludeDirs}" "${mexFlags}")
install_wrapped_library_internal("${interfaceHeader}") install_wrapped_library_internal("${moduleName}")
endfunction() endfunction()
# Internal function that wraps a library and compiles the wrapper # Internal function that wraps a library and compiles the wrapper
function(wrap_library_internal interfaceHeader linkLibraries extraIncludeDirs function(wrap_library_internal interfaceHeader moduleName linkLibraries extraIncludeDirs
extraMexFlags) extraMexFlags)
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
if(CMAKE_SIZEOF_VOID_P EQUAL 8) if(CMAKE_SIZEOF_VOID_P EQUAL 8)
@ -120,7 +121,6 @@ function(wrap_library_internal interfaceHeader linkLibraries extraIncludeDirs
# Extract module name from interface header file name # Extract module name from interface header file name
get_filename_component(interfaceHeader "${interfaceHeader}" ABSOLUTE) get_filename_component(interfaceHeader "${interfaceHeader}" ABSOLUTE)
get_filename_component(modulePath "${interfaceHeader}" PATH) get_filename_component(modulePath "${interfaceHeader}" PATH)
get_filename_component(moduleName "${interfaceHeader}" NAME_WE)
# Paths for generated files # Paths for generated files
set(generated_files_path "${PROJECT_BINARY_DIR}/wrap/${moduleName}") set(generated_files_path "${PROJECT_BINARY_DIR}/wrap/${moduleName}")
@ -136,8 +136,7 @@ function(wrap_library_internal interfaceHeader linkLibraries extraIncludeDirs
# explicit link libraries list so that the next block of code can unpack any # explicit link libraries list so that the next block of code can unpack any
# static libraries # static libraries
set(automaticDependencies "") set(automaticDependencies "")
foreach(lib ${moduleName} ${linkLibraries}) foreach(lib ${module} ${linkLibraries})
# message("MODULE NAME: ${moduleName}")
if(TARGET "${lib}") if(TARGET "${lib}")
get_target_property(dependentLibraries ${lib} INTERFACE_LINK_LIBRARIES) get_target_property(dependentLibraries ${lib} INTERFACE_LINK_LIBRARIES)
# message("DEPENDENT LIBRARIES: ${dependentLibraries}") # message("DEPENDENT LIBRARIES: ${dependentLibraries}")
@ -176,7 +175,7 @@ function(wrap_library_internal interfaceHeader linkLibraries extraIncludeDirs
set(otherLibraryTargets "") set(otherLibraryTargets "")
set(otherLibraryNontargets "") set(otherLibraryNontargets "")
set(otherSourcesAndObjects "") set(otherSourcesAndObjects "")
foreach(lib ${moduleName} ${linkLibraries} ${automaticDependencies}) foreach(lib ${module} ${linkLibraries} ${automaticDependencies})
if(TARGET "${lib}") if(TARGET "${lib}")
if(WRAP_MEX_BUILD_STATIC_MODULE) if(WRAP_MEX_BUILD_STATIC_MODULE)
get_target_property(target_sources ${lib} SOURCES) get_target_property(target_sources ${lib} SOURCES)
@ -250,7 +249,7 @@ function(wrap_library_internal interfaceHeader linkLibraries extraIncludeDirs
COMMAND COMMAND
${CMAKE_COMMAND} -E env ${CMAKE_COMMAND} -E env
"PYTHONPATH=${GTWRAP_PACKAGE_DIR}${GTWRAP_PATH_SEPARATOR}$ENV{PYTHONPATH}" "PYTHONPATH=${GTWRAP_PACKAGE_DIR}${GTWRAP_PATH_SEPARATOR}$ENV{PYTHONPATH}"
${PYTHON_EXECUTABLE} ${MATLAB_WRAP_SCRIPT} --src ${interfaceHeader} ${PYTHON_EXECUTABLE} ${MATLAB_WRAP_SCRIPT} --src "${interfaceHeader}"
--module_name ${moduleName} --out ${generated_files_path} --module_name ${moduleName} --out ${generated_files_path}
--top_module_namespaces ${moduleName} --ignore ${ignore_classes} --top_module_namespaces ${moduleName} --ignore ${ignore_classes}
VERBATIM VERBATIM
@ -324,8 +323,8 @@ endfunction()
# Internal function that installs a wrap toolbox # Internal function that installs a wrap toolbox
function(install_wrapped_library_internal interfaceHeader) function(install_wrapped_library_internal interfaceHeader)
get_filename_component(moduleName "${interfaceHeader}" NAME_WE) get_filename_component(module "${interfaceHeader}" NAME_WE)
set(generated_files_path "${PROJECT_BINARY_DIR}/wrap/${moduleName}") set(generated_files_path "${PROJECT_BINARY_DIR}/wrap/${module}")
# NOTE: only installs .m and mex binary files (not .cpp) - the trailing slash # NOTE: only installs .m and mex binary files (not .cpp) - the trailing slash
# on the directory name here prevents creating the top-level module name # on the directory name here prevents creating the top-level module name

View File

@ -53,6 +53,10 @@ class Typename:
self.name = t[-1] # the name is the last element in this list self.name = t[-1] # the name is the last element in this list
self.namespaces = t[:-1] self.namespaces = t[:-1]
# If the first namespace is empty string, just get rid of it.
if self.namespaces and self.namespaces[0] == '':
self.namespaces.pop(0)
if instantiations: if instantiations:
if isinstance(instantiations, Sequence): if isinstance(instantiations, Sequence):
self.instantiations = instantiations # type: ignore self.instantiations = instantiations # type: ignore
@ -92,8 +96,8 @@ class Typename:
else: else:
cpp_name = self.name cpp_name = self.name
return '{}{}{}'.format( return '{}{}{}'.format(
"::".join(self.namespaces[idx:]), "::".join(self.namespaces),
"::" if self.namespaces[idx:] else "", "::" if self.namespaces else "",
cpp_name, cpp_name,
) )

View File

@ -108,7 +108,7 @@ class FormatMixin:
elif is_method: elif is_method:
formatted_type_name += self.data_type_param.get(name) or name formatted_type_name += self.data_type_param.get(name) or name
else: else:
formatted_type_name += name formatted_type_name += str(name)
if separator == "::": # C++ if separator == "::": # C++
templates = [] templates = []
@ -192,10 +192,9 @@ class FormatMixin:
method = '' method = ''
if isinstance(static_method, parser.StaticMethod): if isinstance(static_method, parser.StaticMethod):
method += "".join([separator + x for x in static_method.parent.namespaces()]) + \ method += static_method.parent.to_cpp() + separator
separator + static_method.parent.name + separator
return method[2 * len(separator):] return method
def _format_global_function(self, def _format_global_function(self,
function: Union[parser.GlobalFunction, Any], function: Union[parser.GlobalFunction, Any],

View File

@ -239,18 +239,18 @@ class MatlabWrapper(CheckMixin, FormatMixin):
return var_list_wrap return var_list_wrap
def _wrap_method_check_statement(self, args): def _wrap_method_check_statement(self, args: parser.ArgumentList):
""" """
Wrap the given arguments into either just a varargout call or a Wrap the given arguments into either just a varargout call or a
call in an if statement that checks if the parameters are accurate. call in an if statement that checks if the parameters are accurate.
TODO Update this method so that default arguments are supported.
""" """
check_statement = ''
arg_id = 1 arg_id = 1
if check_statement == '': param_count = len(args)
check_statement = \ check_statement = 'if length(varargin) == {param_count}'.format(
'if length(varargin) == {param_count}'.format( param_count=param_count)
param_count=len(args.list()))
for _, arg in enumerate(args.list()): for _, arg in enumerate(args.list()):
name = arg.ctype.typename.name name = arg.ctype.typename.name
@ -809,7 +809,7 @@ class MatlabWrapper(CheckMixin, FormatMixin):
for static_method in static_methods: for static_method in static_methods:
format_name = list(static_method[0].name) format_name = list(static_method[0].name)
format_name[0] = format_name[0].upper() format_name[0] = format_name[0]
if static_method[0].name in self.ignore_methods: if static_method[0].name in self.ignore_methods:
continue continue
@ -850,12 +850,13 @@ class MatlabWrapper(CheckMixin, FormatMixin):
wrapper=self._wrapper_name(), wrapper=self._wrapper_name(),
id=self._update_wrapper_id( id=self._update_wrapper_id(
(namespace_name, instantiated_class, (namespace_name, instantiated_class,
static_overload.name, static_overload)), static_overload.name, static_overload)),
class_name=instantiated_class.name, class_name=instantiated_class.name,
end_statement=end_statement), end_statement=end_statement),
prefix=' ') prefix=' ')
#TODO Figure out what is static_overload doing here. # If the arguments don't match any of the checks above,
# throw an error with the class and method name.
method_text += textwrap.indent(textwrap.dedent("""\ method_text += textwrap.indent(textwrap.dedent("""\
error('Arguments do not match any overload of function {class_name}.{method_name}'); error('Arguments do not match any overload of function {class_name}.{method_name}');
""".format(class_name=class_name, """.format(class_name=class_name,
@ -1081,7 +1082,6 @@ class MatlabWrapper(CheckMixin, FormatMixin):
obj_start = '' obj_start = ''
if isinstance(method, instantiator.InstantiatedMethod): if isinstance(method, instantiator.InstantiatedMethod):
# method_name = method.original.name
method_name = method.to_cpp() method_name = method.to_cpp()
obj_start = 'obj->' obj_start = 'obj->'
@ -1090,6 +1090,10 @@ class MatlabWrapper(CheckMixin, FormatMixin):
# self._format_type_name(method.instantiations)) # self._format_type_name(method.instantiations))
method = method.to_cpp() method = method.to_cpp()
elif isinstance(method, instantiator.InstantiatedStaticMethod):
method_name = self._format_static_method(method, '::')
method_name += method.original.name
elif isinstance(method, parser.GlobalFunction): elif isinstance(method, parser.GlobalFunction):
method_name = self._format_global_function(method, '::') method_name = self._format_global_function(method, '::')
method_name += method.name method_name += method.name
@ -1250,7 +1254,7 @@ class MatlabWrapper(CheckMixin, FormatMixin):
method_name = '' method_name = ''
if is_static_method: if is_static_method:
method_name = self._format_static_method(extra) + '.' method_name = self._format_static_method(extra, '.')
method_name += extra.name method_name += extra.name
@ -1567,23 +1571,23 @@ class MatlabWrapper(CheckMixin, FormatMixin):
def wrap(self, files, path): def wrap(self, files, path):
"""High level function to wrap the project.""" """High level function to wrap the project."""
content = ""
modules = {} modules = {}
for file in files: for file in files:
with open(file, 'r') as f: with open(file, 'r') as f:
content = f.read() content += f.read()
# Parse the contents of the interface file # Parse the contents of the interface file
parsed_result = parser.Module.parseString(content) parsed_result = parser.Module.parseString(content)
# print(parsed_result)
# Instantiate the module # Instantiate the module
module = instantiator.instantiate_namespace(parsed_result) module = instantiator.instantiate_namespace(parsed_result)
if module.name in modules: if module.name in modules:
modules[module. modules[
name].content[0].content += module.content[0].content module.name].content[0].content += module.content[0].content
else: else:
modules[module.name] = module modules[module.name] = module
for module in modules.values(): for module in modules.values():
# Wrap the full namespace # Wrap the full namespace

View File

@ -55,16 +55,14 @@ def instantiate_type(
# make a deep copy so that there is no overwriting of original template params # make a deep copy so that there is no overwriting of original template params
ctype = deepcopy(ctype) ctype = deepcopy(ctype)
# Check if the return type has template parameters # Check if the return type has template parameters as the typename's name
if ctype.typename.instantiations: if ctype.typename.instantiations:
for idx, instantiation in enumerate(ctype.typename.instantiations): for idx, instantiation in enumerate(ctype.typename.instantiations):
if instantiation.name in template_typenames: if instantiation.name in template_typenames:
template_idx = template_typenames.index(instantiation.name) template_idx = template_typenames.index(instantiation.name)
ctype.typename.instantiations[ ctype.typename.instantiations[idx].name =\
idx] = instantiations[ # type: ignore instantiations[template_idx]
template_idx]
return ctype
str_arg_typename = str(ctype.typename) str_arg_typename = str(ctype.typename)
@ -125,9 +123,18 @@ def instantiate_type(
# Case when 'This' is present in the type namespace, e.g `This::Subclass`. # Case when 'This' is present in the type namespace, e.g `This::Subclass`.
elif 'This' in str_arg_typename: elif 'This' in str_arg_typename:
# Simply get the index of `This` in the namespace and replace it with the instantiated name. # Check if `This` is in the namespaces
namespace_idx = ctype.typename.namespaces.index('This') if 'This' in ctype.typename.namespaces:
ctype.typename.namespaces[namespace_idx] = cpp_typename.name # Simply get the index of `This` in the namespace and
# replace it with the instantiated name.
namespace_idx = ctype.typename.namespaces.index('This')
ctype.typename.namespaces[namespace_idx] = cpp_typename.name
# Else check if it is in the template namespace, e.g vector<This::Value>
else:
for idx, instantiation in enumerate(ctype.typename.instantiations):
if 'This' in instantiation.namespaces:
ctype.typename.instantiations[idx].namespaces = \
cpp_typename.namespaces + [cpp_typename.name]
return ctype return ctype
else: else:

View File

@ -0,0 +1,31 @@
%class GeneralSFMFactorCal3Bundler, see Doxygen page for details
%at https://gtsam.org/doxygen/
%
classdef GeneralSFMFactorCal3Bundler < handle
properties
ptr_gtsamGeneralSFMFactorCal3Bundler = 0
end
methods
function obj = GeneralSFMFactorCal3Bundler(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2};
special_cases_wrapper(7, my_ptr);
else
error('Arguments do not match any overload of gtsam.GeneralSFMFactorCal3Bundler constructor');
end
obj.ptr_gtsamGeneralSFMFactorCal3Bundler = my_ptr;
end
function delete(obj)
special_cases_wrapper(8, obj.ptr_gtsamGeneralSFMFactorCal3Bundler);
end
function display(obj), obj.print(''); end
%DISPLAY Calls print on the object
function disp(obj), obj.display; end
%DISP Calls print on the object
end
methods(Static = true)
end
end

View File

@ -78,7 +78,7 @@ classdef Point3 < handle
error('Arguments do not match any overload of function Point3.StaticFunctionRet'); error('Arguments do not match any overload of function Point3.StaticFunctionRet');
end end
function varargout = StaticFunction(varargin) function varargout = staticFunction(varargin)
% STATICFUNCTION usage: staticFunction() : returns double % STATICFUNCTION usage: staticFunction() : returns double
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0 if length(varargin) == 0

View File

@ -0,0 +1,31 @@
%class SfmTrack, see Doxygen page for details
%at https://gtsam.org/doxygen/
%
classdef SfmTrack < handle
properties
ptr_gtsamSfmTrack = 0
end
methods
function obj = SfmTrack(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2};
special_cases_wrapper(3, my_ptr);
else
error('Arguments do not match any overload of gtsam.SfmTrack constructor');
end
obj.ptr_gtsamSfmTrack = my_ptr;
end
function delete(obj)
special_cases_wrapper(4, obj.ptr_gtsamSfmTrack);
end
function display(obj), obj.print(''); end
%DISPLAY Calls print on the object
function disp(obj), obj.display; end
%DISP Calls print on the object
end
methods(Static = true)
end
end

View File

@ -0,0 +1,59 @@
%class Values, see Doxygen page for details
%at https://gtsam.org/doxygen/
%
%-------Constructors-------
%Values()
%Values(Values other)
%
%-------Methods-------
%insert(size_t j, Vector vector) : returns void
%insert(size_t j, Matrix matrix) : returns void
%
classdef Values < handle
properties
ptr_gtsamValues = 0
end
methods
function obj = Values(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2};
namespaces_wrapper(26, my_ptr);
elseif nargin == 0
my_ptr = namespaces_wrapper(27);
elseif nargin == 1 && isa(varargin{1},'gtsam.Values')
my_ptr = namespaces_wrapper(28, varargin{1});
else
error('Arguments do not match any overload of gtsam.Values constructor');
end
obj.ptr_gtsamValues = my_ptr;
end
function delete(obj)
namespaces_wrapper(29, obj.ptr_gtsamValues);
end
function display(obj), obj.print(''); end
%DISPLAY Calls print on the object
function disp(obj), obj.display; end
%DISP Calls print on the object
function varargout = insert(this, varargin)
% INSERT usage: insert(size_t j, Vector vector) : returns void
% Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 2 && isa(varargin{1},'numeric') && isa(varargin{2},'double') && size(varargin{2},2)==1
namespaces_wrapper(30, this, varargin{:});
return
end
% INSERT usage: insert(size_t j, Matrix matrix) : returns void
% Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 2 && isa(varargin{1},'numeric') && isa(varargin{2},'double')
namespaces_wrapper(31, this, varargin{:});
return
end
error('Arguments do not match any overload of function gtsam.Values.insert');
end
end
methods(Static = true)
end
end

View File

@ -74,7 +74,7 @@ classdef ClassA < handle
end end
methods(Static = true) methods(Static = true)
function varargout = Afunction(varargin) function varargout = afunction(varargin)
% AFUNCTION usage: afunction() : returns double % AFUNCTION usage: afunction() : returns double
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0 if length(varargin) == 0

View File

@ -0,0 +1,6 @@
function varargout = DefaultFuncInt(varargin)
if length(varargin) == 2 && isa(varargin{1},'numeric') && isa(varargin{2},'numeric')
functions_wrapper(8, varargin{:});
else
error('Arguments do not match any overload of function DefaultFuncInt');
end

View File

@ -0,0 +1,6 @@
function varargout = DefaultFuncObj(varargin)
if length(varargin) == 1 && isa(varargin{1},'gtsam.KeyFormatter')
functions_wrapper(10, varargin{:});
else
error('Arguments do not match any overload of function DefaultFuncObj');
end

View File

@ -0,0 +1,6 @@
function varargout = DefaultFuncString(varargin)
if length(varargin) == 2 && isa(varargin{1},'char') && isa(varargin{2},'char')
functions_wrapper(9, varargin{:});
else
error('Arguments do not match any overload of function DefaultFuncString');
end

View File

@ -0,0 +1,6 @@
function varargout = DefaultFuncVector(varargin)
if length(varargin) == 2 && isa(varargin{1},'std.vectornumeric') && isa(varargin{2},'std.vectorchar')
functions_wrapper(12, varargin{:});
else
error('Arguments do not match any overload of function DefaultFuncVector');
end

View File

@ -0,0 +1,6 @@
function varargout = DefaultFuncZero(varargin)
if length(varargin) == 5 && isa(varargin{1},'numeric') && isa(varargin{2},'numeric') && isa(varargin{3},'double') && isa(varargin{4},'logical') && isa(varargin{5},'logical')
functions_wrapper(11, varargin{:});
else
error('Arguments do not match any overload of function DefaultFuncZero');
end

View File

@ -0,0 +1,36 @@
%class ForwardKinematics, see Doxygen page for details
%at https://gtsam.org/doxygen/
%
%-------Constructors-------
%ForwardKinematics(Robot robot, string start_link_name, string end_link_name, Values joint_angles, Pose3 l2Tp)
%
classdef ForwardKinematics < handle
properties
ptr_ForwardKinematics = 0
end
methods
function obj = ForwardKinematics(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2};
class_wrapper(55, my_ptr);
elseif nargin == 5 && isa(varargin{1},'gtdynamics.Robot') && isa(varargin{2},'char') && isa(varargin{3},'char') && isa(varargin{4},'gtsam.Values') && isa(varargin{5},'gtsam.Pose3')
my_ptr = class_wrapper(56, varargin{1}, varargin{2}, varargin{3}, varargin{4}, varargin{5});
else
error('Arguments do not match any overload of ForwardKinematics constructor');
end
obj.ptr_ForwardKinematics = my_ptr;
end
function delete(obj)
class_wrapper(57, obj.ptr_ForwardKinematics);
end
function display(obj), obj.print(''); end
%DISPLAY Calls print on the object
function disp(obj), obj.display; end
%DISP Calls print on the object
end
methods(Static = true)
end
end

View File

@ -0,0 +1,36 @@
%class ForwardKinematicsFactor, see Doxygen page for details
%at https://gtsam.org/doxygen/
%
classdef ForwardKinematicsFactor < gtsam.BetweenFactor<gtsam.Pose3>
properties
ptr_ForwardKinematicsFactor = 0
end
methods
function obj = ForwardKinematicsFactor(varargin)
if (nargin == 2 || (nargin == 3 && strcmp(varargin{3}, 'void'))) && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
if nargin == 2
my_ptr = varargin{2};
else
my_ptr = inheritance_wrapper(36, varargin{2});
end
base_ptr = inheritance_wrapper(35, my_ptr);
else
error('Arguments do not match any overload of ForwardKinematicsFactor constructor');
end
obj = obj@gtsam.BetweenFactorPose3(uint64(5139824614673773682), base_ptr);
obj.ptr_ForwardKinematicsFactor = my_ptr;
end
function delete(obj)
inheritance_wrapper(37, obj.ptr_ForwardKinematicsFactor);
end
function display(obj), obj.print(''); end
%DISPLAY Calls print on the object
function disp(obj), obj.display; end
%DISP Calls print on the object
end
methods(Static = true)
end
end

View File

@ -3,6 +3,7 @@
% %
%-------Methods------- %-------Methods-------
%multiTemplatedMethodStringSize_t(double d, string t, size_t u) : returns Fun<double> %multiTemplatedMethodStringSize_t(double d, string t, size_t u) : returns Fun<double>
%sets() : returns std::map<double,Fun<double>::double>
%templatedMethodString(double d, string t) : returns Fun<double> %templatedMethodString(double d, string t) : returns Fun<double>
% %
%-------Static Methods------- %-------Static Methods-------
@ -46,11 +47,21 @@ classdef FunDouble < handle
error('Arguments do not match any overload of function FunDouble.multiTemplatedMethodStringSize_t'); error('Arguments do not match any overload of function FunDouble.multiTemplatedMethodStringSize_t');
end end
function varargout = sets(this, varargin)
% SETS usage: sets() : returns std.mapdoubledouble
% Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0
varargout{1} = class_wrapper(8, this, varargin{:});
return
end
error('Arguments do not match any overload of function FunDouble.sets');
end
function varargout = templatedMethodString(this, varargin) function varargout = templatedMethodString(this, varargin)
% TEMPLATEDMETHODSTRING usage: templatedMethodString(double d, string t) : returns Fun<double> % TEMPLATEDMETHODSTRING usage: templatedMethodString(double d, string t) : returns Fun<double>
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 2 && isa(varargin{1},'double') && isa(varargin{2},'char') if length(varargin) == 2 && isa(varargin{1},'double') && isa(varargin{2},'char')
varargout{1} = class_wrapper(8, this, varargin{:}); varargout{1} = class_wrapper(9, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function FunDouble.templatedMethodString'); error('Arguments do not match any overload of function FunDouble.templatedMethodString');
@ -59,22 +70,22 @@ classdef FunDouble < handle
end end
methods(Static = true) methods(Static = true)
function varargout = StaticMethodWithThis(varargin) function varargout = staticMethodWithThis(varargin)
% STATICMETHODWITHTHIS usage: staticMethodWithThis() : returns Fundouble % STATICMETHODWITHTHIS usage: staticMethodWithThis() : returns Fundouble
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0 if length(varargin) == 0
varargout{1} = class_wrapper(9, varargin{:}); varargout{1} = class_wrapper(10, varargin{:});
return return
end end
error('Arguments do not match any overload of function FunDouble.staticMethodWithThis'); error('Arguments do not match any overload of function FunDouble.staticMethodWithThis');
end end
function varargout = TemplatedStaticMethodInt(varargin) function varargout = templatedStaticMethodInt(varargin)
% TEMPLATEDSTATICMETHODINT usage: templatedStaticMethodInt(int m) : returns double % TEMPLATEDSTATICMETHODINT usage: templatedStaticMethodInt(int m) : returns double
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'numeric') if length(varargin) == 1 && isa(varargin{1},'numeric')
varargout{1} = class_wrapper(10, varargin{:}); varargout{1} = class_wrapper(11, varargin{:});
return return
end end

View File

@ -52,7 +52,7 @@ classdef FunRange < handle
end end
methods(Static = true) methods(Static = true)
function varargout = Create(varargin) function varargout = create(varargin)
% CREATE usage: create() : returns FunRange % CREATE usage: create() : returns FunRange
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0 if length(varargin) == 0

View File

@ -9,7 +9,7 @@ classdef MultipleTemplatesIntDouble < handle
function obj = MultipleTemplatesIntDouble(varargin) function obj = MultipleTemplatesIntDouble(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2}; my_ptr = varargin{2};
class_wrapper(50, my_ptr); class_wrapper(51, my_ptr);
else else
error('Arguments do not match any overload of MultipleTemplatesIntDouble constructor'); error('Arguments do not match any overload of MultipleTemplatesIntDouble constructor');
end end
@ -17,7 +17,7 @@ classdef MultipleTemplatesIntDouble < handle
end end
function delete(obj) function delete(obj)
class_wrapper(51, obj.ptr_MultipleTemplatesIntDouble); class_wrapper(52, obj.ptr_MultipleTemplatesIntDouble);
end end
function display(obj), obj.print(''); end function display(obj), obj.print(''); end

View File

@ -9,7 +9,7 @@ classdef MultipleTemplatesIntFloat < handle
function obj = MultipleTemplatesIntFloat(varargin) function obj = MultipleTemplatesIntFloat(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2}; my_ptr = varargin{2};
class_wrapper(52, my_ptr); class_wrapper(53, my_ptr);
else else
error('Arguments do not match any overload of MultipleTemplatesIntFloat constructor'); error('Arguments do not match any overload of MultipleTemplatesIntFloat constructor');
end end
@ -17,7 +17,7 @@ classdef MultipleTemplatesIntFloat < handle
end end
function delete(obj) function delete(obj)
class_wrapper(53, obj.ptr_MultipleTemplatesIntFloat); class_wrapper(54, obj.ptr_MultipleTemplatesIntFloat);
end end
function display(obj), obj.print(''); end function display(obj), obj.print(''); end

View File

@ -15,9 +15,9 @@ classdef MyFactorPosePoint2 < handle
function obj = MyFactorPosePoint2(varargin) function obj = MyFactorPosePoint2(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2}; my_ptr = varargin{2};
class_wrapper(63, my_ptr); class_wrapper(64, my_ptr);
elseif nargin == 4 && isa(varargin{1},'numeric') && isa(varargin{2},'numeric') && isa(varargin{3},'double') && isa(varargin{4},'gtsam.noiseModel.Base') elseif nargin == 4 && isa(varargin{1},'numeric') && isa(varargin{2},'numeric') && isa(varargin{3},'double') && isa(varargin{4},'gtsam.noiseModel.Base')
my_ptr = class_wrapper(64, varargin{1}, varargin{2}, varargin{3}, varargin{4}); my_ptr = class_wrapper(65, varargin{1}, varargin{2}, varargin{3}, varargin{4});
else else
error('Arguments do not match any overload of MyFactorPosePoint2 constructor'); error('Arguments do not match any overload of MyFactorPosePoint2 constructor');
end end
@ -25,7 +25,7 @@ classdef MyFactorPosePoint2 < handle
end end
function delete(obj) function delete(obj)
class_wrapper(65, obj.ptr_MyFactorPosePoint2); class_wrapper(66, obj.ptr_MyFactorPosePoint2);
end end
function display(obj), obj.print(''); end function display(obj), obj.print(''); end
@ -36,7 +36,7 @@ classdef MyFactorPosePoint2 < handle
% PRINT usage: print(string s, KeyFormatter keyFormatter) : returns void % PRINT usage: print(string s, KeyFormatter keyFormatter) : returns void
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 2 && isa(varargin{1},'char') && isa(varargin{2},'gtsam.KeyFormatter') if length(varargin) == 2 && isa(varargin{1},'char') && isa(varargin{2},'gtsam.KeyFormatter')
class_wrapper(66, this, varargin{:}); class_wrapper(67, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function MyFactorPosePoint2.print'); error('Arguments do not match any overload of function MyFactorPosePoint2.print');

View File

@ -12,9 +12,9 @@ classdef MyVector12 < handle
function obj = MyVector12(varargin) function obj = MyVector12(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2}; my_ptr = varargin{2};
class_wrapper(47, my_ptr); class_wrapper(48, my_ptr);
elseif nargin == 0 elseif nargin == 0
my_ptr = class_wrapper(48); my_ptr = class_wrapper(49);
else else
error('Arguments do not match any overload of MyVector12 constructor'); error('Arguments do not match any overload of MyVector12 constructor');
end end
@ -22,7 +22,7 @@ classdef MyVector12 < handle
end end
function delete(obj) function delete(obj)
class_wrapper(49, obj.ptr_MyVector12); class_wrapper(50, obj.ptr_MyVector12);
end end
function display(obj), obj.print(''); end function display(obj), obj.print(''); end

View File

@ -12,9 +12,9 @@ classdef MyVector3 < handle
function obj = MyVector3(varargin) function obj = MyVector3(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2}; my_ptr = varargin{2};
class_wrapper(44, my_ptr); class_wrapper(45, my_ptr);
elseif nargin == 0 elseif nargin == 0
my_ptr = class_wrapper(45); my_ptr = class_wrapper(46);
else else
error('Arguments do not match any overload of MyVector3 constructor'); error('Arguments do not match any overload of MyVector3 constructor');
end end
@ -22,7 +22,7 @@ classdef MyVector3 < handle
end end
function delete(obj) function delete(obj)
class_wrapper(46, obj.ptr_MyVector3); class_wrapper(47, obj.ptr_MyVector3);
end end
function display(obj), obj.print(''); end function display(obj), obj.print(''); end

View File

@ -19,9 +19,9 @@ classdef PrimitiveRefDouble < handle
function obj = PrimitiveRefDouble(varargin) function obj = PrimitiveRefDouble(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2}; my_ptr = varargin{2};
class_wrapper(40, my_ptr); class_wrapper(41, my_ptr);
elseif nargin == 0 elseif nargin == 0
my_ptr = class_wrapper(41); my_ptr = class_wrapper(42);
else else
error('Arguments do not match any overload of PrimitiveRefDouble constructor'); error('Arguments do not match any overload of PrimitiveRefDouble constructor');
end end
@ -29,7 +29,7 @@ classdef PrimitiveRefDouble < handle
end end
function delete(obj) function delete(obj)
class_wrapper(42, obj.ptr_PrimitiveRefDouble); class_wrapper(43, obj.ptr_PrimitiveRefDouble);
end end
function display(obj), obj.print(''); end function display(obj), obj.print(''); end
@ -43,7 +43,7 @@ classdef PrimitiveRefDouble < handle
% BRUTAL usage: Brutal(double t) : returns PrimitiveRefdouble % BRUTAL usage: Brutal(double t) : returns PrimitiveRefdouble
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'double') if length(varargin) == 1 && isa(varargin{1},'double')
varargout{1} = class_wrapper(43, varargin{:}); varargout{1} = class_wrapper(44, varargin{:});
return return
end end

View File

@ -0,0 +1,36 @@
%class ScopedTemplateResult, see Doxygen page for details
%at https://gtsam.org/doxygen/
%
%-------Constructors-------
%ScopedTemplateResult(Result::Value arg)
%
classdef ScopedTemplateResult < handle
properties
ptr_ScopedTemplateResult = 0
end
methods
function obj = ScopedTemplateResult(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2};
template_wrapper(6, my_ptr);
elseif nargin == 1 && isa(varargin{1},'Result::Value')
my_ptr = template_wrapper(7, varargin{1});
else
error('Arguments do not match any overload of ScopedTemplateResult constructor');
end
obj.ptr_ScopedTemplateResult = my_ptr;
end
function delete(obj)
template_wrapper(8, obj.ptr_ScopedTemplateResult);
end
function display(obj), obj.print(''); end
%DISPLAY Calls print on the object
function disp(obj), obj.display; end
%DISP Calls print on the object
end
methods(Static = true)
end
end

View File

@ -0,0 +1,45 @@
%class TemplatedConstructor, see Doxygen page for details
%at https://gtsam.org/doxygen/
%
%-------Constructors-------
%TemplatedConstructor()
%TemplatedConstructor(string arg)
%TemplatedConstructor(int arg)
%TemplatedConstructor(double arg)
%
classdef TemplatedConstructor < handle
properties
ptr_TemplatedConstructor = 0
end
methods
function obj = TemplatedConstructor(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2};
template_wrapper(0, my_ptr);
elseif nargin == 0
my_ptr = template_wrapper(1);
elseif nargin == 1 && isa(varargin{1},'char')
my_ptr = template_wrapper(2, varargin{1});
elseif nargin == 1 && isa(varargin{1},'numeric')
my_ptr = template_wrapper(3, varargin{1});
elseif nargin == 1 && isa(varargin{1},'double')
my_ptr = template_wrapper(4, varargin{1});
else
error('Arguments do not match any overload of TemplatedConstructor constructor');
end
obj.ptr_TemplatedConstructor = my_ptr;
end
function delete(obj)
template_wrapper(5, obj.ptr_TemplatedConstructor);
end
function display(obj), obj.print(''); end
%DISPLAY Calls print on the object
function disp(obj), obj.display; end
%DISP Calls print on the object
end
methods(Static = true)
end
end

View File

@ -40,11 +40,11 @@ classdef Test < handle
function obj = Test(varargin) function obj = Test(varargin)
if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682) if nargin == 2 && isa(varargin{1}, 'uint64') && varargin{1} == uint64(5139824614673773682)
my_ptr = varargin{2}; my_ptr = varargin{2};
class_wrapper(11, my_ptr); class_wrapper(12, my_ptr);
elseif nargin == 0 elseif nargin == 0
my_ptr = class_wrapper(12); my_ptr = class_wrapper(13);
elseif nargin == 2 && isa(varargin{1},'double') && isa(varargin{2},'double') elseif nargin == 2 && isa(varargin{1},'double') && isa(varargin{2},'double')
my_ptr = class_wrapper(13, varargin{1}, varargin{2}); my_ptr = class_wrapper(14, varargin{1}, varargin{2});
else else
error('Arguments do not match any overload of Test constructor'); error('Arguments do not match any overload of Test constructor');
end end
@ -52,7 +52,7 @@ classdef Test < handle
end end
function delete(obj) function delete(obj)
class_wrapper(14, obj.ptr_Test); class_wrapper(15, obj.ptr_Test);
end end
function display(obj), obj.print(''); end function display(obj), obj.print(''); end
@ -63,7 +63,7 @@ classdef Test < handle
% ARG_EIGENCONSTREF usage: arg_EigenConstRef(Matrix value) : returns void % ARG_EIGENCONSTREF usage: arg_EigenConstRef(Matrix value) : returns void
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'double') if length(varargin) == 1 && isa(varargin{1},'double')
class_wrapper(15, this, varargin{:}); class_wrapper(16, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.arg_EigenConstRef'); error('Arguments do not match any overload of function Test.arg_EigenConstRef');
@ -73,7 +73,7 @@ classdef Test < handle
% CREATE_MIXEDPTRS usage: create_MixedPtrs() : returns pair< Test, Test > % CREATE_MIXEDPTRS usage: create_MixedPtrs() : returns pair< Test, Test >
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0 if length(varargin) == 0
[ varargout{1} varargout{2} ] = class_wrapper(16, this, varargin{:}); [ varargout{1} varargout{2} ] = class_wrapper(17, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.create_MixedPtrs'); error('Arguments do not match any overload of function Test.create_MixedPtrs');
@ -83,7 +83,7 @@ classdef Test < handle
% CREATE_PTRS usage: create_ptrs() : returns pair< Test, Test > % CREATE_PTRS usage: create_ptrs() : returns pair< Test, Test >
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0 if length(varargin) == 0
[ varargout{1} varargout{2} ] = class_wrapper(17, this, varargin{:}); [ varargout{1} varargout{2} ] = class_wrapper(18, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.create_ptrs'); error('Arguments do not match any overload of function Test.create_ptrs');
@ -93,7 +93,7 @@ classdef Test < handle
% GET_CONTAINER usage: get_container() : returns std.vectorTest % GET_CONTAINER usage: get_container() : returns std.vectorTest
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0 if length(varargin) == 0
varargout{1} = class_wrapper(18, this, varargin{:}); varargout{1} = class_wrapper(19, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.get_container'); error('Arguments do not match any overload of function Test.get_container');
@ -103,7 +103,7 @@ classdef Test < handle
% LAMBDA usage: lambda() : returns void % LAMBDA usage: lambda() : returns void
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0 if length(varargin) == 0
class_wrapper(19, this, varargin{:}); class_wrapper(20, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.lambda'); error('Arguments do not match any overload of function Test.lambda');
@ -113,7 +113,7 @@ classdef Test < handle
% PRINT usage: print() : returns void % PRINT usage: print() : returns void
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 0 if length(varargin) == 0
class_wrapper(20, this, varargin{:}); class_wrapper(21, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.print'); error('Arguments do not match any overload of function Test.print');
@ -123,7 +123,7 @@ classdef Test < handle
% RETURN_POINT2PTR usage: return_Point2Ptr(bool value) : returns Point2 % RETURN_POINT2PTR usage: return_Point2Ptr(bool value) : returns Point2
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'logical') if length(varargin) == 1 && isa(varargin{1},'logical')
varargout{1} = class_wrapper(21, this, varargin{:}); varargout{1} = class_wrapper(22, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_Point2Ptr'); error('Arguments do not match any overload of function Test.return_Point2Ptr');
@ -133,7 +133,7 @@ classdef Test < handle
% RETURN_TEST usage: return_Test(Test value) : returns Test % RETURN_TEST usage: return_Test(Test value) : returns Test
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'Test') if length(varargin) == 1 && isa(varargin{1},'Test')
varargout{1} = class_wrapper(22, this, varargin{:}); varargout{1} = class_wrapper(23, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_Test'); error('Arguments do not match any overload of function Test.return_Test');
@ -143,7 +143,7 @@ classdef Test < handle
% RETURN_TESTPTR usage: return_TestPtr(Test value) : returns Test % RETURN_TESTPTR usage: return_TestPtr(Test value) : returns Test
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'Test') if length(varargin) == 1 && isa(varargin{1},'Test')
varargout{1} = class_wrapper(23, this, varargin{:}); varargout{1} = class_wrapper(24, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_TestPtr'); error('Arguments do not match any overload of function Test.return_TestPtr');
@ -153,7 +153,7 @@ classdef Test < handle
% RETURN_BOOL usage: return_bool(bool value) : returns bool % RETURN_BOOL usage: return_bool(bool value) : returns bool
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'logical') if length(varargin) == 1 && isa(varargin{1},'logical')
varargout{1} = class_wrapper(24, this, varargin{:}); varargout{1} = class_wrapper(25, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_bool'); error('Arguments do not match any overload of function Test.return_bool');
@ -163,7 +163,7 @@ classdef Test < handle
% RETURN_DOUBLE usage: return_double(double value) : returns double % RETURN_DOUBLE usage: return_double(double value) : returns double
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'double') if length(varargin) == 1 && isa(varargin{1},'double')
varargout{1} = class_wrapper(25, this, varargin{:}); varargout{1} = class_wrapper(26, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_double'); error('Arguments do not match any overload of function Test.return_double');
@ -173,7 +173,7 @@ classdef Test < handle
% RETURN_FIELD usage: return_field(Test t) : returns bool % RETURN_FIELD usage: return_field(Test t) : returns bool
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'Test') if length(varargin) == 1 && isa(varargin{1},'Test')
varargout{1} = class_wrapper(26, this, varargin{:}); varargout{1} = class_wrapper(27, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_field'); error('Arguments do not match any overload of function Test.return_field');
@ -183,7 +183,7 @@ classdef Test < handle
% RETURN_INT usage: return_int(int value) : returns int % RETURN_INT usage: return_int(int value) : returns int
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'numeric') if length(varargin) == 1 && isa(varargin{1},'numeric')
varargout{1} = class_wrapper(27, this, varargin{:}); varargout{1} = class_wrapper(28, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_int'); error('Arguments do not match any overload of function Test.return_int');
@ -193,7 +193,7 @@ classdef Test < handle
% RETURN_MATRIX1 usage: return_matrix1(Matrix value) : returns Matrix % RETURN_MATRIX1 usage: return_matrix1(Matrix value) : returns Matrix
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'double') if length(varargin) == 1 && isa(varargin{1},'double')
varargout{1} = class_wrapper(28, this, varargin{:}); varargout{1} = class_wrapper(29, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_matrix1'); error('Arguments do not match any overload of function Test.return_matrix1');
@ -203,7 +203,7 @@ classdef Test < handle
% RETURN_MATRIX2 usage: return_matrix2(Matrix value) : returns Matrix % RETURN_MATRIX2 usage: return_matrix2(Matrix value) : returns Matrix
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'double') if length(varargin) == 1 && isa(varargin{1},'double')
varargout{1} = class_wrapper(29, this, varargin{:}); varargout{1} = class_wrapper(30, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_matrix2'); error('Arguments do not match any overload of function Test.return_matrix2');
@ -213,13 +213,13 @@ classdef Test < handle
% RETURN_PAIR usage: return_pair(Vector v, Matrix A) : returns pair< Vector, Matrix > % RETURN_PAIR usage: return_pair(Vector v, Matrix A) : returns pair< Vector, Matrix >
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 2 && isa(varargin{1},'double') && size(varargin{1},2)==1 && isa(varargin{2},'double') if length(varargin) == 2 && isa(varargin{1},'double') && size(varargin{1},2)==1 && isa(varargin{2},'double')
[ varargout{1} varargout{2} ] = class_wrapper(30, this, varargin{:}); [ varargout{1} varargout{2} ] = class_wrapper(31, this, varargin{:});
return return
end end
% RETURN_PAIR usage: return_pair(Vector v) : returns pair< Vector, Matrix > % RETURN_PAIR usage: return_pair(Vector v) : returns pair< Vector, Matrix >
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'double') && size(varargin{1},2)==1 if length(varargin) == 1 && isa(varargin{1},'double') && size(varargin{1},2)==1
[ varargout{1} varargout{2} ] = class_wrapper(31, this, varargin{:}); [ varargout{1} varargout{2} ] = class_wrapper(32, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_pair'); error('Arguments do not match any overload of function Test.return_pair');
@ -229,7 +229,7 @@ classdef Test < handle
% RETURN_PTRS usage: return_ptrs(Test p1, Test p2) : returns pair< Test, Test > % RETURN_PTRS usage: return_ptrs(Test p1, Test p2) : returns pair< Test, Test >
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 2 && isa(varargin{1},'Test') && isa(varargin{2},'Test') if length(varargin) == 2 && isa(varargin{1},'Test') && isa(varargin{2},'Test')
[ varargout{1} varargout{2} ] = class_wrapper(32, this, varargin{:}); [ varargout{1} varargout{2} ] = class_wrapper(33, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_ptrs'); error('Arguments do not match any overload of function Test.return_ptrs');
@ -239,7 +239,7 @@ classdef Test < handle
% RETURN_SIZE_T usage: return_size_t(size_t value) : returns size_t % RETURN_SIZE_T usage: return_size_t(size_t value) : returns size_t
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'numeric') if length(varargin) == 1 && isa(varargin{1},'numeric')
varargout{1} = class_wrapper(33, this, varargin{:}); varargout{1} = class_wrapper(34, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_size_t'); error('Arguments do not match any overload of function Test.return_size_t');
@ -249,7 +249,7 @@ classdef Test < handle
% RETURN_STRING usage: return_string(string value) : returns string % RETURN_STRING usage: return_string(string value) : returns string
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'char') if length(varargin) == 1 && isa(varargin{1},'char')
varargout{1} = class_wrapper(34, this, varargin{:}); varargout{1} = class_wrapper(35, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_string'); error('Arguments do not match any overload of function Test.return_string');
@ -259,7 +259,7 @@ classdef Test < handle
% RETURN_VECTOR1 usage: return_vector1(Vector value) : returns Vector % RETURN_VECTOR1 usage: return_vector1(Vector value) : returns Vector
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'double') && size(varargin{1},2)==1 if length(varargin) == 1 && isa(varargin{1},'double') && size(varargin{1},2)==1
varargout{1} = class_wrapper(35, this, varargin{:}); varargout{1} = class_wrapper(36, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_vector1'); error('Arguments do not match any overload of function Test.return_vector1');
@ -269,19 +269,13 @@ classdef Test < handle
% RETURN_VECTOR2 usage: return_vector2(Vector value) : returns Vector % RETURN_VECTOR2 usage: return_vector2(Vector value) : returns Vector
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'double') && size(varargin{1},2)==1 if length(varargin) == 1 && isa(varargin{1},'double') && size(varargin{1},2)==1
varargout{1} = class_wrapper(36, this, varargin{:}); varargout{1} = class_wrapper(37, this, varargin{:});
return return
end end
error('Arguments do not match any overload of function Test.return_vector2'); error('Arguments do not match any overload of function Test.return_vector2');
end end
function varargout = set_container(this, varargin) function varargout = set_container(this, varargin)
% SET_CONTAINER usage: set_container(vector<Test> container) : returns void
% Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'std.vectorTest')
class_wrapper(37, this, varargin{:});
return
end
% SET_CONTAINER usage: set_container(vector<Test> container) : returns void % SET_CONTAINER usage: set_container(vector<Test> container) : returns void
% Doxygen can be found at https://gtsam.org/doxygen/ % Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'std.vectorTest') if length(varargin) == 1 && isa(varargin{1},'std.vectorTest')
@ -294,6 +288,12 @@ classdef Test < handle
class_wrapper(39, this, varargin{:}); class_wrapper(39, this, varargin{:});
return return
end end
% SET_CONTAINER usage: set_container(vector<Test> container) : returns void
% Doxygen can be found at https://gtsam.org/doxygen/
if length(varargin) == 1 && isa(varargin{1},'std.vectorTest')
class_wrapper(40, this, varargin{:});
return
end
error('Arguments do not match any overload of function Test.set_container'); error('Arguments do not match any overload of function Test.set_container');
end end

View File

@ -231,7 +231,14 @@ void FunDouble_multiTemplatedMethod_7(int nargout, mxArray *out[], int nargin, c
out[0] = wrap_shared_ptr(boost::make_shared<Fun<double>>(obj->multiTemplatedMethod<string,size_t>(d,t,u)),"Fun<double>", false); out[0] = wrap_shared_ptr(boost::make_shared<Fun<double>>(obj->multiTemplatedMethod<string,size_t>(d,t,u)),"Fun<double>", false);
} }
void FunDouble_templatedMethod_8(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void FunDouble_sets_8(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{
checkArguments("sets",nargout,nargin-1,0);
auto obj = unwrap_shared_ptr<Fun<double>>(in[0], "ptr_FunDouble");
out[0] = wrap_shared_ptr(boost::make_shared<std::map<double,Fun<double>::double>>(obj->sets()),"std.mapdoubledouble", false);
}
void FunDouble_templatedMethod_9(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("templatedMethodString",nargout,nargin-1,2); checkArguments("templatedMethodString",nargout,nargin-1,2);
auto obj = unwrap_shared_ptr<Fun<double>>(in[0], "ptr_FunDouble"); auto obj = unwrap_shared_ptr<Fun<double>>(in[0], "ptr_FunDouble");
@ -240,20 +247,20 @@ void FunDouble_templatedMethod_8(int nargout, mxArray *out[], int nargin, const
out[0] = wrap_shared_ptr(boost::make_shared<Fun<double>>(obj->templatedMethod<string>(d,t)),"Fun<double>", false); out[0] = wrap_shared_ptr(boost::make_shared<Fun<double>>(obj->templatedMethod<string>(d,t)),"Fun<double>", false);
} }
void FunDouble_staticMethodWithThis_9(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void FunDouble_staticMethodWithThis_10(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("FunDouble.staticMethodWithThis",nargout,nargin,0); checkArguments("Fun<double>.staticMethodWithThis",nargout,nargin,0);
out[0] = wrap_shared_ptr(boost::make_shared<Fun<double>>(Fun<double>::staticMethodWithThis()),"Fundouble", false); out[0] = wrap_shared_ptr(boost::make_shared<Fun<double>>(Fun<double>::staticMethodWithThis()),"Fundouble", false);
} }
void FunDouble_templatedStaticMethodInt_10(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void FunDouble_templatedStaticMethodInt_11(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("FunDouble.templatedStaticMethodInt",nargout,nargin,1); checkArguments("Fun<double>.templatedStaticMethodInt",nargout,nargin,1);
int m = unwrap< int >(in[0]); int m = unwrap< int >(in[0]);
out[0] = wrap< double >(Fun<double>::templatedStaticMethodInt(m)); out[0] = wrap< double >(Fun<double>::templatedStaticMethod(m));
} }
void Test_collectorInsertAndMakeBase_11(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_collectorInsertAndMakeBase_12(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<Test> Shared; typedef boost::shared_ptr<Test> Shared;
@ -262,7 +269,7 @@ void Test_collectorInsertAndMakeBase_11(int nargout, mxArray *out[], int nargin,
collector_Test.insert(self); collector_Test.insert(self);
} }
void Test_constructor_12(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_constructor_13(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<Test> Shared; typedef boost::shared_ptr<Test> Shared;
@ -273,7 +280,7 @@ void Test_constructor_12(int nargout, mxArray *out[], int nargin, const mxArray
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void Test_constructor_13(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_constructor_14(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<Test> Shared; typedef boost::shared_ptr<Test> Shared;
@ -286,7 +293,7 @@ void Test_constructor_13(int nargout, mxArray *out[], int nargin, const mxArray
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void Test_deconstructor_14(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_deconstructor_15(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
typedef boost::shared_ptr<Test> Shared; typedef boost::shared_ptr<Test> Shared;
checkArguments("delete_Test",nargout,nargin,1); checkArguments("delete_Test",nargout,nargin,1);
@ -299,7 +306,7 @@ void Test_deconstructor_14(int nargout, mxArray *out[], int nargin, const mxArra
} }
} }
void Test_arg_EigenConstRef_15(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_arg_EigenConstRef_16(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("arg_EigenConstRef",nargout,nargin-1,1); checkArguments("arg_EigenConstRef",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -307,7 +314,7 @@ void Test_arg_EigenConstRef_15(int nargout, mxArray *out[], int nargin, const mx
obj->arg_EigenConstRef(value); obj->arg_EigenConstRef(value);
} }
void Test_create_MixedPtrs_16(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_create_MixedPtrs_17(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("create_MixedPtrs",nargout,nargin-1,0); checkArguments("create_MixedPtrs",nargout,nargin-1,0);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -316,7 +323,7 @@ void Test_create_MixedPtrs_16(int nargout, mxArray *out[], int nargin, const mxA
out[1] = wrap_shared_ptr(pairResult.second,"Test", false); out[1] = wrap_shared_ptr(pairResult.second,"Test", false);
} }
void Test_create_ptrs_17(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_create_ptrs_18(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("create_ptrs",nargout,nargin-1,0); checkArguments("create_ptrs",nargout,nargin-1,0);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -325,28 +332,28 @@ void Test_create_ptrs_17(int nargout, mxArray *out[], int nargin, const mxArray
out[1] = wrap_shared_ptr(pairResult.second,"Test", false); out[1] = wrap_shared_ptr(pairResult.second,"Test", false);
} }
void Test_get_container_18(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_get_container_19(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("get_container",nargout,nargin-1,0); checkArguments("get_container",nargout,nargin-1,0);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
out[0] = wrap_shared_ptr(boost::make_shared<std::vector<testing::Test>>(obj->get_container()),"std.vectorTest", false); out[0] = wrap_shared_ptr(boost::make_shared<std::vector<testing::Test>>(obj->get_container()),"std.vectorTest", false);
} }
void Test_lambda_19(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_lambda_20(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("lambda",nargout,nargin-1,0); checkArguments("lambda",nargout,nargin-1,0);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
obj->lambda(); obj->lambda();
} }
void Test_print_20(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_print_21(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("print",nargout,nargin-1,0); checkArguments("print",nargout,nargin-1,0);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
obj->print(); obj->print();
} }
void Test_return_Point2Ptr_21(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_Point2Ptr_22(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_Point2Ptr",nargout,nargin-1,1); checkArguments("return_Point2Ptr",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -357,7 +364,7 @@ void Test_return_Point2Ptr_21(int nargout, mxArray *out[], int nargin, const mxA
} }
} }
void Test_return_Test_22(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_Test_23(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_Test",nargout,nargin-1,1); checkArguments("return_Test",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -365,7 +372,7 @@ void Test_return_Test_22(int nargout, mxArray *out[], int nargin, const mxArray
out[0] = wrap_shared_ptr(boost::make_shared<Test>(obj->return_Test(value)),"Test", false); out[0] = wrap_shared_ptr(boost::make_shared<Test>(obj->return_Test(value)),"Test", false);
} }
void Test_return_TestPtr_23(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_TestPtr_24(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_TestPtr",nargout,nargin-1,1); checkArguments("return_TestPtr",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -373,7 +380,7 @@ void Test_return_TestPtr_23(int nargout, mxArray *out[], int nargin, const mxArr
out[0] = wrap_shared_ptr(obj->return_TestPtr(value),"Test", false); out[0] = wrap_shared_ptr(obj->return_TestPtr(value),"Test", false);
} }
void Test_return_bool_24(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_bool_25(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_bool",nargout,nargin-1,1); checkArguments("return_bool",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -381,7 +388,7 @@ void Test_return_bool_24(int nargout, mxArray *out[], int nargin, const mxArray
out[0] = wrap< bool >(obj->return_bool(value)); out[0] = wrap< bool >(obj->return_bool(value));
} }
void Test_return_double_25(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_double_26(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_double",nargout,nargin-1,1); checkArguments("return_double",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -389,7 +396,7 @@ void Test_return_double_25(int nargout, mxArray *out[], int nargin, const mxArra
out[0] = wrap< double >(obj->return_double(value)); out[0] = wrap< double >(obj->return_double(value));
} }
void Test_return_field_26(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_field_27(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_field",nargout,nargin-1,1); checkArguments("return_field",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -397,7 +404,7 @@ void Test_return_field_26(int nargout, mxArray *out[], int nargin, const mxArray
out[0] = wrap< bool >(obj->return_field(t)); out[0] = wrap< bool >(obj->return_field(t));
} }
void Test_return_int_27(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_int_28(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_int",nargout,nargin-1,1); checkArguments("return_int",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -405,7 +412,7 @@ void Test_return_int_27(int nargout, mxArray *out[], int nargin, const mxArray *
out[0] = wrap< int >(obj->return_int(value)); out[0] = wrap< int >(obj->return_int(value));
} }
void Test_return_matrix1_28(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_matrix1_29(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_matrix1",nargout,nargin-1,1); checkArguments("return_matrix1",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -413,7 +420,7 @@ void Test_return_matrix1_28(int nargout, mxArray *out[], int nargin, const mxArr
out[0] = wrap< Matrix >(obj->return_matrix1(value)); out[0] = wrap< Matrix >(obj->return_matrix1(value));
} }
void Test_return_matrix2_29(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_matrix2_30(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_matrix2",nargout,nargin-1,1); checkArguments("return_matrix2",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -421,7 +428,7 @@ void Test_return_matrix2_29(int nargout, mxArray *out[], int nargin, const mxArr
out[0] = wrap< Matrix >(obj->return_matrix2(value)); out[0] = wrap< Matrix >(obj->return_matrix2(value));
} }
void Test_return_pair_30(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_pair_31(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_pair",nargout,nargin-1,2); checkArguments("return_pair",nargout,nargin-1,2);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -432,7 +439,7 @@ void Test_return_pair_30(int nargout, mxArray *out[], int nargin, const mxArray
out[1] = wrap< Matrix >(pairResult.second); out[1] = wrap< Matrix >(pairResult.second);
} }
void Test_return_pair_31(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_pair_32(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_pair",nargout,nargin-1,1); checkArguments("return_pair",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -442,7 +449,7 @@ void Test_return_pair_31(int nargout, mxArray *out[], int nargin, const mxArray
out[1] = wrap< Matrix >(pairResult.second); out[1] = wrap< Matrix >(pairResult.second);
} }
void Test_return_ptrs_32(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_ptrs_33(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_ptrs",nargout,nargin-1,2); checkArguments("return_ptrs",nargout,nargin-1,2);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -453,7 +460,7 @@ void Test_return_ptrs_32(int nargout, mxArray *out[], int nargin, const mxArray
out[1] = wrap_shared_ptr(pairResult.second,"Test", false); out[1] = wrap_shared_ptr(pairResult.second,"Test", false);
} }
void Test_return_size_t_33(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_size_t_34(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_size_t",nargout,nargin-1,1); checkArguments("return_size_t",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -461,7 +468,7 @@ void Test_return_size_t_33(int nargout, mxArray *out[], int nargin, const mxArra
out[0] = wrap< size_t >(obj->return_size_t(value)); out[0] = wrap< size_t >(obj->return_size_t(value));
} }
void Test_return_string_34(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_string_35(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_string",nargout,nargin-1,1); checkArguments("return_string",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -469,7 +476,7 @@ void Test_return_string_34(int nargout, mxArray *out[], int nargin, const mxArra
out[0] = wrap< string >(obj->return_string(value)); out[0] = wrap< string >(obj->return_string(value));
} }
void Test_return_vector1_35(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_vector1_36(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_vector1",nargout,nargin-1,1); checkArguments("return_vector1",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -477,7 +484,7 @@ void Test_return_vector1_35(int nargout, mxArray *out[], int nargin, const mxArr
out[0] = wrap< Vector >(obj->return_vector1(value)); out[0] = wrap< Vector >(obj->return_vector1(value));
} }
void Test_return_vector2_36(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_return_vector2_37(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("return_vector2",nargout,nargin-1,1); checkArguments("return_vector2",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test"); auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
@ -485,14 +492,6 @@ void Test_return_vector2_36(int nargout, mxArray *out[], int nargin, const mxArr
out[0] = wrap< Vector >(obj->return_vector2(value)); out[0] = wrap< Vector >(obj->return_vector2(value));
} }
void Test_set_container_37(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{
checkArguments("set_container",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
boost::shared_ptr<std::vector<testing::Test>> container = unwrap_shared_ptr< std::vector<testing::Test> >(in[1], "ptr_stdvectorTest");
obj->set_container(*container);
}
void Test_set_container_38(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_set_container_38(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("set_container",nargout,nargin-1,1); checkArguments("set_container",nargout,nargin-1,1);
@ -509,7 +508,15 @@ void Test_set_container_39(int nargout, mxArray *out[], int nargin, const mxArra
obj->set_container(*container); obj->set_container(*container);
} }
void PrimitiveRefDouble_collectorInsertAndMakeBase_40(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void Test_set_container_40(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{
checkArguments("set_container",nargout,nargin-1,1);
auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
boost::shared_ptr<std::vector<testing::Test>> container = unwrap_shared_ptr< std::vector<testing::Test> >(in[1], "ptr_stdvectorTest");
obj->set_container(*container);
}
void PrimitiveRefDouble_collectorInsertAndMakeBase_41(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<PrimitiveRef<double>> Shared; typedef boost::shared_ptr<PrimitiveRef<double>> Shared;
@ -518,7 +525,7 @@ void PrimitiveRefDouble_collectorInsertAndMakeBase_40(int nargout, mxArray *out[
collector_PrimitiveRefDouble.insert(self); collector_PrimitiveRefDouble.insert(self);
} }
void PrimitiveRefDouble_constructor_41(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void PrimitiveRefDouble_constructor_42(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<PrimitiveRef<double>> Shared; typedef boost::shared_ptr<PrimitiveRef<double>> Shared;
@ -529,7 +536,7 @@ void PrimitiveRefDouble_constructor_41(int nargout, mxArray *out[], int nargin,
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void PrimitiveRefDouble_deconstructor_42(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void PrimitiveRefDouble_deconstructor_43(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
typedef boost::shared_ptr<PrimitiveRef<double>> Shared; typedef boost::shared_ptr<PrimitiveRef<double>> Shared;
checkArguments("delete_PrimitiveRefDouble",nargout,nargin,1); checkArguments("delete_PrimitiveRefDouble",nargout,nargin,1);
@ -542,14 +549,14 @@ void PrimitiveRefDouble_deconstructor_42(int nargout, mxArray *out[], int nargin
} }
} }
void PrimitiveRefDouble_Brutal_43(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void PrimitiveRefDouble_Brutal_44(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("PrimitiveRefDouble.Brutal",nargout,nargin,1); checkArguments("PrimitiveRef<double>.Brutal",nargout,nargin,1);
double t = unwrap< double >(in[0]); double t = unwrap< double >(in[0]);
out[0] = wrap_shared_ptr(boost::make_shared<PrimitiveRef<double>>(PrimitiveRef<double>::Brutal(t)),"PrimitiveRefdouble", false); out[0] = wrap_shared_ptr(boost::make_shared<PrimitiveRef<double>>(PrimitiveRef<double>::Brutal(t)),"PrimitiveRefdouble", false);
} }
void MyVector3_collectorInsertAndMakeBase_44(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyVector3_collectorInsertAndMakeBase_45(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<MyVector<3>> Shared; typedef boost::shared_ptr<MyVector<3>> Shared;
@ -558,7 +565,7 @@ void MyVector3_collectorInsertAndMakeBase_44(int nargout, mxArray *out[], int na
collector_MyVector3.insert(self); collector_MyVector3.insert(self);
} }
void MyVector3_constructor_45(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyVector3_constructor_46(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<MyVector<3>> Shared; typedef boost::shared_ptr<MyVector<3>> Shared;
@ -569,7 +576,7 @@ void MyVector3_constructor_45(int nargout, mxArray *out[], int nargin, const mxA
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void MyVector3_deconstructor_46(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyVector3_deconstructor_47(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
typedef boost::shared_ptr<MyVector<3>> Shared; typedef boost::shared_ptr<MyVector<3>> Shared;
checkArguments("delete_MyVector3",nargout,nargin,1); checkArguments("delete_MyVector3",nargout,nargin,1);
@ -582,7 +589,7 @@ void MyVector3_deconstructor_46(int nargout, mxArray *out[], int nargin, const m
} }
} }
void MyVector12_collectorInsertAndMakeBase_47(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyVector12_collectorInsertAndMakeBase_48(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<MyVector<12>> Shared; typedef boost::shared_ptr<MyVector<12>> Shared;
@ -591,7 +598,7 @@ void MyVector12_collectorInsertAndMakeBase_47(int nargout, mxArray *out[], int n
collector_MyVector12.insert(self); collector_MyVector12.insert(self);
} }
void MyVector12_constructor_48(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyVector12_constructor_49(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<MyVector<12>> Shared; typedef boost::shared_ptr<MyVector<12>> Shared;
@ -602,7 +609,7 @@ void MyVector12_constructor_48(int nargout, mxArray *out[], int nargin, const mx
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void MyVector12_deconstructor_49(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyVector12_deconstructor_50(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
typedef boost::shared_ptr<MyVector<12>> Shared; typedef boost::shared_ptr<MyVector<12>> Shared;
checkArguments("delete_MyVector12",nargout,nargin,1); checkArguments("delete_MyVector12",nargout,nargin,1);
@ -615,7 +622,7 @@ void MyVector12_deconstructor_49(int nargout, mxArray *out[], int nargin, const
} }
} }
void MultipleTemplatesIntDouble_collectorInsertAndMakeBase_50(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MultipleTemplatesIntDouble_collectorInsertAndMakeBase_51(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<MultipleTemplates<int, double>> Shared; typedef boost::shared_ptr<MultipleTemplates<int, double>> Shared;
@ -624,7 +631,7 @@ void MultipleTemplatesIntDouble_collectorInsertAndMakeBase_50(int nargout, mxArr
collector_MultipleTemplatesIntDouble.insert(self); collector_MultipleTemplatesIntDouble.insert(self);
} }
void MultipleTemplatesIntDouble_deconstructor_51(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MultipleTemplatesIntDouble_deconstructor_52(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
typedef boost::shared_ptr<MultipleTemplates<int, double>> Shared; typedef boost::shared_ptr<MultipleTemplates<int, double>> Shared;
checkArguments("delete_MultipleTemplatesIntDouble",nargout,nargin,1); checkArguments("delete_MultipleTemplatesIntDouble",nargout,nargin,1);
@ -637,7 +644,7 @@ void MultipleTemplatesIntDouble_deconstructor_51(int nargout, mxArray *out[], in
} }
} }
void MultipleTemplatesIntFloat_collectorInsertAndMakeBase_52(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MultipleTemplatesIntFloat_collectorInsertAndMakeBase_53(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<MultipleTemplates<int, float>> Shared; typedef boost::shared_ptr<MultipleTemplates<int, float>> Shared;
@ -646,7 +653,7 @@ void MultipleTemplatesIntFloat_collectorInsertAndMakeBase_52(int nargout, mxArra
collector_MultipleTemplatesIntFloat.insert(self); collector_MultipleTemplatesIntFloat.insert(self);
} }
void MultipleTemplatesIntFloat_deconstructor_53(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MultipleTemplatesIntFloat_deconstructor_54(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
typedef boost::shared_ptr<MultipleTemplates<int, float>> Shared; typedef boost::shared_ptr<MultipleTemplates<int, float>> Shared;
checkArguments("delete_MultipleTemplatesIntFloat",nargout,nargin,1); checkArguments("delete_MultipleTemplatesIntFloat",nargout,nargin,1);
@ -659,7 +666,7 @@ void MultipleTemplatesIntFloat_deconstructor_53(int nargout, mxArray *out[], int
} }
} }
void ForwardKinematics_collectorInsertAndMakeBase_54(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void ForwardKinematics_collectorInsertAndMakeBase_55(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<ForwardKinematics> Shared; typedef boost::shared_ptr<ForwardKinematics> Shared;
@ -668,7 +675,7 @@ void ForwardKinematics_collectorInsertAndMakeBase_54(int nargout, mxArray *out[]
collector_ForwardKinematics.insert(self); collector_ForwardKinematics.insert(self);
} }
void ForwardKinematics_constructor_55(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void ForwardKinematics_constructor_56(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<ForwardKinematics> Shared; typedef boost::shared_ptr<ForwardKinematics> Shared;
@ -684,7 +691,7 @@ void ForwardKinematics_constructor_55(int nargout, mxArray *out[], int nargin, c
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void ForwardKinematics_deconstructor_56(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void ForwardKinematics_deconstructor_57(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
typedef boost::shared_ptr<ForwardKinematics> Shared; typedef boost::shared_ptr<ForwardKinematics> Shared;
checkArguments("delete_ForwardKinematics",nargout,nargin,1); checkArguments("delete_ForwardKinematics",nargout,nargin,1);
@ -697,7 +704,7 @@ void ForwardKinematics_deconstructor_56(int nargout, mxArray *out[], int nargin,
} }
} }
void TemplatedConstructor_collectorInsertAndMakeBase_57(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void TemplatedConstructor_collectorInsertAndMakeBase_58(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<TemplatedConstructor> Shared; typedef boost::shared_ptr<TemplatedConstructor> Shared;
@ -706,7 +713,7 @@ void TemplatedConstructor_collectorInsertAndMakeBase_57(int nargout, mxArray *ou
collector_TemplatedConstructor.insert(self); collector_TemplatedConstructor.insert(self);
} }
void TemplatedConstructor_constructor_58(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void TemplatedConstructor_constructor_59(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<TemplatedConstructor> Shared; typedef boost::shared_ptr<TemplatedConstructor> Shared;
@ -717,7 +724,7 @@ void TemplatedConstructor_constructor_58(int nargout, mxArray *out[], int nargin
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void TemplatedConstructor_constructor_59(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void TemplatedConstructor_constructor_60(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<TemplatedConstructor> Shared; typedef boost::shared_ptr<TemplatedConstructor> Shared;
@ -729,7 +736,7 @@ void TemplatedConstructor_constructor_59(int nargout, mxArray *out[], int nargin
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void TemplatedConstructor_constructor_60(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void TemplatedConstructor_constructor_61(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<TemplatedConstructor> Shared; typedef boost::shared_ptr<TemplatedConstructor> Shared;
@ -741,7 +748,7 @@ void TemplatedConstructor_constructor_60(int nargout, mxArray *out[], int nargin
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void TemplatedConstructor_constructor_61(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void TemplatedConstructor_constructor_62(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<TemplatedConstructor> Shared; typedef boost::shared_ptr<TemplatedConstructor> Shared;
@ -753,7 +760,7 @@ void TemplatedConstructor_constructor_61(int nargout, mxArray *out[], int nargin
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void TemplatedConstructor_deconstructor_62(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void TemplatedConstructor_deconstructor_63(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
typedef boost::shared_ptr<TemplatedConstructor> Shared; typedef boost::shared_ptr<TemplatedConstructor> Shared;
checkArguments("delete_TemplatedConstructor",nargout,nargin,1); checkArguments("delete_TemplatedConstructor",nargout,nargin,1);
@ -766,7 +773,7 @@ void TemplatedConstructor_deconstructor_62(int nargout, mxArray *out[], int narg
} }
} }
void MyFactorPosePoint2_collectorInsertAndMakeBase_63(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyFactorPosePoint2_collectorInsertAndMakeBase_64(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>> Shared; typedef boost::shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>> Shared;
@ -775,7 +782,7 @@ void MyFactorPosePoint2_collectorInsertAndMakeBase_63(int nargout, mxArray *out[
collector_MyFactorPosePoint2.insert(self); collector_MyFactorPosePoint2.insert(self);
} }
void MyFactorPosePoint2_constructor_64(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyFactorPosePoint2_constructor_65(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
mexAtExit(&_deleteAllObjects); mexAtExit(&_deleteAllObjects);
typedef boost::shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>> Shared; typedef boost::shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>> Shared;
@ -790,7 +797,7 @@ void MyFactorPosePoint2_constructor_64(int nargout, mxArray *out[], int nargin,
*reinterpret_cast<Shared**> (mxGetData(out[0])) = self; *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
} }
void MyFactorPosePoint2_deconstructor_65(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyFactorPosePoint2_deconstructor_66(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
typedef boost::shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>> Shared; typedef boost::shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>> Shared;
checkArguments("delete_MyFactorPosePoint2",nargout,nargin,1); checkArguments("delete_MyFactorPosePoint2",nargout,nargin,1);
@ -803,7 +810,7 @@ void MyFactorPosePoint2_deconstructor_65(int nargout, mxArray *out[], int nargin
} }
} }
void MyFactorPosePoint2_print_66(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyFactorPosePoint2_print_67(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("print",nargout,nargin-1,2); checkArguments("print",nargout,nargin-1,2);
auto obj = unwrap_shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>>(in[0], "ptr_MyFactorPosePoint2"); auto obj = unwrap_shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>>(in[0], "ptr_MyFactorPosePoint2");
@ -849,94 +856,94 @@ void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
FunDouble_multiTemplatedMethod_7(nargout, out, nargin-1, in+1); FunDouble_multiTemplatedMethod_7(nargout, out, nargin-1, in+1);
break; break;
case 8: case 8:
FunDouble_templatedMethod_8(nargout, out, nargin-1, in+1); FunDouble_sets_8(nargout, out, nargin-1, in+1);
break; break;
case 9: case 9:
FunDouble_staticMethodWithThis_9(nargout, out, nargin-1, in+1); FunDouble_templatedMethod_9(nargout, out, nargin-1, in+1);
break; break;
case 10: case 10:
FunDouble_templatedStaticMethodInt_10(nargout, out, nargin-1, in+1); FunDouble_staticMethodWithThis_10(nargout, out, nargin-1, in+1);
break; break;
case 11: case 11:
Test_collectorInsertAndMakeBase_11(nargout, out, nargin-1, in+1); FunDouble_templatedStaticMethodInt_11(nargout, out, nargin-1, in+1);
break; break;
case 12: case 12:
Test_constructor_12(nargout, out, nargin-1, in+1); Test_collectorInsertAndMakeBase_12(nargout, out, nargin-1, in+1);
break; break;
case 13: case 13:
Test_constructor_13(nargout, out, nargin-1, in+1); Test_constructor_13(nargout, out, nargin-1, in+1);
break; break;
case 14: case 14:
Test_deconstructor_14(nargout, out, nargin-1, in+1); Test_constructor_14(nargout, out, nargin-1, in+1);
break; break;
case 15: case 15:
Test_arg_EigenConstRef_15(nargout, out, nargin-1, in+1); Test_deconstructor_15(nargout, out, nargin-1, in+1);
break; break;
case 16: case 16:
Test_create_MixedPtrs_16(nargout, out, nargin-1, in+1); Test_arg_EigenConstRef_16(nargout, out, nargin-1, in+1);
break; break;
case 17: case 17:
Test_create_ptrs_17(nargout, out, nargin-1, in+1); Test_create_MixedPtrs_17(nargout, out, nargin-1, in+1);
break; break;
case 18: case 18:
Test_get_container_18(nargout, out, nargin-1, in+1); Test_create_ptrs_18(nargout, out, nargin-1, in+1);
break; break;
case 19: case 19:
Test_lambda_19(nargout, out, nargin-1, in+1); Test_get_container_19(nargout, out, nargin-1, in+1);
break; break;
case 20: case 20:
Test_print_20(nargout, out, nargin-1, in+1); Test_lambda_20(nargout, out, nargin-1, in+1);
break; break;
case 21: case 21:
Test_return_Point2Ptr_21(nargout, out, nargin-1, in+1); Test_print_21(nargout, out, nargin-1, in+1);
break; break;
case 22: case 22:
Test_return_Test_22(nargout, out, nargin-1, in+1); Test_return_Point2Ptr_22(nargout, out, nargin-1, in+1);
break; break;
case 23: case 23:
Test_return_TestPtr_23(nargout, out, nargin-1, in+1); Test_return_Test_23(nargout, out, nargin-1, in+1);
break; break;
case 24: case 24:
Test_return_bool_24(nargout, out, nargin-1, in+1); Test_return_TestPtr_24(nargout, out, nargin-1, in+1);
break; break;
case 25: case 25:
Test_return_double_25(nargout, out, nargin-1, in+1); Test_return_bool_25(nargout, out, nargin-1, in+1);
break; break;
case 26: case 26:
Test_return_field_26(nargout, out, nargin-1, in+1); Test_return_double_26(nargout, out, nargin-1, in+1);
break; break;
case 27: case 27:
Test_return_int_27(nargout, out, nargin-1, in+1); Test_return_field_27(nargout, out, nargin-1, in+1);
break; break;
case 28: case 28:
Test_return_matrix1_28(nargout, out, nargin-1, in+1); Test_return_int_28(nargout, out, nargin-1, in+1);
break; break;
case 29: case 29:
Test_return_matrix2_29(nargout, out, nargin-1, in+1); Test_return_matrix1_29(nargout, out, nargin-1, in+1);
break; break;
case 30: case 30:
Test_return_pair_30(nargout, out, nargin-1, in+1); Test_return_matrix2_30(nargout, out, nargin-1, in+1);
break; break;
case 31: case 31:
Test_return_pair_31(nargout, out, nargin-1, in+1); Test_return_pair_31(nargout, out, nargin-1, in+1);
break; break;
case 32: case 32:
Test_return_ptrs_32(nargout, out, nargin-1, in+1); Test_return_pair_32(nargout, out, nargin-1, in+1);
break; break;
case 33: case 33:
Test_return_size_t_33(nargout, out, nargin-1, in+1); Test_return_ptrs_33(nargout, out, nargin-1, in+1);
break; break;
case 34: case 34:
Test_return_string_34(nargout, out, nargin-1, in+1); Test_return_size_t_34(nargout, out, nargin-1, in+1);
break; break;
case 35: case 35:
Test_return_vector1_35(nargout, out, nargin-1, in+1); Test_return_string_35(nargout, out, nargin-1, in+1);
break; break;
case 36: case 36:
Test_return_vector2_36(nargout, out, nargin-1, in+1); Test_return_vector1_36(nargout, out, nargin-1, in+1);
break; break;
case 37: case 37:
Test_set_container_37(nargout, out, nargin-1, in+1); Test_return_vector2_37(nargout, out, nargin-1, in+1);
break; break;
case 38: case 38:
Test_set_container_38(nargout, out, nargin-1, in+1); Test_set_container_38(nargout, out, nargin-1, in+1);
@ -945,61 +952,61 @@ void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Test_set_container_39(nargout, out, nargin-1, in+1); Test_set_container_39(nargout, out, nargin-1, in+1);
break; break;
case 40: case 40:
PrimitiveRefDouble_collectorInsertAndMakeBase_40(nargout, out, nargin-1, in+1); Test_set_container_40(nargout, out, nargin-1, in+1);
break; break;
case 41: case 41:
PrimitiveRefDouble_constructor_41(nargout, out, nargin-1, in+1); PrimitiveRefDouble_collectorInsertAndMakeBase_41(nargout, out, nargin-1, in+1);
break; break;
case 42: case 42:
PrimitiveRefDouble_deconstructor_42(nargout, out, nargin-1, in+1); PrimitiveRefDouble_constructor_42(nargout, out, nargin-1, in+1);
break; break;
case 43: case 43:
PrimitiveRefDouble_Brutal_43(nargout, out, nargin-1, in+1); PrimitiveRefDouble_deconstructor_43(nargout, out, nargin-1, in+1);
break; break;
case 44: case 44:
MyVector3_collectorInsertAndMakeBase_44(nargout, out, nargin-1, in+1); PrimitiveRefDouble_Brutal_44(nargout, out, nargin-1, in+1);
break; break;
case 45: case 45:
MyVector3_constructor_45(nargout, out, nargin-1, in+1); MyVector3_collectorInsertAndMakeBase_45(nargout, out, nargin-1, in+1);
break; break;
case 46: case 46:
MyVector3_deconstructor_46(nargout, out, nargin-1, in+1); MyVector3_constructor_46(nargout, out, nargin-1, in+1);
break; break;
case 47: case 47:
MyVector12_collectorInsertAndMakeBase_47(nargout, out, nargin-1, in+1); MyVector3_deconstructor_47(nargout, out, nargin-1, in+1);
break; break;
case 48: case 48:
MyVector12_constructor_48(nargout, out, nargin-1, in+1); MyVector12_collectorInsertAndMakeBase_48(nargout, out, nargin-1, in+1);
break; break;
case 49: case 49:
MyVector12_deconstructor_49(nargout, out, nargin-1, in+1); MyVector12_constructor_49(nargout, out, nargin-1, in+1);
break; break;
case 50: case 50:
MultipleTemplatesIntDouble_collectorInsertAndMakeBase_50(nargout, out, nargin-1, in+1); MyVector12_deconstructor_50(nargout, out, nargin-1, in+1);
break; break;
case 51: case 51:
MultipleTemplatesIntDouble_deconstructor_51(nargout, out, nargin-1, in+1); MultipleTemplatesIntDouble_collectorInsertAndMakeBase_51(nargout, out, nargin-1, in+1);
break; break;
case 52: case 52:
MultipleTemplatesIntFloat_collectorInsertAndMakeBase_52(nargout, out, nargin-1, in+1); MultipleTemplatesIntDouble_deconstructor_52(nargout, out, nargin-1, in+1);
break; break;
case 53: case 53:
MultipleTemplatesIntFloat_deconstructor_53(nargout, out, nargin-1, in+1); MultipleTemplatesIntFloat_collectorInsertAndMakeBase_53(nargout, out, nargin-1, in+1);
break; break;
case 54: case 54:
ForwardKinematics_collectorInsertAndMakeBase_54(nargout, out, nargin-1, in+1); MultipleTemplatesIntFloat_deconstructor_54(nargout, out, nargin-1, in+1);
break; break;
case 55: case 55:
ForwardKinematics_constructor_55(nargout, out, nargin-1, in+1); ForwardKinematics_collectorInsertAndMakeBase_55(nargout, out, nargin-1, in+1);
break; break;
case 56: case 56:
ForwardKinematics_deconstructor_56(nargout, out, nargin-1, in+1); ForwardKinematics_constructor_56(nargout, out, nargin-1, in+1);
break; break;
case 57: case 57:
TemplatedConstructor_collectorInsertAndMakeBase_57(nargout, out, nargin-1, in+1); ForwardKinematics_deconstructor_57(nargout, out, nargin-1, in+1);
break; break;
case 58: case 58:
TemplatedConstructor_constructor_58(nargout, out, nargin-1, in+1); TemplatedConstructor_collectorInsertAndMakeBase_58(nargout, out, nargin-1, in+1);
break; break;
case 59: case 59:
TemplatedConstructor_constructor_59(nargout, out, nargin-1, in+1); TemplatedConstructor_constructor_59(nargout, out, nargin-1, in+1);
@ -1011,19 +1018,22 @@ void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
TemplatedConstructor_constructor_61(nargout, out, nargin-1, in+1); TemplatedConstructor_constructor_61(nargout, out, nargin-1, in+1);
break; break;
case 62: case 62:
TemplatedConstructor_deconstructor_62(nargout, out, nargin-1, in+1); TemplatedConstructor_constructor_62(nargout, out, nargin-1, in+1);
break; break;
case 63: case 63:
MyFactorPosePoint2_collectorInsertAndMakeBase_63(nargout, out, nargin-1, in+1); TemplatedConstructor_deconstructor_63(nargout, out, nargin-1, in+1);
break; break;
case 64: case 64:
MyFactorPosePoint2_constructor_64(nargout, out, nargin-1, in+1); MyFactorPosePoint2_collectorInsertAndMakeBase_64(nargout, out, nargin-1, in+1);
break; break;
case 65: case 65:
MyFactorPosePoint2_deconstructor_65(nargout, out, nargin-1, in+1); MyFactorPosePoint2_constructor_65(nargout, out, nargin-1, in+1);
break; break;
case 66: case 66:
MyFactorPosePoint2_print_66(nargout, out, nargin-1, in+1); MyFactorPosePoint2_deconstructor_66(nargout, out, nargin-1, in+1);
break;
case 67:
MyFactorPosePoint2_print_67(nargout, out, nargin-1, in+1);
break; break;
} }
} catch(const std::exception& e) { } catch(const std::exception& e) {

View File

@ -286,14 +286,14 @@ void gtsamPoint3_string_serialize_22(int nargout, mxArray *out[], int nargin, co
} }
void gtsamPoint3_StaticFunctionRet_23(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void gtsamPoint3_StaticFunctionRet_23(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("gtsamPoint3.StaticFunctionRet",nargout,nargin,1); checkArguments("gtsam::Point3.StaticFunctionRet",nargout,nargin,1);
double z = unwrap< double >(in[0]); double z = unwrap< double >(in[0]);
out[0] = wrap< Point3 >(gtsam::Point3::StaticFunctionRet(z)); out[0] = wrap< Point3 >(gtsam::Point3::StaticFunctionRet(z));
} }
void gtsamPoint3_staticFunction_24(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void gtsamPoint3_staticFunction_24(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("gtsamPoint3.staticFunction",nargout,nargin,0); checkArguments("gtsam::Point3.staticFunction",nargout,nargin,0);
out[0] = wrap< double >(gtsam::Point3::staticFunction()); out[0] = wrap< double >(gtsam::Point3::staticFunction());
} }

View File

@ -289,7 +289,7 @@ void MyTemplatePoint2_templatedMethod_17(int nargout, mxArray *out[], int nargin
void MyTemplatePoint2_Level_18(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyTemplatePoint2_Level_18(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("MyTemplatePoint2.Level",nargout,nargin,1); checkArguments("MyTemplate<gtsam::Point2>.Level",nargout,nargin,1);
Point2 K = unwrap< Point2 >(in[0]); Point2 K = unwrap< Point2 >(in[0]);
out[0] = wrap_shared_ptr(boost::make_shared<MyTemplate<Point2>>(MyTemplate<gtsam::Point2>::Level(K)),"MyTemplatePoint2", false); out[0] = wrap_shared_ptr(boost::make_shared<MyTemplate<Point2>>(MyTemplate<gtsam::Point2>::Level(K)),"MyTemplatePoint2", false);
} }
@ -457,7 +457,7 @@ void MyTemplateMatrix_templatedMethod_33(int nargout, mxArray *out[], int nargin
void MyTemplateMatrix_Level_34(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void MyTemplateMatrix_Level_34(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("MyTemplateMatrix.Level",nargout,nargin,1); checkArguments("MyTemplate<gtsam::Matrix>.Level",nargout,nargin,1);
Matrix K = unwrap< Matrix >(in[0]); Matrix K = unwrap< Matrix >(in[0]);
out[0] = wrap_shared_ptr(boost::make_shared<MyTemplate<Matrix>>(MyTemplate<gtsam::Matrix>::Level(K)),"MyTemplateMatrix", false); out[0] = wrap_shared_ptr(boost::make_shared<MyTemplate<Matrix>>(MyTemplate<gtsam::Matrix>::Level(K)),"MyTemplateMatrix", false);
} }

View File

@ -248,7 +248,7 @@ void ns2ClassA_nsReturn_12(int nargout, mxArray *out[], int nargin, const mxArra
void ns2ClassA_afunction_13(int nargout, mxArray *out[], int nargin, const mxArray *in[]) void ns2ClassA_afunction_13(int nargout, mxArray *out[], int nargin, const mxArray *in[])
{ {
checkArguments("ns2ClassA.afunction",nargout,nargin,0); checkArguments("ns2::ClassA.afunction",nargout,nargin,0);
out[0] = wrap< double >(ns2::ClassA::afunction()); out[0] = wrap< double >(ns2::ClassA::afunction());
} }

View File

@ -0,0 +1,6 @@
function varargout = setPose(varargin)
if length(varargin) == 1 && isa(varargin{1},'gtsam.Pose3')
functions_wrapper(13, varargin{:});
else
error('Arguments do not match any overload of function setPose');
end

View File

@ -31,6 +31,7 @@ PYBIND11_MODULE(class_py, m_) {
py::class_<Fun<double>, std::shared_ptr<Fun<double>>>(m_, "FunDouble") py::class_<Fun<double>, std::shared_ptr<Fun<double>>>(m_, "FunDouble")
.def("templatedMethodString",[](Fun<double>* self, double d, string t){return self->templatedMethod<string>(d, t);}, py::arg("d"), py::arg("t")) .def("templatedMethodString",[](Fun<double>* self, double d, string t){return self->templatedMethod<string>(d, t);}, py::arg("d"), py::arg("t"))
.def("multiTemplatedMethodStringSize_t",[](Fun<double>* self, double d, string t, size_t u){return self->multiTemplatedMethod<string,size_t>(d, t, u);}, py::arg("d"), py::arg("t"), py::arg("u")) .def("multiTemplatedMethodStringSize_t",[](Fun<double>* self, double d, string t, size_t u){return self->multiTemplatedMethod<string,size_t>(d, t, u);}, py::arg("d"), py::arg("t"), py::arg("u"))
.def("sets",[](Fun<double>* self){return self->sets();})
.def_static("staticMethodWithThis",[](){return Fun<double>::staticMethodWithThis();}) .def_static("staticMethodWithThis",[](){return Fun<double>::staticMethodWithThis();})
.def_static("templatedStaticMethodInt",[](const int& m){return Fun<double>::templatedStaticMethod<int>(m);}, py::arg("m")); .def_static("templatedStaticMethodInt",[](const int& m){return Fun<double>::templatedStaticMethod<int>(m);}, py::arg("m"));

View File

@ -18,6 +18,8 @@ class Fun {
template<T={string}, U={size_t}> template<T={string}, U={size_t}>
This multiTemplatedMethod(double d, T t, U u); This multiTemplatedMethod(double d, T t, U u);
std::map<M, This::M> sets();
}; };

View File

@ -92,10 +92,19 @@ class TestWrap(unittest.TestCase):
wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR) wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR)
files = [ files = [
'functions_wrapper.cpp', 'aGlobalFunction.m', 'load2D.m', 'functions_wrapper.cpp',
'aGlobalFunction.m',
'load2D.m',
'MultiTemplatedFunctionDoubleSize_tDouble.m', 'MultiTemplatedFunctionDoubleSize_tDouble.m',
'MultiTemplatedFunctionStringSize_tDouble.m', 'MultiTemplatedFunctionStringSize_tDouble.m',
'overloadedGlobalFunction.m', 'TemplatedFunctionRot3.m' 'overloadedGlobalFunction.m',
'TemplatedFunctionRot3.m',
'DefaultFuncInt.m',
'DefaultFuncObj.m',
'DefaultFuncString.m',
'DefaultFuncVector.m',
'DefaultFuncZero.m',
'setPose.m',
] ]
for file in files: for file in files:
@ -115,10 +124,17 @@ class TestWrap(unittest.TestCase):
wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR) wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR)
files = [ files = [
'class_wrapper.cpp', 'FunDouble.m', 'FunRange.m', 'class_wrapper.cpp',
'MultipleTemplatesIntDouble.m', 'MultipleTemplatesIntFloat.m', 'FunDouble.m',
'MyFactorPosePoint2.m', 'MyVector3.m', 'MyVector12.m', 'FunRange.m',
'PrimitiveRefDouble.m', 'Test.m' 'MultipleTemplatesIntDouble.m',
'MultipleTemplatesIntFloat.m',
'MyFactorPosePoint2.m',
'MyVector3.m',
'MyVector12.m',
'PrimitiveRefDouble.m',
'Test.m',
'ForwardKinematics.m',
] ]
for file in files: for file in files:
@ -137,7 +153,10 @@ class TestWrap(unittest.TestCase):
wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR) wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR)
files = ['template_wrapper.cpp'] files = [
'template_wrapper.cpp', 'ScopedTemplateResult.m',
'TemplatedConstructor.m'
]
for file in files: for file in files:
actual = osp.join(self.MATLAB_ACTUAL_DIR, file) actual = osp.join(self.MATLAB_ACTUAL_DIR, file)
@ -155,8 +174,11 @@ class TestWrap(unittest.TestCase):
wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR) wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR)
files = [ files = [
'inheritance_wrapper.cpp', 'MyBase.m', 'MyTemplateMatrix.m', 'inheritance_wrapper.cpp',
'MyTemplatePoint2.m' 'MyBase.m',
'MyTemplateMatrix.m',
'MyTemplatePoint2.m',
'ForwardKinematicsFactor.m',
] ]
for file in files: for file in files:
@ -178,10 +200,17 @@ class TestWrap(unittest.TestCase):
wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR) wrapper.wrap([file], path=self.MATLAB_ACTUAL_DIR)
files = [ files = [
'namespaces_wrapper.cpp', '+ns1/aGlobalFunction.m', 'namespaces_wrapper.cpp',
'+ns1/ClassA.m', '+ns1/ClassB.m', '+ns2/+ns3/ClassB.m', '+ns1/aGlobalFunction.m',
'+ns2/aGlobalFunction.m', '+ns2/ClassA.m', '+ns2/ClassC.m', '+ns1/ClassA.m',
'+ns2/overloadedGlobalFunction.m', 'ClassD.m' '+ns1/ClassB.m',
'+ns2/+ns3/ClassB.m',
'+ns2/aGlobalFunction.m',
'+ns2/ClassA.m',
'+ns2/ClassC.m',
'+ns2/overloadedGlobalFunction.m',
'ClassD.m',
'+gtsam/Values.m',
] ]
for file in files: for file in files:
@ -203,8 +232,10 @@ class TestWrap(unittest.TestCase):
files = [ files = [
'special_cases_wrapper.cpp', 'special_cases_wrapper.cpp',
'+gtsam/PinholeCameraCal3Bundler.m', '+gtsam/GeneralSFMFactorCal3Bundler.m',
'+gtsam/NonlinearFactorGraph.m', '+gtsam/NonlinearFactorGraph.m',
'+gtsam/PinholeCameraCal3Bundler.m',
'+gtsam/SfmTrack.m',
] ]
for file in files: for file in files: