/*****************************************************************************/
/* noname */
/*****************************************************************************/
//====================================================================[include]
#include <iostream>
#include <cstdlib>
#include <ctime>
#include "cpplapack.h"
using namespace std;
//=======================================================================[main]
/*! main */
int main(int argc, char** argv)
{
srand(time(NULL));
int N(5), CAP(4);
CPPL::dssmatrix A(N,CAP);
A.fput(0,0, 1.);
A.fput(3,2, 2.);
A.fput(1,2, 3.);
A.fput(4,1, 4.);
cout << "A =\n" << A << endl;
for(int c=0; c<A.vol; c++){
cout << "A(" << A.indx[c] << "," << A.jndx[c] << ") ="
<< A.array[c] << endl;
}
CPPL::dcovector x(N);
for(int i=0; i<x.l; i++){
x(i) =double( rand() /(RAND_MAX/10) );
}
cout << "x =\n" << x << endl;
cout << "A*x =\n" << A*x << endl;
CPPL::dsymatrix B(A);
cout << "B =\n" << B << endl;
cout << "B*x =\n" << B*x << endl;
return 0;
}
/*****************************************************************************/