#include <iostream> #include <fstream> #include <iomanip> #include <strstream> #define WANT_STREAM #define WANT_MATH #include "miscmaths.h" #include "sparse_matrix.h" #include "libprob.h" using namespace MISCMATHS; int main(int argc, char *argv[]) { try{ SparseMatrix x(3,4); SparseMatrix y(3,4); x.insert(1,1,1); y.insert(1,1,2); y.insert(1,2,3); x.insert(2,3,1.5); y.insert(2,4,3); x.insert(2,4,-1); y.insert(3,4,6); SparseMatrix ret; OUT(x.AsMatrix()); OUT(y.AsMatrix()); add(x,y,ret); OUT(ret.AsMatrix()); } catch(Exception p_excp) { cerr << p_excp.what() << endl; } return 0; }