#include "Teuchos_Version.hpp"
int main(int argc, char* argv[])
{
std::cout << Teuchos::Teuchos_Version() << std::endl << std::endl;
int rows, cols, stride;
rows = My_Copy3.numRows();
cols = My_Copy3.numCols();
stride = My_Copy3.stride();
Empty_Matrix.shape( 3, 3 );
My_Matrix.reshape( 3, 3 );
My_Matrix.random();
My_Copy1.putScalar( 1.0 );
My_Copy2(1,1) = 10.0;
Empty_Matrix = My_Matrix;
x = 1.0;
y = 1.0;
double d;
1.0, My_Matrix, My_Copy3, 0.0 );
My_Copy2 += My_Matrix;
My_Copy2.scale( 0.5 );
d = x.dot( y );
(void)d;
double *My_Array=0, *My_Column=0;
My_Array = My_Matrix.values();
My_Column = My_Matrix[2];
(void)My_Array;
(void)My_Column;
double norm_one, norm_inf, norm_fro;
norm_one = My_Matrix.normOne();
norm_inf = My_Matrix.normInf();
norm_fro = My_Matrix.normFrobenius();
(void)norm_one;
(void)norm_inf;
(void)norm_fro;
if (Empty_Matrix == My_Matrix) {
std::cout<< "The matrices are the same!" <<std::endl;
}
if (My_Copy2 != My_Matrix) {
std::cout<< "The matrices are different!" <<std::endl;
}
X.putScalar(1.0);
X.putScalar(0.0);
int info = 0;
info = My_Solver.factor();
if (info != 0)
std::cout << "Teuchos::SerialDenseSolver::factor() returned : " << info << std::endl;
info = My_Solver.solve();
if (info != 0)
std::cout << "Teuchos::SerialDenseSolver::solve() returned : " << info << std::endl;
std::cout<< std::endl << printMat(My_Matrix) << std::endl;
std::cout<< printMat(X) << std::endl;
return 0;
}
Reference-counted pointer class and non-member templated function implementations.
Templated serial dense matrix class.
Templated class for solving dense linear problems.
Templated serial dense vector class.
Smart reference counting pointer class for automatic garbage collection.
#define TEUCHOS_ASSERT_EQUALITY(val1, val2)
This macro is checks that to numbers are equal and if not then throws an exception with a good error ...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.