template with boost matrix

P

Philipp Kraus

Hi,

I have declared this function in the namespace a::b::c
template<typename T> blas::matrix<T> randomUniformMatrix( const
unsigned int p_row, const unsigned int p_col ) {...}

I defined blas and func with
namespace blas = boost::numeric::ublas;
namespace func = a::b::c;

I try to call the function within a method of my class with:
blas::matrix<long double> l_neurons = func::randomUniformMatrix(
m_countprototypes, m_countprototypes );

The compilere runs into an error:
error: no matching function for call to 'randomUniformMatrix(const
unsigned int&, const unsigned int&)'

If I change the function declaration to
blas::matrix<long double> randomUniformMatrix( const unsigned int
p_row, const unsigned int p_col ) {...}
it works perfect, but I need a variable type for my boost matrix

Can anybody help me to declare my template function correctly?

Thanks PHil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,200
Latest member
LaraHunley

Latest Threads

Top