Boost logo

Ublas :

Subject: [ublas] triangular matrix static const initialization
From: Nathanial Timothy Smith (smithnt_at_[hidden])
Date: 2009-03-19 20:06:29


Hi, I'm a relatively new user to boost. I'm wondering what the syntax is for statically initializing triangular matrices? I see that the constructor for the triangular matrix supports some kind of initialization at instantiation time, but I'm unsure of the syntax. Also, along the same lines, is there a way to statically initialize a vector at instantiation time?

for example:

static const boost::numeric::ublas::triangular_matrix<double> TM(N,N) = ???;

static const boost::numeric::ublas::vector<double> A(n) = ???;

As you can see, I just want to create a lower triangular matrix with a constant size and initialize with constant values.

For the vector, standard array syntax, e.g. {1.0, 2.0, 3.0} doesn't seem to work.

Thank you,

Neal