ZonoOpt v2.1.0
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
ZonoOpt::IntervalMatrix Class Reference

Class for interval matrices (i.e., every element of the matrix is an interval) More...

#include <Intervals.hpp>

Public Member Functions

 IntervalMatrix ()
 IntervalMatrix default constructor.
 
 IntervalMatrix (size_t rows, size_t cols, const std::vector< Eigen::Triplet< Interval > > &triplets)
 IntervalMatrix constructor using triplets.
 
 IntervalMatrix (const Eigen::SparseMatrix< zono_float > &mat_lb, const Eigen::SparseMatrix< zono_float > &mat_ub)
 IntervalMatrix constructor using sparse lower and upper bound matrices.
 
 IntervalMatrix (const Eigen::Matrix< zono_float, -1, -1 > &mat_lb, const Eigen::Matrix< zono_float, -1, -1 > &mat_ub)
 IntervalMatrix constructor using dense lower and upper bound matrices.
 
 IntervalMatrix (const Eigen::Matrix< Interval, -1, -1 > &mat)
 IntervalMatrix constructor from Eigen matrix of intervals.
 
Eigen::SparseMatrix< zono_floatcenter () const
 Get center matrix.
 
Eigen::SparseMatrix< zono_floatdiam () const
 Get diameter matrix.
 
IntervalMatrix radius () const
 Get radius matrix.
 
zono_float width () const
 Get width of interval matrix.
 
Box operator* (const Eigen::Vector< zono_float, -1 > &v) const
 IntervalMatrix multiplication with vector.
 
Box operator* (const Box &box) const
 IntervalMatrix multiplication with Box.
 
IntervalMatrix operator* (const Eigen::SparseMatrix< zono_float, Eigen::RowMajor > &A) const
 IntervalMatrix multiplication with matrix.
 
IntervalMatrix operator* (const IntervalMatrix &other) const
 IntervalMatrix multiplication with another IntervalMatrix.
 
IntervalMatrix operator+ (const IntervalMatrix &other) const
 IntervalMatrix addition.
 
IntervalMatrix operator- (const IntervalMatrix &other) const
 IntervalMatrix subtraction.
 
size_t rows () const
 Get number of rows.
 
size_t cols () const
 Get number of columns.
 
std::string print () const
 Print method.
 

Friends

std::ostream & operator<< (std::ostream &os, const IntervalMatrix &interval_matrix)
 print to ostream
 

Detailed Description

Class for interval matrices (i.e., every element of the matrix is an interval)

Constructor & Destructor Documentation

◆ IntervalMatrix() [1/5]

ZonoOpt::IntervalMatrix::IntervalMatrix ( )
inline

IntervalMatrix default constructor.

◆ IntervalMatrix() [2/5]

ZonoOpt::IntervalMatrix::IntervalMatrix ( size_t  rows,
size_t  cols,
const std::vector< Eigen::Triplet< Interval > > &  triplets 
)

IntervalMatrix constructor using triplets.

Parameters
rowsnumber of rows
colsnumber of columns
tripletstriplets for interval matrix (row, col, interval)

◆ IntervalMatrix() [3/5]

ZonoOpt::IntervalMatrix::IntervalMatrix ( const Eigen::SparseMatrix< zono_float > &  mat_lb,
const Eigen::SparseMatrix< zono_float > &  mat_ub 
)

IntervalMatrix constructor using sparse lower and upper bound matrices.

Parameters
mat_lblower bound matrix
mat_ubupper bound matrix

◆ IntervalMatrix() [4/5]

ZonoOpt::IntervalMatrix::IntervalMatrix ( const Eigen::Matrix< zono_float, -1, -1 > &  mat_lb,
const Eigen::Matrix< zono_float, -1, -1 > &  mat_ub 
)

IntervalMatrix constructor using dense lower and upper bound matrices.

Parameters
mat_lblower bound matrix
mat_ubupper bound matrix

◆ IntervalMatrix() [5/5]

ZonoOpt::IntervalMatrix::IntervalMatrix ( const Eigen::Matrix< Interval, -1, -1 > &  mat)

IntervalMatrix constructor from Eigen matrix of intervals.

Parameters
matmatrix of intervals

Member Function Documentation

◆ center()

Eigen::SparseMatrix< zono_float > ZonoOpt::IntervalMatrix::center ( ) const

Get center matrix.

Returns
center matrix

Each element of center matrix is the center of the corresponding interval in the interval matrix

◆ cols()

size_t ZonoOpt::IntervalMatrix::cols ( ) const
inline

Get number of columns.

Returns
number of cols

◆ diam()

Eigen::SparseMatrix< zono_float > ZonoOpt::IntervalMatrix::diam ( ) const

Get diameter matrix.

Returns
diameter matrix

Each element of the diameter matrix is the width of the corresponding interval in the interval matrix

◆ operator*() [1/4]

Box ZonoOpt::IntervalMatrix::operator* ( const Box box) const

IntervalMatrix multiplication with Box.

Parameters
boxrhs box
Returns
resulting box

◆ operator*() [2/4]

IntervalMatrix ZonoOpt::IntervalMatrix::operator* ( const Eigen::SparseMatrix< zono_float, Eigen::RowMajor > &  A) const

IntervalMatrix multiplication with matrix.

Parameters
Arhs matrix
Returns
resulting interval matrix

◆ operator*() [3/4]

Box ZonoOpt::IntervalMatrix::operator* ( const Eigen::Vector< zono_float, -1 > &  v) const

IntervalMatrix multiplication with vector.

Parameters
vrhs vector
Returns
resulting box

◆ operator*() [4/4]

IntervalMatrix ZonoOpt::IntervalMatrix::operator* ( const IntervalMatrix other) const

IntervalMatrix multiplication with another IntervalMatrix.

Parameters
otherrhs interval matrix
Returns
resulting interval matrix

◆ operator+()

IntervalMatrix ZonoOpt::IntervalMatrix::operator+ ( const IntervalMatrix other) const

IntervalMatrix addition.

Parameters
otherrhs interval matrix
Returns
resulting interval matrix

◆ operator-()

IntervalMatrix ZonoOpt::IntervalMatrix::operator- ( const IntervalMatrix other) const

IntervalMatrix subtraction.

Parameters
otherrhs interval matrix
Returns
resulting interval matrix

◆ print()

std::string ZonoOpt::IntervalMatrix::print ( ) const

Print method.

Returns
string display of IntervalMatrix

◆ radius()

IntervalMatrix ZonoOpt::IntervalMatrix::radius ( ) const

Get radius matrix.

Returns
radius matrix

Returns the IntervalMatrix with each interval shifted to be centered at zero

◆ rows()

size_t ZonoOpt::IntervalMatrix::rows ( ) const
inline

Get number of rows.

Returns
number of rows

◆ width()

zono_float ZonoOpt::IntervalMatrix::width ( ) const

Get width of interval matrix.

Returns
width of interval matrix

Specifically, this returns the max width for any interval in the interval matrix

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const IntervalMatrix interval_matrix 
)
friend

print to ostream

Parameters
osostream
interval_matrixreference to interval matrix
Returns
ostream

The documentation for this class was generated from the following files: