/******************************************************************************* * * TRIQS: a Toolbox for Research in Interacting Quantum Systems * * Copyright (C) 2011 by O. Parcollet * * TRIQS is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * TRIQS is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * TRIQS. If not, see . * ******************************************************************************/ #include "./common.hpp" #include "./src/array.hpp" #include "./src/vector.hpp" #include "./src/matrix.hpp" #include "./src/linalg/det_and_inverse.hpp" #include "./src/linalg/matmul.hpp" #include using std::cout; using std::endl; using namespace triqs::arrays; //using linalg::inverse; //using linalg::inverse_and_compute_det; //using linalg::determinant; template matrix_view eval_as_matrix( Expr const & e) { return matrix(e);} int main(int argc, char **argv) { try { triqs::arrays::matrix W(3,3,FORTRAN_LAYOUT),Wi(3,3,FORTRAN_LAYOUT),Wkeep(3,3,FORTRAN_LAYOUT),A(FORTRAN_LAYOUT); for (int i =0; i<3; ++i) for (int j=0; j<3; ++j) W(i,j) = (i>j ? i+2.5*j : i*0.8-j); /*triqs::arrays::vector ipiv22(3);ipiv22()=0; lapack::getrf(W, ipiv22); std::cout<<"getrf W = "< (inverse(W))< ipiv2(3);ipiv2()=0; lapack::getrf(Wi, ipiv2); std::cerr<<"getrf W = "<