class_wrapper.cpp
Go to the documentation of this file.
1 #include <gtwrap/matlab.h>
2 #include <map>
3 
4 #include <folder/path/to/Test.h>
5 
6 typedef Fun<double> FunDouble;
7 typedef PrimitiveRef<double> PrimitiveRefDouble;
8 typedef MyVector<3> MyVector3;
9 typedef MyVector<12> MyVector12;
10 typedef MultipleTemplates<int, double> MultipleTemplatesIntDouble;
11 typedef MultipleTemplates<int, float> MultipleTemplatesIntFloat;
13 
14 typedef std::set<std::shared_ptr<FunRange>*> Collector_FunRange;
16 typedef std::set<std::shared_ptr<FunDouble>*> Collector_FunDouble;
18 typedef std::set<std::shared_ptr<Test>*> Collector_Test;
20 typedef std::set<std::shared_ptr<PrimitiveRefDouble>*> Collector_PrimitiveRefDouble;
22 typedef std::set<std::shared_ptr<MyVector3>*> Collector_MyVector3;
24 typedef std::set<std::shared_ptr<MyVector12>*> Collector_MyVector12;
26 typedef std::set<std::shared_ptr<MultipleTemplatesIntDouble>*> Collector_MultipleTemplatesIntDouble;
28 typedef std::set<std::shared_ptr<MultipleTemplatesIntFloat>*> Collector_MultipleTemplatesIntFloat;
30 typedef std::set<std::shared_ptr<ForwardKinematics>*> Collector_ForwardKinematics;
32 typedef std::set<std::shared_ptr<TemplatedConstructor>*> Collector_TemplatedConstructor;
34 typedef std::set<std::shared_ptr<MyFactorPosePoint2>*> Collector_MyFactorPosePoint2;
36 
37 
39 {
40  mstream mout;
41  std::streambuf *outbuf = std::cout.rdbuf(&mout);
42 
43  bool anyDeleted = false;
44  { for(Collector_FunRange::iterator iter = collector_FunRange.begin();
45  iter != collector_FunRange.end(); ) {
46  delete *iter;
47  collector_FunRange.erase(iter++);
48  anyDeleted = true;
49  } }
50  { for(Collector_FunDouble::iterator iter = collector_FunDouble.begin();
51  iter != collector_FunDouble.end(); ) {
52  delete *iter;
53  collector_FunDouble.erase(iter++);
54  anyDeleted = true;
55  } }
56  { for(Collector_Test::iterator iter = collector_Test.begin();
57  iter != collector_Test.end(); ) {
58  delete *iter;
59  collector_Test.erase(iter++);
60  anyDeleted = true;
61  } }
62  { for(Collector_PrimitiveRefDouble::iterator iter = collector_PrimitiveRefDouble.begin();
64  delete *iter;
66  anyDeleted = true;
67  } }
68  { for(Collector_MyVector3::iterator iter = collector_MyVector3.begin();
69  iter != collector_MyVector3.end(); ) {
70  delete *iter;
71  collector_MyVector3.erase(iter++);
72  anyDeleted = true;
73  } }
74  { for(Collector_MyVector12::iterator iter = collector_MyVector12.begin();
75  iter != collector_MyVector12.end(); ) {
76  delete *iter;
77  collector_MyVector12.erase(iter++);
78  anyDeleted = true;
79  } }
80  { for(Collector_MultipleTemplatesIntDouble::iterator iter = collector_MultipleTemplatesIntDouble.begin();
82  delete *iter;
84  anyDeleted = true;
85  } }
86  { for(Collector_MultipleTemplatesIntFloat::iterator iter = collector_MultipleTemplatesIntFloat.begin();
88  delete *iter;
90  anyDeleted = true;
91  } }
92  { for(Collector_ForwardKinematics::iterator iter = collector_ForwardKinematics.begin();
93  iter != collector_ForwardKinematics.end(); ) {
94  delete *iter;
96  anyDeleted = true;
97  } }
98  { for(Collector_TemplatedConstructor::iterator iter = collector_TemplatedConstructor.begin();
100  delete *iter;
102  anyDeleted = true;
103  } }
104  { for(Collector_MyFactorPosePoint2::iterator iter = collector_MyFactorPosePoint2.begin();
105  iter != collector_MyFactorPosePoint2.end(); ) {
106  delete *iter;
108  anyDeleted = true;
109  } }
110 
111  if(anyDeleted)
112  cout <<
113  "WARNING: Wrap modules with variables in the workspace have been reloaded due to\n"
114  "calling destructors, call 'clear all' again if you plan to now recompile a wrap\n"
115  "module, so that your recompiled module is used instead of the old one." << endl;
116  std::cout.rdbuf(outbuf);
117 }
118 
120  const mxArray *alreadyCreated = mexGetVariablePtr("global", "gtsam_class_rttiRegistry_created");
121  if(!alreadyCreated) {
122  std::map<std::string, std::string> types;
123 
124 
125 
126  mxArray *registry = mexGetVariable("global", "gtsamwrap_rttiRegistry");
127  if(!registry)
128  registry = mxCreateStructMatrix(1, 1, 0, NULL);
129  typedef std::pair<std::string, std::string> StringPair;
130  for(const StringPair& rtti_matlab: types) {
131  int fieldId = mxAddField(registry, rtti_matlab.first.c_str());
132  if(fieldId < 0) {
133  mexErrMsgTxt("gtsam wrap: Error indexing RTTI types, inheritance will not work correctly");
134  }
135  mxArray *matlabName = mxCreateString(rtti_matlab.second.c_str());
136  mxSetFieldByNumber(registry, 0, fieldId, matlabName);
137  }
138  if(mexPutVariable("global", "gtsamwrap_rttiRegistry", registry) != 0) {
139  mexErrMsgTxt("gtsam wrap: Error indexing RTTI types, inheritance will not work correctly");
140  }
141  mxDestroyArray(registry);
142 
143  mxArray *newAlreadyCreated = mxCreateNumericMatrix(0, 0, mxINT8_CLASS, mxREAL);
144  if(mexPutVariable("global", "gtsam_class_rttiRegistry_created", newAlreadyCreated) != 0) {
145  mexErrMsgTxt("gtsam wrap: Error indexing RTTI types, inheritance will not work correctly");
146  }
147  mxDestroyArray(newAlreadyCreated);
148  }
149 }
150 
151 void FunRange_collectorInsertAndMakeBase_0(int nargout, mxArray *out[], int nargin, const mxArray *in[])
152 {
153  mexAtExit(&_deleteAllObjects);
154  typedef std::shared_ptr<FunRange> Shared;
155 
156  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
157  collector_FunRange.insert(self);
158 }
159 
160 void FunRange_constructor_1(int nargout, mxArray *out[], int nargin, const mxArray *in[])
161 {
162  mexAtExit(&_deleteAllObjects);
163  typedef std::shared_ptr<FunRange> Shared;
164 
165  Shared *self = new Shared(new FunRange());
166  collector_FunRange.insert(self);
167  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
168  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
169 }
170 
171 void FunRange_deconstructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[])
172 {
173  typedef std::shared_ptr<FunRange> Shared;
174  checkArguments("delete_FunRange",nargout,nargin,1);
175  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
176  Collector_FunRange::iterator item;
177  item = collector_FunRange.find(self);
178  if(item != collector_FunRange.end()) {
179  collector_FunRange.erase(item);
180  }
181  delete self;
182 }
183 
184 void FunRange_range_3(int nargout, mxArray *out[], int nargin, const mxArray *in[])
185 {
186  checkArguments("range",nargout,nargin-1,1);
187  auto obj = unwrap_shared_ptr<FunRange>(in[0], "ptr_FunRange");
188  double d = unwrap< double >(in[1]);
189  out[0] = wrap_shared_ptr(std::make_shared<FunRange>(obj->range(d)),"FunRange", false);
190 }
191 
192 void FunRange_create_4(int nargout, mxArray *out[], int nargin, const mxArray *in[])
193 {
194  checkArguments("FunRange.create",nargout,nargin,0);
195  out[0] = wrap_shared_ptr(std::make_shared<FunRange>(FunRange::create()),"FunRange", false);
196 }
197 
198 void FunDouble_collectorInsertAndMakeBase_5(int nargout, mxArray *out[], int nargin, const mxArray *in[])
199 {
200  mexAtExit(&_deleteAllObjects);
201  typedef std::shared_ptr<Fun<double>> Shared;
202 
203  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
204  collector_FunDouble.insert(self);
205 }
206 
207 void FunDouble_deconstructor_6(int nargout, mxArray *out[], int nargin, const mxArray *in[])
208 {
209  typedef std::shared_ptr<Fun<double>> Shared;
210  checkArguments("delete_FunDouble",nargout,nargin,1);
211  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
212  Collector_FunDouble::iterator item;
213  item = collector_FunDouble.find(self);
214  if(item != collector_FunDouble.end()) {
215  collector_FunDouble.erase(item);
216  }
217  delete self;
218 }
219 
220 void FunDouble_multiTemplatedMethod_7(int nargout, mxArray *out[], int nargin, const mxArray *in[])
221 {
222  checkArguments("multiTemplatedMethodStringSize_t",nargout,nargin-1,3);
223  auto obj = unwrap_shared_ptr<Fun<double>>(in[0], "ptr_FunDouble");
224  double d = unwrap< double >(in[1]);
225  string t = unwrap< string >(in[2]);
226  size_t u = unwrap< size_t >(in[3]);
227  out[0] = wrap_shared_ptr(std::make_shared<Fun<double>>(obj->multiTemplatedMethod<string,size_t>(d,t,u)),"Fun<double>", false);
228 }
229 
230 void FunDouble_sets_8(int nargout, mxArray *out[], int nargin, const mxArray *in[])
231 {
232  checkArguments("sets",nargout,nargin-1,0);
233  auto obj = unwrap_shared_ptr<Fun<double>>(in[0], "ptr_FunDouble");
234  out[0] = wrap_shared_ptr(std::make_shared<std::map<double,Fun<double>::double>>(obj->sets()),"std.mapdoubledouble", false);
235 }
236 
237 void FunDouble_templatedMethod_9(int nargout, mxArray *out[], int nargin, const mxArray *in[])
238 {
239  checkArguments("templatedMethodString",nargout,nargin-1,2);
240  auto obj = unwrap_shared_ptr<Fun<double>>(in[0], "ptr_FunDouble");
241  double d = unwrap< double >(in[1]);
242  string t = unwrap< string >(in[2]);
243  out[0] = wrap_shared_ptr(std::make_shared<Fun<double>>(obj->templatedMethod<string>(d,t)),"Fun<double>", false);
244 }
245 
246 void FunDouble_staticMethodWithThis_10(int nargout, mxArray *out[], int nargin, const mxArray *in[])
247 {
248  checkArguments("Fun<double>.staticMethodWithThis",nargout,nargin,0);
249  out[0] = wrap_shared_ptr(std::make_shared<Fun<double>>(Fun<double>::staticMethodWithThis()),"Fundouble", false);
250 }
251 
252 void FunDouble_templatedStaticMethodInt_11(int nargout, mxArray *out[], int nargin, const mxArray *in[])
253 {
254  checkArguments("Fun<double>.templatedStaticMethodInt",nargout,nargin,1);
255  int m = unwrap< int >(in[0]);
256  out[0] = wrap< double >(Fun<double>::templatedStaticMethod(m));
257 }
258 
259 void Test_collectorInsertAndMakeBase_12(int nargout, mxArray *out[], int nargin, const mxArray *in[])
260 {
261  mexAtExit(&_deleteAllObjects);
262  typedef std::shared_ptr<Test> Shared;
263 
264  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
265  collector_Test.insert(self);
266 }
267 
268 void Test_constructor_13(int nargout, mxArray *out[], int nargin, const mxArray *in[])
269 {
270  mexAtExit(&_deleteAllObjects);
271  typedef std::shared_ptr<Test> Shared;
272 
273  Shared *self = new Shared(new Test());
274  collector_Test.insert(self);
275  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
276  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
277 }
278 
279 void Test_constructor_14(int nargout, mxArray *out[], int nargin, const mxArray *in[])
280 {
281  mexAtExit(&_deleteAllObjects);
282  typedef std::shared_ptr<Test> Shared;
283 
284  double a = unwrap< double >(in[0]);
285  Matrix b = unwrap< Matrix >(in[1]);
286  Shared *self = new Shared(new Test(a,b));
287  collector_Test.insert(self);
288  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
289  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
290 }
291 
292 void Test_deconstructor_15(int nargout, mxArray *out[], int nargin, const mxArray *in[])
293 {
294  typedef std::shared_ptr<Test> Shared;
295  checkArguments("delete_Test",nargout,nargin,1);
296  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
297  Collector_Test::iterator item;
298  item = collector_Test.find(self);
299  if(item != collector_Test.end()) {
300  collector_Test.erase(item);
301  }
302  delete self;
303 }
304 
305 void Test_arg_EigenConstRef_16(int nargout, mxArray *out[], int nargin, const mxArray *in[])
306 {
307  checkArguments("arg_EigenConstRef",nargout,nargin-1,1);
308  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
309  Matrix value = unwrap< Matrix >(in[1]);
310  obj->arg_EigenConstRef(value);
311 }
312 
313 void Test_create_MixedPtrs_17(int nargout, mxArray *out[], int nargin, const mxArray *in[])
314 {
315  checkArguments("create_MixedPtrs",nargout,nargin-1,0);
316  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
317  auto pairResult = obj->create_MixedPtrs();
318  out[0] = wrap_shared_ptr(std::make_shared<Test>(pairResult.first),"Test", false);
319  out[1] = wrap_shared_ptr(pairResult.second,"Test", false);
320 }
321 
322 void Test_create_ptrs_18(int nargout, mxArray *out[], int nargin, const mxArray *in[])
323 {
324  checkArguments("create_ptrs",nargout,nargin-1,0);
325  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
326  auto pairResult = obj->create_ptrs();
327  out[0] = wrap_shared_ptr(pairResult.first,"Test", false);
328  out[1] = wrap_shared_ptr(pairResult.second,"Test", false);
329 }
330 
331 void Test_get_container_19(int nargout, mxArray *out[], int nargin, const mxArray *in[])
332 {
333  checkArguments("get_container",nargout,nargin-1,0);
334  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
335  out[0] = wrap_shared_ptr(std::make_shared<std::vector<testing::Test>>(obj->get_container()),"std.vectorTest", false);
336 }
337 
338 void Test_lambda_20(int nargout, mxArray *out[], int nargin, const mxArray *in[])
339 {
340  checkArguments("lambda",nargout,nargin-1,0);
341  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
342  obj->lambda();
343 }
344 
345 void Test_markdown_21(int nargout, mxArray *out[], int nargin, const mxArray *in[])
346 {
347  checkArguments("markdown",nargout,nargin-1,1);
348  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
349  gtsam::KeyFormatter& keyFormatter = *unwrap_shared_ptr< gtsam::KeyFormatter >(in[1], "ptr_gtsamKeyFormatter");
350  out[0] = wrap< string >(obj->markdown(keyFormatter));
351 }
352 
353 void Test_markdown_22(int nargout, mxArray *out[], int nargin, const mxArray *in[])
354 {
355  checkArguments("markdown",nargout,nargin-1,0);
356  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
357  out[0] = wrap< string >(obj->markdown(gtsam::DefaultKeyFormatter));
358 }
359 
360 void Test_print_23(int nargout, mxArray *out[], int nargin, const mxArray *in[])
361 {
362  checkArguments("print",nargout,nargin-1,0);
363  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
364  obj->print();
365 }
366 
367 void Test_return_Point2Ptr_24(int nargout, mxArray *out[], int nargin, const mxArray *in[])
368 {
369  checkArguments("return_Point2Ptr",nargout,nargin-1,1);
370  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
371  bool value = unwrap< bool >(in[1]);
372  {
373  std::shared_ptr<Point2> shared(obj->return_Point2Ptr(value));
374  out[0] = wrap_shared_ptr(shared,"Point2");
375  }
376 }
377 
378 void Test_return_Test_25(int nargout, mxArray *out[], int nargin, const mxArray *in[])
379 {
380  checkArguments("return_Test",nargout,nargin-1,1);
381  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
382  std::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "ptr_Test");
383  out[0] = wrap_shared_ptr(std::make_shared<Test>(obj->return_Test(value)),"Test", false);
384 }
385 
386 void Test_return_TestPtr_26(int nargout, mxArray *out[], int nargin, const mxArray *in[])
387 {
388  checkArguments("return_TestPtr",nargout,nargin-1,1);
389  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
390  std::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "ptr_Test");
391  out[0] = wrap_shared_ptr(obj->return_TestPtr(value),"Test", false);
392 }
393 
394 void Test_return_bool_27(int nargout, mxArray *out[], int nargin, const mxArray *in[])
395 {
396  checkArguments("return_bool",nargout,nargin-1,1);
397  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
398  bool value = unwrap< bool >(in[1]);
399  out[0] = wrap< bool >(obj->return_bool(value));
400 }
401 
402 void Test_return_double_28(int nargout, mxArray *out[], int nargin, const mxArray *in[])
403 {
404  checkArguments("return_double",nargout,nargin-1,1);
405  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
406  double value = unwrap< double >(in[1]);
407  out[0] = wrap< double >(obj->return_double(value));
408 }
409 
410 void Test_return_field_29(int nargout, mxArray *out[], int nargin, const mxArray *in[])
411 {
412  checkArguments("return_field",nargout,nargin-1,1);
413  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
414  Test& t = *unwrap_shared_ptr< Test >(in[1], "ptr_Test");
415  out[0] = wrap< bool >(obj->return_field(t));
416 }
417 
418 void Test_return_int_30(int nargout, mxArray *out[], int nargin, const mxArray *in[])
419 {
420  checkArguments("return_int",nargout,nargin-1,1);
421  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
422  int value = unwrap< int >(in[1]);
423  out[0] = wrap< int >(obj->return_int(value));
424 }
425 
426 void Test_return_matrix1_31(int nargout, mxArray *out[], int nargin, const mxArray *in[])
427 {
428  checkArguments("return_matrix1",nargout,nargin-1,1);
429  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
430  Matrix value = unwrap< Matrix >(in[1]);
431  out[0] = wrap< Matrix >(obj->return_matrix1(value));
432 }
433 
434 void Test_return_matrix2_32(int nargout, mxArray *out[], int nargin, const mxArray *in[])
435 {
436  checkArguments("return_matrix2",nargout,nargin-1,1);
437  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
438  Matrix value = unwrap< Matrix >(in[1]);
439  out[0] = wrap< Matrix >(obj->return_matrix2(value));
440 }
441 
442 void Test_return_pair_33(int nargout, mxArray *out[], int nargin, const mxArray *in[])
443 {
444  checkArguments("return_pair",nargout,nargin-1,2);
445  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
446  Vector v = unwrap< Vector >(in[1]);
447  Matrix A = unwrap< Matrix >(in[2]);
448  auto pairResult = obj->return_pair(v,A);
449  out[0] = wrap< Vector >(pairResult.first);
450  out[1] = wrap< Matrix >(pairResult.second);
451 }
452 
453 void Test_return_pair_34(int nargout, mxArray *out[], int nargin, const mxArray *in[])
454 {
455  checkArguments("return_pair",nargout,nargin-1,1);
456  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
457  Vector v = unwrap< Vector >(in[1]);
458  auto pairResult = obj->return_pair(v);
459  out[0] = wrap< Vector >(pairResult.first);
460  out[1] = wrap< Matrix >(pairResult.second);
461 }
462 
463 void Test_return_ptrs_35(int nargout, mxArray *out[], int nargin, const mxArray *in[])
464 {
465  checkArguments("return_ptrs",nargout,nargin-1,2);
466  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
467  std::shared_ptr<Test> p1 = unwrap_shared_ptr< Test >(in[1], "ptr_Test");
468  std::shared_ptr<Test> p2 = unwrap_shared_ptr< Test >(in[2], "ptr_Test");
469  auto pairResult = obj->return_ptrs(p1,p2);
470  out[0] = wrap_shared_ptr(pairResult.first,"Test", false);
471  out[1] = wrap_shared_ptr(pairResult.second,"Test", false);
472 }
473 
474 void Test_return_size_t_36(int nargout, mxArray *out[], int nargin, const mxArray *in[])
475 {
476  checkArguments("return_size_t",nargout,nargin-1,1);
477  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
478  size_t value = unwrap< size_t >(in[1]);
479  out[0] = wrap< size_t >(obj->return_size_t(value));
480 }
481 
482 void Test_return_string_37(int nargout, mxArray *out[], int nargin, const mxArray *in[])
483 {
484  checkArguments("return_string",nargout,nargin-1,1);
485  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
486  string value = unwrap< string >(in[1]);
487  out[0] = wrap< string >(obj->return_string(value));
488 }
489 
490 void Test_return_vector1_38(int nargout, mxArray *out[], int nargin, const mxArray *in[])
491 {
492  checkArguments("return_vector1",nargout,nargin-1,1);
493  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
494  Vector value = unwrap< Vector >(in[1]);
495  out[0] = wrap< Vector >(obj->return_vector1(value));
496 }
497 
498 void Test_return_vector2_39(int nargout, mxArray *out[], int nargin, const mxArray *in[])
499 {
500  checkArguments("return_vector2",nargout,nargin-1,1);
501  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
502  Vector value = unwrap< Vector >(in[1]);
503  out[0] = wrap< Vector >(obj->return_vector2(value));
504 }
505 
506 void Test_set_container_40(int nargout, mxArray *out[], int nargin, const mxArray *in[])
507 {
508  checkArguments("set_container",nargout,nargin-1,1);
509  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
510  std::shared_ptr<std::vector<testing::Test>> container = unwrap_shared_ptr< std::vector<testing::Test> >(in[1], "ptr_stdvectorTest");
511  obj->set_container(*container);
512 }
513 
514 void Test_set_container_41(int nargout, mxArray *out[], int nargin, const mxArray *in[])
515 {
516  checkArguments("set_container",nargout,nargin-1,1);
517  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
518  std::shared_ptr<std::vector<testing::Test>> container = unwrap_shared_ptr< std::vector<testing::Test> >(in[1], "ptr_stdvectorTest");
519  obj->set_container(*container);
520 }
521 
522 void Test_set_container_42(int nargout, mxArray *out[], int nargin, const mxArray *in[])
523 {
524  checkArguments("set_container",nargout,nargin-1,1);
525  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
526  std::shared_ptr<std::vector<testing::Test>> container = unwrap_shared_ptr< std::vector<testing::Test> >(in[1], "ptr_stdvectorTest");
527  obj->set_container(*container);
528 }
529 
530 void Test_get_model_ptr_43(int nargout, mxArray *out[], int nargin, const mxArray *in[])
531 {
532  checkArguments("model_ptr",nargout,nargin-1,0);
533  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
534  out[0] = wrap_shared_ptr(obj->model_ptr,"gtsam.noiseModel.Base", false);
535 }
536 
537 void Test_set_model_ptr_44(int nargout, mxArray *out[], int nargin, const mxArray *in[])
538 {
539  checkArguments("model_ptr",nargout,nargin-1,1);
540  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
541  std::shared_ptr<gtsam::noiseModel::Base> model_ptr = unwrap_shared_ptr< gtsam::noiseModel::Base >(in[1], "ptr_gtsamnoiseModelBase");
542  obj->model_ptr = *model_ptr;
543 }
544 
545 void Test_get_value_45(int nargout, mxArray *out[], int nargin, const mxArray *in[])
546 {
547  checkArguments("value",nargout,nargin-1,0);
548  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
549  out[0] = wrap< double >(obj->value);
550 }
551 
552 void Test_set_value_46(int nargout, mxArray *out[], int nargin, const mxArray *in[])
553 {
554  checkArguments("value",nargout,nargin-1,1);
555  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
556  double value = unwrap< double >(in[1]);
557  obj->value = value;
558 }
559 
560 void Test_get_name_47(int nargout, mxArray *out[], int nargin, const mxArray *in[])
561 {
562  checkArguments("name",nargout,nargin-1,0);
563  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
564  out[0] = wrap< string >(obj->name);
565 }
566 
567 void Test_set_name_48(int nargout, mxArray *out[], int nargin, const mxArray *in[])
568 {
569  checkArguments("name",nargout,nargin-1,1);
570  auto obj = unwrap_shared_ptr<Test>(in[0], "ptr_Test");
571  string name = unwrap< string >(in[1]);
572  obj->name = name;
573 }
574 
575 void PrimitiveRefDouble_collectorInsertAndMakeBase_49(int nargout, mxArray *out[], int nargin, const mxArray *in[])
576 {
577  mexAtExit(&_deleteAllObjects);
578  typedef std::shared_ptr<PrimitiveRef<double>> Shared;
579 
580  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
581  collector_PrimitiveRefDouble.insert(self);
582 }
583 
584 void PrimitiveRefDouble_constructor_50(int nargout, mxArray *out[], int nargin, const mxArray *in[])
585 {
586  mexAtExit(&_deleteAllObjects);
587  typedef std::shared_ptr<PrimitiveRef<double>> Shared;
588 
589  Shared *self = new Shared(new PrimitiveRef<double>());
590  collector_PrimitiveRefDouble.insert(self);
591  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
592  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
593 }
594 
595 void PrimitiveRefDouble_deconstructor_51(int nargout, mxArray *out[], int nargin, const mxArray *in[])
596 {
597  typedef std::shared_ptr<PrimitiveRef<double>> Shared;
598  checkArguments("delete_PrimitiveRefDouble",nargout,nargin,1);
599  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
600  Collector_PrimitiveRefDouble::iterator item;
601  item = collector_PrimitiveRefDouble.find(self);
602  if(item != collector_PrimitiveRefDouble.end()) {
603  collector_PrimitiveRefDouble.erase(item);
604  }
605  delete self;
606 }
607 
608 void PrimitiveRefDouble_Brutal_52(int nargout, mxArray *out[], int nargin, const mxArray *in[])
609 {
610  checkArguments("PrimitiveRef<double>.Brutal",nargout,nargin,1);
611  double t = unwrap< double >(in[0]);
612  out[0] = wrap_shared_ptr(std::make_shared<PrimitiveRef<double>>(PrimitiveRef<double>::Brutal(t)),"PrimitiveRefdouble", false);
613 }
614 
615 void MyVector3_collectorInsertAndMakeBase_53(int nargout, mxArray *out[], int nargin, const mxArray *in[])
616 {
617  mexAtExit(&_deleteAllObjects);
618  typedef std::shared_ptr<MyVector<3>> Shared;
619 
620  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
621  collector_MyVector3.insert(self);
622 }
623 
624 void MyVector3_constructor_54(int nargout, mxArray *out[], int nargin, const mxArray *in[])
625 {
626  mexAtExit(&_deleteAllObjects);
627  typedef std::shared_ptr<MyVector<3>> Shared;
628 
629  Shared *self = new Shared(new MyVector<3>());
630  collector_MyVector3.insert(self);
631  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
632  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
633 }
634 
635 void MyVector3_deconstructor_55(int nargout, mxArray *out[], int nargin, const mxArray *in[])
636 {
637  typedef std::shared_ptr<MyVector<3>> Shared;
638  checkArguments("delete_MyVector3",nargout,nargin,1);
639  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
640  Collector_MyVector3::iterator item;
641  item = collector_MyVector3.find(self);
642  if(item != collector_MyVector3.end()) {
643  collector_MyVector3.erase(item);
644  }
645  delete self;
646 }
647 
648 void MyVector12_collectorInsertAndMakeBase_56(int nargout, mxArray *out[], int nargin, const mxArray *in[])
649 {
650  mexAtExit(&_deleteAllObjects);
651  typedef std::shared_ptr<MyVector<12>> Shared;
652 
653  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
654  collector_MyVector12.insert(self);
655 }
656 
657 void MyVector12_constructor_57(int nargout, mxArray *out[], int nargin, const mxArray *in[])
658 {
659  mexAtExit(&_deleteAllObjects);
660  typedef std::shared_ptr<MyVector<12>> Shared;
661 
662  Shared *self = new Shared(new MyVector<12>());
663  collector_MyVector12.insert(self);
664  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
665  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
666 }
667 
668 void MyVector12_deconstructor_58(int nargout, mxArray *out[], int nargin, const mxArray *in[])
669 {
670  typedef std::shared_ptr<MyVector<12>> Shared;
671  checkArguments("delete_MyVector12",nargout,nargin,1);
672  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
673  Collector_MyVector12::iterator item;
674  item = collector_MyVector12.find(self);
675  if(item != collector_MyVector12.end()) {
676  collector_MyVector12.erase(item);
677  }
678  delete self;
679 }
680 
681 void MultipleTemplatesIntDouble_collectorInsertAndMakeBase_59(int nargout, mxArray *out[], int nargin, const mxArray *in[])
682 {
683  mexAtExit(&_deleteAllObjects);
684  typedef std::shared_ptr<MultipleTemplates<int, double>> Shared;
685 
686  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
688 }
689 
690 void MultipleTemplatesIntDouble_deconstructor_60(int nargout, mxArray *out[], int nargin, const mxArray *in[])
691 {
692  typedef std::shared_ptr<MultipleTemplates<int, double>> Shared;
693  checkArguments("delete_MultipleTemplatesIntDouble",nargout,nargin,1);
694  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
695  Collector_MultipleTemplatesIntDouble::iterator item;
696  item = collector_MultipleTemplatesIntDouble.find(self);
697  if(item != collector_MultipleTemplatesIntDouble.end()) {
699  }
700  delete self;
701 }
702 
703 void MultipleTemplatesIntFloat_collectorInsertAndMakeBase_61(int nargout, mxArray *out[], int nargin, const mxArray *in[])
704 {
705  mexAtExit(&_deleteAllObjects);
706  typedef std::shared_ptr<MultipleTemplates<int, float>> Shared;
707 
708  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
710 }
711 
712 void MultipleTemplatesIntFloat_deconstructor_62(int nargout, mxArray *out[], int nargin, const mxArray *in[])
713 {
714  typedef std::shared_ptr<MultipleTemplates<int, float>> Shared;
715  checkArguments("delete_MultipleTemplatesIntFloat",nargout,nargin,1);
716  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
717  Collector_MultipleTemplatesIntFloat::iterator item;
718  item = collector_MultipleTemplatesIntFloat.find(self);
719  if(item != collector_MultipleTemplatesIntFloat.end()) {
721  }
722  delete self;
723 }
724 
725 void ForwardKinematics_collectorInsertAndMakeBase_63(int nargout, mxArray *out[], int nargin, const mxArray *in[])
726 {
727  mexAtExit(&_deleteAllObjects);
728  typedef std::shared_ptr<ForwardKinematics> Shared;
729 
730  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
731  collector_ForwardKinematics.insert(self);
732 }
733 
734 void ForwardKinematics_constructor_64(int nargout, mxArray *out[], int nargin, const mxArray *in[])
735 {
736  mexAtExit(&_deleteAllObjects);
737  typedef std::shared_ptr<ForwardKinematics> Shared;
738 
739  gtdynamics::Robot& robot = *unwrap_shared_ptr< gtdynamics::Robot >(in[0], "ptr_gtdynamicsRobot");
740  string& start_link_name = *unwrap_shared_ptr< string >(in[1], "ptr_string");
741  string& end_link_name = *unwrap_shared_ptr< string >(in[2], "ptr_string");
742  gtsam::Values& joint_angles = *unwrap_shared_ptr< gtsam::Values >(in[3], "ptr_gtsamValues");
743  gtsam::Pose3& l2Tp = *unwrap_shared_ptr< gtsam::Pose3 >(in[4], "ptr_gtsamPose3");
744  Shared *self = new Shared(new ForwardKinematics(robot,start_link_name,end_link_name,joint_angles,l2Tp));
745  collector_ForwardKinematics.insert(self);
746  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
747  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
748 }
749 
750 void ForwardKinematics_constructor_65(int nargout, mxArray *out[], int nargin, const mxArray *in[])
751 {
752  mexAtExit(&_deleteAllObjects);
753  typedef std::shared_ptr<ForwardKinematics> Shared;
754 
755  gtdynamics::Robot& robot = *unwrap_shared_ptr< gtdynamics::Robot >(in[0], "ptr_gtdynamicsRobot");
756  string& start_link_name = *unwrap_shared_ptr< string >(in[1], "ptr_string");
757  string& end_link_name = *unwrap_shared_ptr< string >(in[2], "ptr_string");
758  gtsam::Values& joint_angles = *unwrap_shared_ptr< gtsam::Values >(in[3], "ptr_gtsamValues");
759  Shared *self = new Shared(new ForwardKinematics(robot,start_link_name,end_link_name,joint_angles,gtsam::Pose3()));
760  collector_ForwardKinematics.insert(self);
761  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
762  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
763 }
764 
765 void ForwardKinematics_deconstructor_66(int nargout, mxArray *out[], int nargin, const mxArray *in[])
766 {
767  typedef std::shared_ptr<ForwardKinematics> Shared;
768  checkArguments("delete_ForwardKinematics",nargout,nargin,1);
769  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
770  Collector_ForwardKinematics::iterator item;
771  item = collector_ForwardKinematics.find(self);
772  if(item != collector_ForwardKinematics.end()) {
773  collector_ForwardKinematics.erase(item);
774  }
775  delete self;
776 }
777 
778 void TemplatedConstructor_collectorInsertAndMakeBase_67(int nargout, mxArray *out[], int nargin, const mxArray *in[])
779 {
780  mexAtExit(&_deleteAllObjects);
781  typedef std::shared_ptr<TemplatedConstructor> Shared;
782 
783  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
784  collector_TemplatedConstructor.insert(self);
785 }
786 
787 void TemplatedConstructor_constructor_68(int nargout, mxArray *out[], int nargin, const mxArray *in[])
788 {
789  mexAtExit(&_deleteAllObjects);
790  typedef std::shared_ptr<TemplatedConstructor> Shared;
791 
792  Shared *self = new Shared(new TemplatedConstructor());
793  collector_TemplatedConstructor.insert(self);
794  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
795  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
796 }
797 
798 void TemplatedConstructor_constructor_69(int nargout, mxArray *out[], int nargin, const mxArray *in[])
799 {
800  mexAtExit(&_deleteAllObjects);
801  typedef std::shared_ptr<TemplatedConstructor> Shared;
802 
803  string& arg = *unwrap_shared_ptr< string >(in[0], "ptr_string");
804  Shared *self = new Shared(new TemplatedConstructor(arg));
805  collector_TemplatedConstructor.insert(self);
806  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
807  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
808 }
809 
810 void TemplatedConstructor_constructor_70(int nargout, mxArray *out[], int nargin, const mxArray *in[])
811 {
812  mexAtExit(&_deleteAllObjects);
813  typedef std::shared_ptr<TemplatedConstructor> Shared;
814 
815  int arg = unwrap< int >(in[0]);
816  Shared *self = new Shared(new TemplatedConstructor(arg));
817  collector_TemplatedConstructor.insert(self);
818  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
819  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
820 }
821 
822 void TemplatedConstructor_constructor_71(int nargout, mxArray *out[], int nargin, const mxArray *in[])
823 {
824  mexAtExit(&_deleteAllObjects);
825  typedef std::shared_ptr<TemplatedConstructor> Shared;
826 
827  double arg = unwrap< double >(in[0]);
828  Shared *self = new Shared(new TemplatedConstructor(arg));
829  collector_TemplatedConstructor.insert(self);
830  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
831  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
832 }
833 
834 void TemplatedConstructor_deconstructor_72(int nargout, mxArray *out[], int nargin, const mxArray *in[])
835 {
836  typedef std::shared_ptr<TemplatedConstructor> Shared;
837  checkArguments("delete_TemplatedConstructor",nargout,nargin,1);
838  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
839  Collector_TemplatedConstructor::iterator item;
840  item = collector_TemplatedConstructor.find(self);
841  if(item != collector_TemplatedConstructor.end()) {
842  collector_TemplatedConstructor.erase(item);
843  }
844  delete self;
845 }
846 
847 void MyFactorPosePoint2_collectorInsertAndMakeBase_73(int nargout, mxArray *out[], int nargin, const mxArray *in[])
848 {
849  mexAtExit(&_deleteAllObjects);
850  typedef std::shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>> Shared;
851 
852  Shared *self = *reinterpret_cast<Shared**> (mxGetData(in[0]));
853  collector_MyFactorPosePoint2.insert(self);
854 }
855 
856 void MyFactorPosePoint2_constructor_74(int nargout, mxArray *out[], int nargin, const mxArray *in[])
857 {
858  mexAtExit(&_deleteAllObjects);
859  typedef std::shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>> Shared;
860 
861  size_t key1 = unwrap< size_t >(in[0]);
862  size_t key2 = unwrap< size_t >(in[1]);
863  double measured = unwrap< double >(in[2]);
864  std::shared_ptr<gtsam::noiseModel::Base> noiseModel = unwrap_shared_ptr< gtsam::noiseModel::Base >(in[3], "ptr_gtsamnoiseModelBase");
865  Shared *self = new Shared(new MyFactor<gtsam::Pose2, gtsam::Matrix>(key1,key2,measured,noiseModel));
866  collector_MyFactorPosePoint2.insert(self);
867  out[0] = mxCreateNumericMatrix(1, 1, mxUINT32OR64_CLASS, mxREAL);
868  *reinterpret_cast<Shared**> (mxGetData(out[0])) = self;
869 }
870 
871 void MyFactorPosePoint2_deconstructor_75(int nargout, mxArray *out[], int nargin, const mxArray *in[])
872 {
873  typedef std::shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>> Shared;
874  checkArguments("delete_MyFactorPosePoint2",nargout,nargin,1);
875  Shared *self = *reinterpret_cast<Shared**>(mxGetData(in[0]));
876  Collector_MyFactorPosePoint2::iterator item;
877  item = collector_MyFactorPosePoint2.find(self);
878  if(item != collector_MyFactorPosePoint2.end()) {
879  collector_MyFactorPosePoint2.erase(item);
880  }
881  delete self;
882 }
883 
884 void MyFactorPosePoint2_print_76(int nargout, mxArray *out[], int nargin, const mxArray *in[])
885 {
886  checkArguments("print",nargout,nargin-1,2);
887  auto obj = unwrap_shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>>(in[0], "ptr_MyFactorPosePoint2");
888  string& s = *unwrap_shared_ptr< string >(in[1], "ptr_string");
889  gtsam::KeyFormatter& keyFormatter = *unwrap_shared_ptr< gtsam::KeyFormatter >(in[2], "ptr_gtsamKeyFormatter");
890  obj->print(s,keyFormatter);
891 }
892 
893 void MyFactorPosePoint2_print_77(int nargout, mxArray *out[], int nargin, const mxArray *in[])
894 {
895  checkArguments("print",nargout,nargin-1,1);
896  auto obj = unwrap_shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>>(in[0], "ptr_MyFactorPosePoint2");
897  string& s = *unwrap_shared_ptr< string >(in[1], "ptr_string");
898  obj->print(s,gtsam::DefaultKeyFormatter);
899 }
900 
901 void MyFactorPosePoint2_print_78(int nargout, mxArray *out[], int nargin, const mxArray *in[])
902 {
903  checkArguments("print",nargout,nargin-1,0);
904  auto obj = unwrap_shared_ptr<MyFactor<gtsam::Pose2, gtsam::Matrix>>(in[0], "ptr_MyFactorPosePoint2");
905  obj->print("factor: ",gtsam::DefaultKeyFormatter);
906 }
907 
908 
909 void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
910 {
911  mstream mout;
912  std::streambuf *outbuf = std::cout.rdbuf(&mout);
913 
915 
916  int id = unwrap<int>(in[0]);
917 
918  try {
919  switch(id) {
920  case 0:
921  FunRange_collectorInsertAndMakeBase_0(nargout, out, nargin-1, in+1);
922  break;
923  case 1:
924  FunRange_constructor_1(nargout, out, nargin-1, in+1);
925  break;
926  case 2:
927  FunRange_deconstructor_2(nargout, out, nargin-1, in+1);
928  break;
929  case 3:
930  FunRange_range_3(nargout, out, nargin-1, in+1);
931  break;
932  case 4:
933  FunRange_create_4(nargout, out, nargin-1, in+1);
934  break;
935  case 5:
936  FunDouble_collectorInsertAndMakeBase_5(nargout, out, nargin-1, in+1);
937  break;
938  case 6:
939  FunDouble_deconstructor_6(nargout, out, nargin-1, in+1);
940  break;
941  case 7:
942  FunDouble_multiTemplatedMethod_7(nargout, out, nargin-1, in+1);
943  break;
944  case 8:
945  FunDouble_sets_8(nargout, out, nargin-1, in+1);
946  break;
947  case 9:
948  FunDouble_templatedMethod_9(nargout, out, nargin-1, in+1);
949  break;
950  case 10:
951  FunDouble_staticMethodWithThis_10(nargout, out, nargin-1, in+1);
952  break;
953  case 11:
954  FunDouble_templatedStaticMethodInt_11(nargout, out, nargin-1, in+1);
955  break;
956  case 12:
957  Test_collectorInsertAndMakeBase_12(nargout, out, nargin-1, in+1);
958  break;
959  case 13:
960  Test_constructor_13(nargout, out, nargin-1, in+1);
961  break;
962  case 14:
963  Test_constructor_14(nargout, out, nargin-1, in+1);
964  break;
965  case 15:
966  Test_deconstructor_15(nargout, out, nargin-1, in+1);
967  break;
968  case 16:
969  Test_arg_EigenConstRef_16(nargout, out, nargin-1, in+1);
970  break;
971  case 17:
972  Test_create_MixedPtrs_17(nargout, out, nargin-1, in+1);
973  break;
974  case 18:
975  Test_create_ptrs_18(nargout, out, nargin-1, in+1);
976  break;
977  case 19:
978  Test_get_container_19(nargout, out, nargin-1, in+1);
979  break;
980  case 20:
981  Test_lambda_20(nargout, out, nargin-1, in+1);
982  break;
983  case 21:
984  Test_markdown_21(nargout, out, nargin-1, in+1);
985  break;
986  case 22:
987  Test_markdown_22(nargout, out, nargin-1, in+1);
988  break;
989  case 23:
990  Test_print_23(nargout, out, nargin-1, in+1);
991  break;
992  case 24:
993  Test_return_Point2Ptr_24(nargout, out, nargin-1, in+1);
994  break;
995  case 25:
996  Test_return_Test_25(nargout, out, nargin-1, in+1);
997  break;
998  case 26:
999  Test_return_TestPtr_26(nargout, out, nargin-1, in+1);
1000  break;
1001  case 27:
1002  Test_return_bool_27(nargout, out, nargin-1, in+1);
1003  break;
1004  case 28:
1005  Test_return_double_28(nargout, out, nargin-1, in+1);
1006  break;
1007  case 29:
1008  Test_return_field_29(nargout, out, nargin-1, in+1);
1009  break;
1010  case 30:
1011  Test_return_int_30(nargout, out, nargin-1, in+1);
1012  break;
1013  case 31:
1014  Test_return_matrix1_31(nargout, out, nargin-1, in+1);
1015  break;
1016  case 32:
1017  Test_return_matrix2_32(nargout, out, nargin-1, in+1);
1018  break;
1019  case 33:
1020  Test_return_pair_33(nargout, out, nargin-1, in+1);
1021  break;
1022  case 34:
1023  Test_return_pair_34(nargout, out, nargin-1, in+1);
1024  break;
1025  case 35:
1026  Test_return_ptrs_35(nargout, out, nargin-1, in+1);
1027  break;
1028  case 36:
1029  Test_return_size_t_36(nargout, out, nargin-1, in+1);
1030  break;
1031  case 37:
1032  Test_return_string_37(nargout, out, nargin-1, in+1);
1033  break;
1034  case 38:
1035  Test_return_vector1_38(nargout, out, nargin-1, in+1);
1036  break;
1037  case 39:
1038  Test_return_vector2_39(nargout, out, nargin-1, in+1);
1039  break;
1040  case 40:
1041  Test_set_container_40(nargout, out, nargin-1, in+1);
1042  break;
1043  case 41:
1044  Test_set_container_41(nargout, out, nargin-1, in+1);
1045  break;
1046  case 42:
1047  Test_set_container_42(nargout, out, nargin-1, in+1);
1048  break;
1049  case 43:
1050  Test_get_model_ptr_43(nargout, out, nargin-1, in+1);
1051  break;
1052  case 44:
1053  Test_set_model_ptr_44(nargout, out, nargin-1, in+1);
1054  break;
1055  case 45:
1056  Test_get_value_45(nargout, out, nargin-1, in+1);
1057  break;
1058  case 46:
1059  Test_set_value_46(nargout, out, nargin-1, in+1);
1060  break;
1061  case 47:
1062  Test_get_name_47(nargout, out, nargin-1, in+1);
1063  break;
1064  case 48:
1065  Test_set_name_48(nargout, out, nargin-1, in+1);
1066  break;
1067  case 49:
1068  PrimitiveRefDouble_collectorInsertAndMakeBase_49(nargout, out, nargin-1, in+1);
1069  break;
1070  case 50:
1071  PrimitiveRefDouble_constructor_50(nargout, out, nargin-1, in+1);
1072  break;
1073  case 51:
1074  PrimitiveRefDouble_deconstructor_51(nargout, out, nargin-1, in+1);
1075  break;
1076  case 52:
1077  PrimitiveRefDouble_Brutal_52(nargout, out, nargin-1, in+1);
1078  break;
1079  case 53:
1080  MyVector3_collectorInsertAndMakeBase_53(nargout, out, nargin-1, in+1);
1081  break;
1082  case 54:
1083  MyVector3_constructor_54(nargout, out, nargin-1, in+1);
1084  break;
1085  case 55:
1086  MyVector3_deconstructor_55(nargout, out, nargin-1, in+1);
1087  break;
1088  case 56:
1089  MyVector12_collectorInsertAndMakeBase_56(nargout, out, nargin-1, in+1);
1090  break;
1091  case 57:
1092  MyVector12_constructor_57(nargout, out, nargin-1, in+1);
1093  break;
1094  case 58:
1095  MyVector12_deconstructor_58(nargout, out, nargin-1, in+1);
1096  break;
1097  case 59:
1098  MultipleTemplatesIntDouble_collectorInsertAndMakeBase_59(nargout, out, nargin-1, in+1);
1099  break;
1100  case 60:
1101  MultipleTemplatesIntDouble_deconstructor_60(nargout, out, nargin-1, in+1);
1102  break;
1103  case 61:
1104  MultipleTemplatesIntFloat_collectorInsertAndMakeBase_61(nargout, out, nargin-1, in+1);
1105  break;
1106  case 62:
1107  MultipleTemplatesIntFloat_deconstructor_62(nargout, out, nargin-1, in+1);
1108  break;
1109  case 63:
1110  ForwardKinematics_collectorInsertAndMakeBase_63(nargout, out, nargin-1, in+1);
1111  break;
1112  case 64:
1113  ForwardKinematics_constructor_64(nargout, out, nargin-1, in+1);
1114  break;
1115  case 65:
1116  ForwardKinematics_constructor_65(nargout, out, nargin-1, in+1);
1117  break;
1118  case 66:
1119  ForwardKinematics_deconstructor_66(nargout, out, nargin-1, in+1);
1120  break;
1121  case 67:
1122  TemplatedConstructor_collectorInsertAndMakeBase_67(nargout, out, nargin-1, in+1);
1123  break;
1124  case 68:
1125  TemplatedConstructor_constructor_68(nargout, out, nargin-1, in+1);
1126  break;
1127  case 69:
1128  TemplatedConstructor_constructor_69(nargout, out, nargin-1, in+1);
1129  break;
1130  case 70:
1131  TemplatedConstructor_constructor_70(nargout, out, nargin-1, in+1);
1132  break;
1133  case 71:
1134  TemplatedConstructor_constructor_71(nargout, out, nargin-1, in+1);
1135  break;
1136  case 72:
1137  TemplatedConstructor_deconstructor_72(nargout, out, nargin-1, in+1);
1138  break;
1139  case 73:
1140  MyFactorPosePoint2_collectorInsertAndMakeBase_73(nargout, out, nargin-1, in+1);
1141  break;
1142  case 74:
1143  MyFactorPosePoint2_constructor_74(nargout, out, nargin-1, in+1);
1144  break;
1145  case 75:
1146  MyFactorPosePoint2_deconstructor_75(nargout, out, nargin-1, in+1);
1147  break;
1148  case 76:
1149  MyFactorPosePoint2_print_76(nargout, out, nargin-1, in+1);
1150  break;
1151  case 77:
1152  MyFactorPosePoint2_print_77(nargout, out, nargin-1, in+1);
1153  break;
1154  case 78:
1155  MyFactorPosePoint2_print_78(nargout, out, nargin-1, in+1);
1156  break;
1157  }
1158  } catch(const std::exception& e) {
1159  mexErrMsgTxt(("Exception from gtsam:\n" + std::string(e.what()) + "\n").c_str());
1160  }
1161 
1162  std::cout.rdbuf(outbuf);
1163 }
int unwrap< int >(const mxArray *array)
Definition: matlab.h:328
std::set< std::shared_ptr< PrimitiveRefDouble > * > Collector_PrimitiveRefDouble
Point2 measured(-17, 30)
Matrix3f m
void TemplatedConstructor_constructor_68(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< std::shared_ptr< MultipleTemplatesIntDouble > * > Collector_MultipleTemplatesIntDouble
MyVector< 3 > MyVector3
void Test_return_TestPtr_26(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_get_name_47(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Fun< double > FunDouble
PrimitiveRef< double > PrimitiveRefDouble
void PrimitiveRefDouble_constructor_50(int nargout, mxArray *out[], int nargin, const mxArray *in[])
mxArray * wrap_shared_ptr(std::shared_ptr< Class > shared_ptr, const std::string &matlabName, bool isVirtual)
Definition: matlab.h:487
std::set< std::shared_ptr< FunDouble > * > Collector_FunDouble
void Test_set_container_42(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_return_matrix1_31(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Scalar * b
Definition: benchVecAdd.cpp:17
std::set< std::shared_ptr< MyVector3 > * > Collector_MyVector3
void Test_set_name_48(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Vector3f p1
void FunRange_collectorInsertAndMakeBase_0(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_return_size_t_36(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::ofstream out("Result.txt")
void MultipleTemplatesIntFloat_deconstructor_62(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void checkArguments(const string &name, int nargout, int nargin, int expected)
Definition: matlab.h:113
static Collector_FunDouble collector_FunDouble
void FunDouble_collectorInsertAndMakeBase_5(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void _class_RTTIRegister()
void Test_return_pair_34(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: Test.h:30
void Test_arg_EigenConstRef_16(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_MultipleTemplatesIntFloat collector_MultipleTemplatesIntFloat
string unwrap< string >(const mxArray *array)
Definition: matlab.h:283
iterator iter(handle obj)
Definition: pytypes.h:2273
void Test_print_23(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_get_container_19(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_return_vector1_38(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_return_string_37(int nargout, mxArray *out[], int nargin, const mxArray *in[])
size_t unwrap< size_t >(const mxArray *array)
Definition: matlab.h:335
void Test_set_value_46(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: cast.h:1238
void FunRange_constructor_1(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_lambda_20(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MyVector12_deconstructor_58(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static const KeyFormatter DefaultKeyFormatter
Definition: Key.h:43
GeneralSFMFactor< SfmCamera, Point3 > MyFactor
void TemplatedConstructor_constructor_69(int nargout, mxArray *out[], int nargin, const mxArray *in[])
MultipleTemplates< int, float > MultipleTemplatesIntFloat
void FunDouble_templatedMethod_9(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< std::shared_ptr< MyVector12 > * > Collector_MyVector12
std::set< std::shared_ptr< FunRange > * > Collector_FunRange
static Collector_PrimitiveRefDouble collector_PrimitiveRefDouble
void PrimitiveRefDouble_deconstructor_51(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void FunDouble_staticMethodWithThis_10(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void FunDouble_templatedStaticMethodInt_11(int nargout, mxArray *out[], int nargin, const mxArray *in[])
mxArray * wrap< size_t >(const size_t &value)
Definition: matlab.h:164
void _deleteAllObjects()
void PrimitiveRefDouble_collectorInsertAndMakeBase_49(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void ForwardKinematics_collectorInsertAndMakeBase_63(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_markdown_21(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_Test collector_Test
void TemplatedConstructor_deconstructor_72(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_FunRange collector_FunRange
void MultipleTemplatesIntDouble_collectorInsertAndMakeBase_59(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void FunRange_range_3(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MyVector12_collectorInsertAndMakeBase_56(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_get_model_ptr_43(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MyFactorPosePoint2_print_78(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< std::shared_ptr< ForwardKinematics > * > Collector_ForwardKinematics
void MyFactorPosePoint2_deconstructor_75(int nargout, mxArray *out[], int nargin, const mxArray *in[])
double unwrap< double >(const mxArray *array)
Definition: matlab.h:342
const Symbol key1('v', 1)
void Test_return_bool_27(int nargout, mxArray *out[], int nargin, const mxArray *in[])
gtsam::enable_if_t< needs_eigen_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
Definition: make_shared.h:56
static Collector_MyVector3 collector_MyVector3
std::set< std::shared_ptr< MyFactorPosePoint2 > * > Collector_MyFactorPosePoint2
MyFactor< gtsam::Pose2, gtsam::Matrix > MyFactorPosePoint2
void Test_collectorInsertAndMakeBase_12(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_set_model_ptr_44(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Array< int, Dynamic, 1 > v
void Test_return_matrix2_32(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void FunDouble_sets_8(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void FunRange_create_4(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MyVector12_constructor_57(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_return_ptrs_35(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MyFactorPosePoint2_constructor_74(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MyVector3_constructor_54(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_get_value_45(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void ForwardKinematics_constructor_65(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Array< double, 1, 3 > e(1./3., 0.5, 2.)
RealScalar s
void Test_constructor_13(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MultipleTemplatesIntDouble_deconstructor_60(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< std::shared_ptr< Test > * > Collector_Test
#define NULL
Definition: ccolamd.c:609
void MyFactorPosePoint2_collectorInsertAndMakeBase_73(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
void Test_return_Point2Ptr_24(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_set_container_41(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_markdown_22(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_TemplatedConstructor collector_TemplatedConstructor
void MyVector3_collectorInsertAndMakeBase_53(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_create_ptrs_18(int nargout, mxArray *out[], int nargin, const mxArray *in[])
mxArray * wrap< int >(const int &value)
Definition: matlab.h:172
void TemplatedConstructor_collectorInsertAndMakeBase_67(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MyFactorPosePoint2_print_77(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void TemplatedConstructor_constructor_71(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MyVector3_deconstructor_55(int nargout, mxArray *out[], int nargin, const mxArray *in[])
mxArray * wrap< double >(const double &value)
Definition: matlab.h:180
MyVector< 12 > MyVector12
void Test_deconstructor_15(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MultipleTemplatesIntFloat_collectorInsertAndMakeBase_61(int nargout, mxArray *out[], int nargin, const mxArray *in[])
#define mxUINT32OR64_CLASS
Definition: matlab.h:58
void FunDouble_multiTemplatedMethod_7(int nargout, mxArray *out[], int nargin, const mxArray *in[])
ADT create(const Signature &signature)
void Test_constructor_14(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_ForwardKinematics collector_ForwardKinematics
mxArray * wrap< string >(const string &value)
Definition: matlab.h:134
void TemplatedConstructor_constructor_70(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void FunDouble_deconstructor_6(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_return_double_28(int nargout, mxArray *out[], int nargin, const mxArray *in[])
std::set< std::shared_ptr< TemplatedConstructor > * > Collector_TemplatedConstructor
void ForwardKinematics_deconstructor_66(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_set_container_40(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Point3 p2
void Test_return_field_29(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void MyFactorPosePoint2_print_76(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Annotation for function names.
Definition: attr.h:48
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
MultipleTemplates< int, double > MultipleTemplatesIntDouble
mxArray * wrap< bool >(const bool &value)
Definition: matlab.h:156
bool unwrap< bool >(const mxArray *array)
Definition: matlab.h:307
std::set< std::shared_ptr< MultipleTemplatesIntFloat > * > Collector_MultipleTemplatesIntFloat
void Test_return_int_30(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
void Test_create_MixedPtrs_17(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_return_pair_33(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Definition: matlab.h:95
void Test_return_Test_25(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void Test_return_vector2_39(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void FunRange_deconstructor_2(int nargout, mxArray *out[], int nargin, const mxArray *in[])
void ForwardKinematics_constructor_64(int nargout, mxArray *out[], int nargin, const mxArray *in[])
Point2 t(10, 10)
static Collector_MyVector12 collector_MyVector12
const Symbol key2('v', 2)
void PrimitiveRefDouble_Brutal_52(int nargout, mxArray *out[], int nargin, const mxArray *in[])
static Collector_MultipleTemplatesIntDouble collector_MultipleTemplatesIntDouble
static Collector_MyFactorPosePoint2 collector_MyFactorPosePoint2


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:01