dgematrix.dgesv dgbmatrix.dgbsv dsymatrix.dsysv zgematrix.zgesv zgbmatrix.zgbsv zhematrix.zhesv
double
型の実一般行列を例に紹介します.
A.dgesv(y);
//====================================================================[include] #include ``cpplapack.h'' //=======================================================================[main] /*! main */ int main(int argc, char** argv) { //// make dgematrix A //// CPPL::dgematrix A(3,3); A(0,0)=1; A(0,1)=1; A(0,2)=-2; A(1,0)=-3; A(1,1)=2; A(1,2)=1; A(2,0)=3; A(2,1)=-1; A(2,2)=2; //// make dcovector y //// CPPL::dcovector y(3); y(0)=1; y(1)=2; y(2)=3; //// solve Ax=y //// A.dgesv(y); //// print //// std::cout << ``x=\n'' << y << std::endl; return 0; }
x= 1 2 1
]