views:

224

answers:

1

The program is as following:

#include <iostream>
#include <boost/numeric/mtl/mtl.hpp>
using namespace mtl;
int main(int argc, char* argv[])
{
dense_vector<double> a(5,1.0);
dense_vector<double> b(5,2.0);
a * trans(b);
}

I want to calculate a * trans(b), but there is a compling error :C2893. Will someone help me? Thanks a lot!

+1  A: 

The vector in your program above is a column vector. The constructor you make use of takes two arguments: the size and the initial value.

The reason you're getting the compiler error is probably this:

The transposition of vector is momentarily not implemented yet. It will create a row vector view on a column vector and vice versa.

Matrix Template Library 4: Transposed

Alexandros Gezerlis