orocos / orocos-bayesian-filtering

The orocos Bayesian Filtering Library
149 stars 59 forks source link

Replacing #define with strongly typed enum #38

Closed kunaltyagi closed 6 years ago

kunaltyagi commented 6 years ago

Fixes #31 and #30 (somewhat) in the sense that an external #define DEFAULT would still cause an issue (pre-processor is dumb) , nothing we can do about it.

But we use enumerator now, better than static const int for type safety.

This would break a lot of people's setup so we should ideally communicate this to them somehow.

Additional test failure reported with Eigen matrix library (#2)

matrixwrapper_test.cpp:119:Assertion
Test: MatrixwrapperTest::testMatrixWrapperValue
- Expected: 0
- Actual: 7

Breaks a lot of personal code styling guides :smile:

PS: Open for better name as compared to Sampling. SamplingMethod is just a bit too long, SmpMthd is too cryptic...

toeklk commented 6 years ago

Make sense too me. Indeed this breaks backwards compatibility, but this seems to be minor, and BFL hasn't reached version 1.x ;-) Naming: What about "SampleMthd" ?

toeklk commented 6 years ago

Hi Kunal, see above, what do you think about SampleMthd as compromise name?

kunaltyagi commented 6 years ago

Sure. That works. I don't know why the notification didn't appear. I'll update it soon when I get to my workstation.

toeklk commented 6 years ago

Thx!