/* Copyright (c) FFLAS-FFPACK * ========LICENCE======== * This file is part of the library FFLAS-FFPACK. * * FFLAS-FFPACK is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ========LICENCE======== */ #include #include #include "fflas-ffpack/fflas-ffpack-config.h" #include "fflas-ffpack/fflas-ffpack.h" #include "fflas-ffpack/utils/fflas_io.h" using namespace std; int main(int argc, char** argv) { if (argc != 3){ std::cerr<<"Usage: pluq

"< F(p); // Reading the matrix from a file double *A; FFLAS::ReadMatrix (file.c_str(),F,m,n,A); size_t * P = FFLAS::fflas_new(m); size_t * Q = FFLAS::fflas_new(n); size_t r = FFPACK::PLUQ (F, FFLAS::FflasNonUnit, m, n, A, n, P, Q); FFLAS::WritePermutation (std::cout<<"P = "<(m * r); double * U = FFLAS::fflas_new(r * n); FFPACK::getTriangular(F, FFLAS::FflasLower, FFLAS::FflasUnit, m, n, r, A, n, L, r, true); FFPACK::getTriangular(F, FFLAS::FflasUpper, FFLAS::FflasNonUnit, m, n, r, A, n, U, n, true); FFLAS::WriteMatrix(std::cout<<"L = "<