Starting Eigen 2 development. The current plan is to use the last

release of tvmet (inactive for 2 years and developer unreachable) as the
basis for eigen2, because it provides seemingly good expression template
mechanisms, we want that, and it would take years to reinvent that
wheel. We'll see. So this commit imports the last tvmet release.
This commit is contained in:
Benoit Jacob
2007-05-30 06:24:51 +00:00
commit 3036eeca0a
244 changed files with 95342 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
/*
* $Id: alias.cc,v 1.1 2004/03/26 07:56:32 opetzold Exp $
*
* This example shows the solution of the problem with aliasing
* mentioned at
* http://tvmet.sourceforge.net/notes.html#alias
*/
#include <iostream>
#include <algorithm>
#include <tvmet/Matrix.h>
#include <tvmet/Vector.h>
#include <tvmet/util/Incrementor.h>
using namespace std;
int main()
{
typedef tvmet::Matrix<double, 3, 3> matrix_type;
matrix_type M;
std::generate(M.begin(), M.end(),
tvmet::util::Incrementor<matrix_type::value_type>());
std::cout << "M = " << M << std::endl;
alias(M) = M * trans(M);
std::cout << M << std::endl;
}