/* Copyright (c) FFLAS-FFPACK * Written by ZHU Hongguang * ========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 #include "fflas-ffpack/utils/fflas_io.h" #include #include using namespace FFLAS; using namespace FFPACK; int main(int argc, char** argv) { typedef Givaro::Modular Field; Field F(17); // Let A be a M times M square matrix of coefficients const size_t M = 4, lda = M; Field::Element_ptr A; A = fflas_new(F,M,M); // Fulfill the square matrix A so that A is invertible F.assign(A[0], F.one); F.assign (A[1],F.zero); F.assign(A[2],F.one); F.assign (A[3],F.zero); F.assign(A[4],F.zero); F.assign (A[5],F.one); F.assign(A[6],F.zero); F.assign (A[7],F.one); F.assign(A[8],F.zero); F.assign (A[9],F.zero); F.assign(A[10],F.one); F.assign (A[11],F.zero); F.assign(A[12],F.zero); F.assign (A[13],F.zero); F.assign(A[14],(F.zero)); F.assign (A[15],F.one); WriteMatrix(std::cout<<"A:="<s,f0,{0,g0,(0,\:0,t0,+0,=s