#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 );
My_Matrix.reshape( 3 );
My_Matrix.random();
My_Copy1.putScalar( 1.0 );
My_Copy1 = 1.0;
My_Copy2(1,1) = 10.0;
Empty_Matrix = My_Matrix;
My_GenMatrix = 1.0;
My_Copy2 += My_Matrix;
My_Copy2 *= 0.5;
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;
}
double norm_one, norm_inf, norm_fro;
norm_one = My_Matrix.normOne();
norm_inf = My_Matrix.normInf();
norm_fro = My_Matrix.normFrobenius();
std::cout << std::endl << "|| My_Matrix ||_1 = " << norm_one << std::endl;
std::cout << "|| My_Matrix ||_Inf = " << norm_inf << std::endl;
std::cout << "|| My_Matrix ||_F = " << norm_fro << std::endl << std::endl;
My_Matrix2.random();
X = 1.0;
X = 0.0;
int info = 0;
info = My_Solver.factor();
if (info != 0)
std::cout << "Teuchos::SerialSpdDenseSolver::factor() returned : " << info << std::endl;
info = My_Solver.solve();
if (info != 0)
std::cout << "Teuchos::SerialSpdDenseSolver::solve() returned : " << info << std::endl;
double alpha=0.5;
A1(0,0) = 1.0, A1(1,1) = 2.0;
A2(0,0) = 1.0, A2(1,1) = 2.0, A2(2,2) = 3.00;
W = 1.0;
std::cout<< printMat(My_Matrix) << std::endl;
std::cout<< printMat(X) << std::endl;
return 0;
}
Reference-counted pointer class and non-member templated function implementations.
Non-member helper functions on the templated serial, dense matrix/vector classes.
Templated serial dense matrix class.
Templated class for constructing and using Hermitian positive definite dense matrices.
Templated serial, dense, symmetric matrix 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.