cut-pursuit icon indicating copy to clipboard operation
cut-pursuit copied to clipboard

MEX Errors

Open xueao opened this issue 6 years ago • 2 comments

Hi Loicland: When I tried to compile cut-pursuit with matlab using mex, the following errors occured: ..\cut-pursuit\include\Common.h(38): error C2131: expression is not a constant. ..\cut-pursuit\include\Common.h(38): note: A call to a function that is undefined or a function that is not declared as "constexpr" causes a failure. Do you know how to fix it? thank you!

xueao avatar Jun 19 '18 03:06 xueao

Hi,

Which version of GCC are you using?

You could also rewrite this part using new if you don't want to change compilers, see this thread. I would rewrite it but I am away for a few weeks so I won't be able to do it myself in the very short term.

loicland avatar Jun 19 '18 21:06 loicland

same for the Matlab demo code:

expected output after running the demo script provided here: L0-CUT PURSUIT WITH L2 FIDELITY PARAMETERIZATION = FAST Graph 102 vertices and 598 edges and observation of dimension 3 Iteration 1 - 16 components - Saturation 0.0 % - Quadratic Energy 86.956 % - Timer 0.007407 Iteration 2 - 41 components - Saturation 7.0 % - Quadratic Energy 72.009 % - Timer 0.010206 Iteration 3 - 49 components - Saturation 59.0 % - Quadratic Energy 69.368 % - Timer 0.012488 Iteration 4 - 49 components - Saturation 79.0 % - Quadratic Energy 68.690 % - Timer 0.014166 Iteration 5 - 49 components - Saturation 83.0 % - Quadratic Energy 68.690 % - Timer 0.015775 Stopping criterion reached

Not-IITian avatar Nov 05 '18 14:11 Not-IITian