C++ Interval Arithmetic Library
Copyright 2002, Sun Microsystems, Inc.
NAME
nmatrix
- An optimized matrix class for interval operations.
SYNOPSIS
#include <suninterval_matrix.h>
template < typename T >
class nmatrix;
DESCRIPTION
nmatrix<T> class represents and manipulates two dimensional
arrays of values. Arrays are stored internally in column-
major order (FORTRAN-style). Indexes of matrix elements
begin with zero. Template specializations are available for
the following types: interval<float>, interval<double>,
interval<long double>, float, double, long double, int, bool
( nmatrix<bool> has restricted usage ).
INTERFACE
template< typename T >
class nmatrix {
public:
// constructors
nmatrix(size_t, size_t);
nmatrix(const T&, size_t, size_t);
nmatrix(const T*, size_t, size_t);
nmatrix(const std::valarray<T>&, size_t, size_t);
nmatrix(const nmatrix<T>&);
// destructor
~nmatrix();
// operator =
nmatrix<T>& operator= (const nmatrix<T>&);
nmatrix<T>& operator= (const T&);
// operator[]
slice_iter<T> operator[] (size_t);
cslice_iter<T> operator[] (size_t) const;
// operator()
mref<T> operator() (size_t, size_t);
T operator() (size_t, size_t) const;
slice_iter<T> operator() (size_t);
cslice_iter<T> operator() (size_t) const;
// unary operators
nmatrix<T> operator+() const;
nmatrix<T> operator-() const;
// computed assignment
nmatrix<T>& operator+= (const nmatrix<T>&);
nmatrix<T>& operator-= (const nmatrix<T>&);
nmatrix<T>& operator*= (const nmatrix<T>&);
nmatrix<T>& operator/= (const nmatrix<T>&);
nmatrix<T>& operator+= (const T&);
nmatrix<T>& operator-= (const T&);
nmatrix<T>& operator*= (const T&);
nmatrix<T>& operator/= (const T&);
// others
slice_iter<T> row(size_t);
cslice_iter<T> row(size_t) const;
slice_iter<T> column(size_t);
cslice_iter<T> column(size_t) const;
size_t size() const;
size_t dim1() const;
size_t dim2() const;
std::valarray<T>& array() const;
};
/* Non-member binary operators */
template< typename T > nmatrix<T>
operator+ (const nmatrix<T>&, const nmatrix<T>&);
template< typename T > nmatrix<T>
operator- (const nmatrix<T>&, const nmatrix<T>&);
template< typename T > nmatrix<T>
operator* (const nmatrix<T>&, const nmatrix<T>&);
template< typename T > nmatrix<T>
operator/ (const nmatrix<T>&, const nmatrix<T>&);
template< typename T > nmatrix<bool>
operator== (const nmatrix<T>&, const nmatrix<T>&);
template< typename T > nmatrix<bool>
operator!= (const nmatrix<T>&, const nmatrix<T>&);
template< typename T > nmatrix<T>
operator+ (const nmatrix<T>&, const T&);
template< typename T > nmatrix<T>
operator- (const nmatrix<T>&, const T&);
template< typename T > nmatrix<T>
operator* (const nmatrix<T>&, const T&);
template< typename T > nmatrix<T>
operator/ (const nmatrix<T>&, const T&);
template< typename T > nmatrix<bool>
operator== (const nmatrix<T>&, const T&);
template< typename T > nmatrix<bool>
operator!= (const nmatrix<T>&, const T&);
template< typename T > nmatrix<T>
operator+ (const T&, const nmatrix<T>&);
template< typename T > nmatrix<T>
operator- (const T&, const nmatrix<T>&);
template< typename T > nmatrix<T>
operator* (const T&, const nmatrix<T>&);
template< typename T > nmatrix<T>
operator/ (const T&, const nmatrix<T>&);
template< typename T > nmatrix<bool>
operator== (const T&, const nmatrix<T>&);
template< typename T > nmatrix<bool>
operator!= (const T&, const nmatrix<T>&);
/* Non-member elementary functions */
template< typename T > nmatrix<T>
sqrt(const nmatrix<T>&)
template< typename T > nmatrix<T>
exp(const nmatrix<T>&)
template< typename T > nmatrix<T>
log(const nmatrix<T>&)
template< typename T > nmatrix<T>
log10(const nmatrix<T>&)
template< typename T > nmatrix<T>
acos(const nmatrix<T>&)
template< typename T > nmatrix<T>
asin(const nmatrix<T>&)
template< typename T > nmatrix<T>
atan(const nmatrix<T>&)
template< typename T > nmatrix<T>
cos(const nmatrix<T>&)
template< typename T > nmatrix<T>
cosh(const nmatrix<T>&)
template< typename T > nmatrix<T>
sin(const nmatrix<T>&)
template< typename T > nmatrix<T>
sinh(const nmatrix<T>&)
template< typename T > nmatrix<T>
tan(const nmatrix<T>&)
template< typename T > nmatrix<T>
tanh(const nmatrix<T>&)
template< typename T > nmatrix<T>
pow(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<T>
pow(const nmatrix<T>&, const nmatrix<int>&)
template< typename T > nmatrix<T>
atan2(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<T>
pow(const nmatrix<T>&, const T&)
template< typename T > nmatrix<T>
pow(const nmatrix<T>&, const int&)
template< typename T > nmatrix<T>
atan2(const nmatrix<T>&, const T&)
template< typename T > nmatrix<T>
pow(const T&, const nmatrix<T>&)
template< typename T > nmatrix<T>
pow(const T&, const nmatrix<int>&)
template< typename T > nmatrix<T>
atan2(const T&, const nmatrix<T>&)
/* Non-member interval-specific functions */
// extraction functions: infimim, supremum, midpoint,
// width, magnitude, mignitude
template< typename T > nmatrix<T>
inf(const nmatrix< interval<T> >&);
template< typename T > nmatrix<T>
sup(const nmatrix< interval<T> >&);
template< typename T > nmatrix<T>
mid(const nmatrix< interval<T> >&);
template< typename T > nmatrix<T>
wid(const nmatrix< interval<T> >&);
template< typename T > nmatrix<T>
mag(const nmatrix< interval<T> >&);
template< typename T > nmatrix<T>
mig(const nmatrix< interval<T> >&);
// intersection division
template< typename T > nmatrix<T>
divix(const nmatrix<T>&, const nmatrix<T>&, const
nmatrix<T>&);
// hull functions: regular hull, intersection
template< typename T > nmatrix<T>
interval_hull(const nmatrix<T>&, const nmatrix<T>&);
template< typename T > nmatrix<T>
intersect(const nmatrix<T>&, const nmatrix<T>&);
template< typename T > nmatrix<T>
interval_hull(const nmatrix<T>&, const T&);
template< typename T > nmatrix<T>
intersect(const nmatrix<T>&, const T&);
template< typename T > nmatrix<T>
interval_hull(const T&, const nmatrix<T>&);
template< typename T > nmatrix<T>
intersect(const T&, const nmatrix<T>&);
// query functions: is empty, ndigits
template< typename T > nmatrix<interval_bool>
is_empty(const nmatrix<T>&);
template< typename T > nmatrix<int>
ndigits(const nmatrix<T>&);
// membership functions
template< typename T1, typename T2 > nmatrix<interval_bool>
in(const nmatrix<T1>&, const nmatrix<T2>&);
// comparison functions: disjoint, in interior,
// subset, superset, proper subset, proper superset
template< typename T > nmatrix<interval_bool>
disjoint(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
in_interior(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
subset(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
superset(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
proper_subset(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
proper_superset(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
disjoint(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
in_interior(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
subset(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
superset(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
proper_subset(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
proper_superset(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
disjoint(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
in_interior(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
subset(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
superset(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
proper_subset(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
proper_superset(const T&, const nmatrix<T>&)
// set relations: equal, not equal,
// less than, less than or equal,
// greater than, greater than or equal
template< typename T > nmatrix<interval_bool>
seq(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
sne(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
slt(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
sle(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
sgt(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
sge(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
seq(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
sne(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
slt(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
sle(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
sgt(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
sge(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
seq(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
sne(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
slt(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
sle(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
sgt(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
sge(const T&, const nmatrix<T>&)
// certainly relations: equal, not equal,
// less than, less than or equal,
// greater than, greater than or equal
template< typename T > nmatrix<interval_bool>
ceq(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
cne(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
clt(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
cle(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
cgt(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
cge(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
ceq(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
cne(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
clt(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
cle(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
cgt(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
cge(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
ceq(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
cne(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
clt(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
cle(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
cgt(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
cge(const T&, const nmatrix<T>&)
// possibly relations: equal, not equal,
// less than, less than or equal,
// greater than, greater than or equal
template< typename T > nmatrix<interval_bool>
peq(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
pne(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
plt(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
ple(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
pgt(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
pge(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
peq(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
pne(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
plt(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
ple(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
pgt(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
pge(const nmatrix<T>&, const T&)
template< typename T > nmatrix<interval_bool>
peq(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
pne(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
plt(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
ple(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
pgt(const T&, const nmatrix<T>&)
template< typename T > nmatrix<interval_bool>
pge(const T&, const nmatrix<T>&)
// arithmetic functions: absolute value, min, max,
// ceil, floor, fmod
template< typename T > nmatrix<T>
fabs(const nmatrix<T>&)
template< typename T > nmatrix<T>
minimum(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<T>
maximum(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<T>
minimum(const nmatrix<T>&, const T&)
template< typename T > nmatrix<T>
maximum(const nmatrix<T>&, const T&)
template< typename T > nmatrix<T>
minimum(const T&, const nmatrix<T>&)
template< typename T > nmatrix<T>
maximum(const T&, const nmatrix<T>&)
template< typename T > nmatrix<T>
ceil(const nmatrix< interval<T> >&)
template< typename T > nmatrix<T>
floor(const nmatrix< interval<T> >&)
template< typename T > nmatrix<T>
fmod(const nmatrix<T>&, const nmatrix<T>&)
template< typename T > nmatrix<T>
fmod(const nmatrix<T>&, const T&)
template< typename T > nmatrix<T>
fmod(const T&, const nmatrix<T>&)
// power functions: square, cube root
template< typename T > nmatrix<T>
sqr(const nmatrix<T>&)
template< typename T > nmatrix<T>
cbrt(const nmatrix<T>&)
/* Other non-member functions */
template< typename T > nmatrix<T>
matmul(const nmatrix<T>& x, const nmatrix<T>& y);
template< typename T > nvector<T>
matmul(const nmatrix<T>& m, const nvector<T>& v);
template< typename T > nvector<T>
matmul(const nvector<T>& v, const nmatrix<T>& m);
template< typename T > nmatrix<T>
transpose(const nmatrix<T>& x);
template< typename T > ostream&
operator<<(ostream& out, const nmatrix<T>& x);
CONSTRUCTORS
nmatrix(size_t n1, size_t n2);
Creates a matrix with n1 lines and n2 columns, containing
values initialized with the default value for type T.
nmatrix(const T& value, size_t n1, size_t n2);
Creates a matrix with n1 lines and n2 columns, containing
values initialized with value.
nmatrix(const T* value, size_t n1, size_t n2);
Creates a matrix with n1 lines and n2 columns, containing
values initialized with the first n1*n2 elements pointed
to by value. The array pointed to by value must contain
at least n1*n2 values.
nmatrix(const std::valarray<T>& x, size_t n1, size_t n2);
Creates a matrix with n1 lines and n2 columns, containing
values initialized with the first n1*n2 elements of x.
nmatrix(const nmatrix<T>& x);
Creates a copy of x.
DESTRUCTORS
~nmatrix();
Releases all allocated memory.
ASSIGNMENT OPERATORS
nmatrix<T>& operator= (const nmatrix<T>& x);
Assigns to each element of self the corresponding value
from x. Returns a reference to self.
nmatrix<T>& operator= (const T& x);
Assigns to each element of self the value of x. Returns a
reference to self.
REFERENCE OPERATORS
cslice_iter<T> operator[] (size_t n) const;
Returns a const iterator object which can be used to
iterate through the n-th row of self. The index n must be
between 0 and dim1() less one.
slice_iter<T> operator[] (size_t n);
Returns an iterator object which can be used to iterate
through the n-th row of self. The index n must be between
0 and dim1() less one.
T operator() (size_t n1, size_t n2) const;
Returns a value of element at n1-th line and n2-th
column.
mref<T> operator() (size_t n1, size_t n2);
Returns a reference to element at n1-th line and n2-th
column. The result can be used as an lvalue. This refer-
ence is valid until the matrix is destroyed.
cslice_iter<T> operator() (size_t n) const;
Same as cslice_iter<T> operator[] (size_t n) const;
slice_iter<T> operator() (size_t n);
Same as slice_iter<T> operator[] (size_t n);
UNARY OPERATORS
nmatrix<T> operator+() const;
Returns a new nmatrix object with the same shape as the
matrix in self where each element has been initialized by
applying operator+ to the corresponding element in self.
nmatrix<T> operator-() const;
Returns a new nmatrix object with the same shape as the
matrix in self where each element has been initialized by
applying operator- to the corresponding element in self.
COMPUTED ASSIGNMENT OPERATORS
nmatrix<T>& operator+= (const nmatrix<T>& x);
nmatrix<T>& operator-= (const nmatrix<T>& x);
nmatrix<T>& operator*= (const nmatrix<T>& x);
nmatrix<T>& operator/= (const nmatrix<T>& x);
Applies the indicated operation to each element in self,
using the corresponding element from x as the right hand
argument. The shape of x must be same as shape of self.
Returns self.
nmatrix<T>& operator+= (const T& val);
nmatrix<T>& operator-= (const T& val);
nmatrix<T>& operator*= (const T& val);
nmatrix<T>& operator/= (const T& val);
Applies the indicated operation to each element in self,
using val as the right hand argument. Returns self.
MEMBER FUNCTIONS
cslice_iter<T> row(size_t n) const;
Returns a const iterator object which can be used to
iterate through the n-th row of self. The index n must be
between 0 and dim1() less one.
slice_iter<T> row(size_t n);
Returns an iterator object which can be used to iterate
through the n-th row of self. The index n must be between
0 and dim1() less one.
cslice_iter<T> column(size_t n) const;
Returns a const iterator object which can be used to
iterate through the n-th column of self. The index n must
be between 0 and dim2() less one.
slice_iter<T> column(size_t n);
Returns an iterator object which can be used to iterate
through the n-th column of self. The index n must be
between 0 and dim2() less one.
size_t size() const;
Returns total number of elements (dim1()*dim2()).
size_t dim1() const;
Returns number of lines of a matrix.
size_t dim2() const;
Returns number of column of a matrix.
std::valarray<T>& array() const;
Returns valarray representation of nmatrix.
NON-MEMBER BINARY OPERATORS
template< typename T > nmatrix<T>
operator+ (const nmatrix<T>& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<T>
operator- (const nmatrix<T>& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<T>
operator* (const nmatrix<T>& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<T>
operator/ (const nmatrix<T>& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<bool>
operator== (const nmatrix<T>& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<bool>
operator!= (const nmatrix<T>& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<T>
operator+ (const nmatrix<T>& lhs, const T& rhs);
template< typename T > nmatrix<T>
operator- (const nmatrix<T>& lhs, const T& rhs);
template< typename T > nmatrix<T>
operator* (const nmatrix<T>& lhs, const T& rhs);
template< typename T > nmatrix<T>
operator/ (const nmatrix<T>& lhs, const T& rhs);
template< typename T > nmatrix<bool>
operator== (const nmatrix<T>& lhs, const T& rhs);
template< typename T > nmatrix<bool>
operator!= (const nmatrix<T>& lhs, const T& rhs);
template< typename T > nmatrix<T>
operator+ (const T& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<T>
operator- (const T& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<T>
operator* (const T& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<T>
operator/ (const T& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<bool>
operator== (const T& lhs, const nmatrix<T>& rhs);
template< typename T > nmatrix<bool>
operator!= (const T& lhs, const nmatrix<T>& rhs);
Returns a new nmatrix object with the same shape as the
argument matrices where each element has been initialized
by applying the indicated operation to the corresponding
elements in the argument matrices. The argument matrices
must have the same shape.
NON-MEMBER ELEMENTARY FUNCTIONS
template< typename T > nmatrix<T>
sqrt(const nmatrix<T>& x)
template< typename T > nmatrix<T>
exp(const nmatrix<T>& x)
template< typename T > nmatrix<T>
log(const nmatrix<T>& x)
template< typename T > nmatrix<T>
log10(const nmatrix<T>& x)
template< typename T > nmatrix<T>
acos(const nmatrix<T>& x)
template< typename T > nmatrix<T>
asin(const nmatrix<T>& x)
template< typename T > nmatrix<T>
atan(const nmatrix<T>& x)
template< typename T > nmatrix<T>
cos(const nmatrix<T>& x)
template< typename T > nmatrix<T>
cosh(const nmatrix<T>& x)
template< typename T > nmatrix<T>
sin(const nmatrix<T>& x)
template< typename T > nmatrix<T>
sinh(const nmatrix<T>& x)
template< typename T > nmatrix<T>
tan(const nmatrix<T>& x)
template< typename T > nmatrix<T>
tanh(const nmatrix<T>& x)
template< typename T > nmatrix<T>
pow(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
pow(const nmatrix<T>& x, const nmatrix<int>& y)
template< typename T > nmatrix<T>
atan2(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
pow(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<T>
pow(const nmatrix<T>& x, const int& y)
template< typename T > nmatrix<T>
atan2(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<T>
pow(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
pow(const T& x, const nmatrix<int>& y)
template< typename T > nmatrix<T>
atan2(const T& x, const nmatrix<T>& y)
Returns a new nmatrix object with the same shape as the
argument matrix (matrices) where each element has been
initialized by applying the indicated elementary function
to the corresponding elements in the argument matrix
(matrices).
NON-MEMBER INTERVAL-SPECIFIC FUNCTIONS
template< typename T > nmatrix<T>
inf(const nmatrix< interval<T> >& x);
template< typename T > nmatrix<T>
sup(const nmatrix< interval<T> >& x);
template< typename T > nmatrix<T>
mid(const nmatrix< interval<T> >& x);
template< typename T > nmatrix<T>
wid(const nmatrix< interval<T> >& x);
template< typename T > nmatrix<T>
mag(const nmatrix< interval<T> >& x);
template< typename T > nmatrix<T>
mig(const nmatrix< interval<T> >& x);
template< typename T > nmatrix<T>
divix(const nmatrix<T>& x, const nmatrix<T>& y, const
nmatrix<T>& z);
template< typename T > nmatrix<T>
interval_hull(const nmatrix<T>& x, const nmatrix<T>& y);
template< typename T > nmatrix<T>
intersect(const nmatrix<T>& x, const nmatrix<T>& y);
template< typename T > nmatrix<T>
interval_hull(const nmatrix<T>& x, const T& y);
template< typename T > nmatrix<T>
intersect(const nmatrix<T>& x, const T& y);
template< typename T > nmatrix<T>
interval_hull(const T& x, const nmatrix<T>& y);
template< typename T > nmatrix<T>
intersect(const T& x, const nmatrix<T>& y);
template< typename T > nmatrix<interval_bool>
is_empty(const nmatrix<T>& x);
template< typename T > nmatrix<int>
ndigits(const nmatrix<T>& x);
template< typename T1, typename T2 > nmatrix<interval_bool>
in(const nmatrix<T1>& x, const nmatrix<T2>& y);
template< typename T > nmatrix<interval_bool>
disjoint(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
in_interior(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
subset(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
superset(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
proper_subset(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
proper_superset(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
disjoint(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
in_interior(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
subset(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
superset(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
proper_subset(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
proper_superset(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
disjoint(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
in_interior(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
subset(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
superset(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
proper_subset(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
proper_superset(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
seq(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
sne(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
slt(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
sle(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
sgt(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
sge(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
seq(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
sne(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
slt(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
sle(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
sgt(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
sge(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
seq(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
sne(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
slt(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
sle(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
sgt(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
sge(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
ceq(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
cne(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
clt(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
cle(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
cgt(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
cge(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
ceq(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
cne(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
clt(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
cle(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
cgt(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
cge(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
ceq(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
cne(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
clt(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
cle(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
cgt(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
cge(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
peq(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
pne(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
plt(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
ple(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
pgt(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
pge(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
peq(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
pne(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
plt(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
ple(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
pgt(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
pge(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<interval_bool>
peq(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
pne(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
plt(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
ple(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
pgt(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<interval_bool>
pge(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
fabs(const nmatrix<T>& x)
template< typename T > nmatrix<T>
minimum(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
maximum(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
minimum(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<T>
maximum(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<T>
minimum(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
maximum(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
ceil(const nmatrix< interval<T> >& x)
template< typename T > nmatrix<T>
floor(const nmatrix< interval<T> >& x)
template< typename T > nmatrix<T>
fmod(const nmatrix<T>& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
fmod(const nmatrix<T>& x, const T& y)
template< typename T > nmatrix<T>
fmod(const T& x, const nmatrix<T>& y)
template< typename T > nmatrix<T>
sqr(const nmatrix<T>& x)
template< typename T > nmatrix<T>
cbrt(const nmatrix<T>& x)
These functions are defined only for nmatrix instantiated
on interval data types: interval<float>, interval<double>
and interval<long double>. Returns a new nmatrix object
with the same shape as the argument matrix (matrices)
where each element has been initialized by applying the
indicated function to the corresponding elements in the
argument matrix (matrices).
OTHER NON-MEMBER FUNCTIONS
template< typename T > nmatrix<T>
matmul(const nmatrix<T>& x, const nmatrix<T>& y);
Returns result of multiplication of matrix x by matrix y.
x.dim2() must be equal to y.dim1().
template< typename T > nvector<T>
matmul(const nmatrix<T>& m, const nvector<T>& v);
Returns result of multiplication of matrix m by vector v.
m.dim2() must be equal to v.size().
template< typename T > nvector<T>
matmul(const nvector<T>& v, const nmatrix<T>& m);
Returns result of multiplication of vector v by matrix m.
v.size() must be equal to m.dim1().
template< typename T > nmatrix<T>
transpose(const nmatrix<T>& x);
Returns result of transposition of matrix x.
template< typename T > ostream&
operator<<(ostream& out, const nmatrix<T>& x);
Outputs all elements of x to a stream out.
EXAMPLE
#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;
}