[mlpack] Aliasing to object with templated type and size

Joe Dinius josephwdinius at gmail.com
Mon Sep 2 16:45:54 EDT 2019


Ryan's really helped me out so far, so I'm hoping he can do the same for
this simple issue I'm having.

I'd like to be able to allocate my own fixed size vector-type using
aliasing.  The following code works well for this:

template<size_T N>
using Vector = typename arma::colvec::fixed<N>;

Additionally, it would be really handy If I could add the *type* to the
template definition as well; something like this:

template<typename T, size_T N>
using Vector = typename arma::Col<T>::fixed<N>;

However, this *does not* work; it fails to compile.  This seems more an
issue with how I am abusing the 11-standard and not an issue with
armadillo, but I am hoping that someone on this list can shed some light on
what I am doing wrong here:  how can I achieve the desired design pattern
"Vector<double, N>" is an armadillo vector of doubles of fixed size N.

Thanks,

Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://knife.lugatgt.org/pipermail/mlpack/attachments/20190902/4efbcef5/attachment.html>


More information about the mlpack mailing list