EMatrix
readme_example.cpp
Go to the documentation of this file.
1 /*! This file is part of EMatrix, the C++ matrix library distribution.
2  * This project is licensed under the terms of the MIT license. The full text
3  * of the license file can be found in LICENSE.
4  */
5 
6 /// \file
7 
8 
9 // to compile: g++ example_in_readme.cpp -llapack
10 // or g++ example_in_readme.cpp "-l:liblapack.so.3"
11 
12 #include <iostream>
13 #include "EMatrix.h"
14 
15 //! Begin and the very beginning.
16 int main(void) {
17 
18  ematrix::Matrix<double,3,3> A = {1.,2.,3.,0.,0.,0.,0,0,0};
19  ematrix::Matrix<double,3,3> B = {1,1,1,3,4,5,3,6,10};
20  std::cout << A+inv(B);
21 
22  return(0);
23 }
24 
25 /* Those interested in generating integer matrix inverse pairs, please see:
26  * Ericksen, W. S. Inverse Pairs of Matrices with Integer Elements.
27  * SIAM Journal on Numerical Analysis, 1980, Vol. 17, No. 3 : pp. 474-477
28  */
int main(void)
Begin and the very beginning.
Matrix< float, tRows, tRows > inv(const Matrix< float, tRows, tRows > &R)
Definition: EMatrix.h:841