[mlpack-git] [mlpack] Serialization of ann (#513)
Ryan Curtin
notifications at github.com
Mon Feb 8 10:11:45 EST 2016
Ooh, this is a really cool trick that Conrad wrote into Armadillo and I really like it. Inside of Mat_bones.hpp there are these lines, inside of the definition of the class `Mat`:
```
public:
#ifdef ARMA_EXTRA_MAT_PROTO
#include ARMA_INCFILE_WRAP(ARMA_EXTRA_MAT_PROTO)
#endif
```
So if you've defined `ARMA_EXTRA_MAT_PROTO`, it just gets included right there in the class definition. The same is true in `Mat_meat.hpp`, and a few other files (including the cube files). This is really cool because it allows the class to be extensible. So I add the definitions of the functions in `Mat_extra_bones.hpp` and set that file to be `ARMA_EXTRA_MAT_PROTO`, then the implementations in `Mat_extra_meat.hpp`. I think it's a really cool trick. :)
---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/513#issuecomment-181407286
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160208/34cc15f2/attachment.html>
More information about the mlpack-git
mailing list