You are on page 1of 1

#include <iostream.

h>
#include <suninterval_matrix.h>

using namespace SUNW_interval;

main()
{
// create matrix and vector
nmatrix< interval<double> > m( interval<double>(2.0, 3.0), 3,
3);
nvector< interval<double> > v( interval<double>(2.0, 3.0), 3);

// examples of equivalent references to


// element at line 2 and column 3
m(1,2) = interval<double>(4.0);
cout << m(1)(2)<< endl;
cout << m(1)[2]<< endl;
cout << m[1](2)<< endl;
cout << m[1][2]<< endl;

// print result of multiplication of matrix by column


cout << matmul(m,v) << endl;

// print result of multiplication of line by matrix


cout << matmul(v,m) << endl;
}

You might also like