50int main(
int argc,
char* argv[])
69 int rows, cols, stride;
70 rows = My_Copy3.numRows();
71 cols = My_Copy3.numCols();
72 stride = My_Copy3.stride();
78 Empty_Matrix.shape( 3, 3 );
79 My_Matrix.reshape( 3, 3 );
83 My_Copy1.putScalar( 1.0 );
85 Empty_Matrix = My_Matrix;
94 1.0, My_Matrix, My_Copy3, 0.0 );
95 My_Copy2 += My_Matrix;
96 My_Copy2.scale( 0.5 );
101 double *My_Array=0, *My_Column=0;
102 My_Array = My_Matrix.values();
103 My_Column = My_Matrix[2];
108 double norm_one, norm_inf, norm_fro;
109 norm_one = My_Matrix.normOne();
110 norm_inf = My_Matrix.normInf();
111 norm_fro = My_Matrix.normFrobenius();
118 if (Empty_Matrix == My_Matrix) {
119 std::cout<<
"The matrices are the same!" <<std::endl;
122 if (My_Copy2 != My_Matrix) {
123 std::cout<<
"The matrices are different!" <<std::endl;
134 My_Solver.setMatrix(
Teuchos::rcp( &My_Matrix,
false ) );
136 info = My_Solver.factor();
138 std::cout <<
"Teuchos::SerialDenseSolver::factor() returned : " << info << std::endl;
139 info = My_Solver.solve();
141 std::cout <<
"Teuchos::SerialDenseSolver::solve() returned : " << info << std::endl;
144 std::cout<< std::endl << printMat(My_Matrix) << std::endl;
145 std::cout<< printMat(X) << std::endl;