1#ifndef ZONOOPT_INTERVALMATRIX_HPP_
2#define ZONOOPT_INTERVALMATRIX_HPP_
20 using namespace detail;
50 const Eigen::Matrix<zono_float, -1, -1>& mat_ub);
57 explicit IntervalMatrix(
const Eigen::Matrix<Interval, -1, -1>& mat);
64 std::vector<std::vector<Interval>>
to_array()
const;
71 std::tuple<int, int, std::vector<Eigen::Triplet<Interval>>>
to_triplets()
const;
79 Eigen::SparseMatrix<zono_float>
center()
const;
87 Eigen::SparseMatrix<zono_float>
diam()
const;
127 bool contains(
const Eigen::SparseMatrix<zono_float>& mat)
const;
142 Box operator*(
const Eigen::Vector<zono_float, -1>& v)
const;
440 size_t rows()
const {
return rows_; }
446 size_t cols()
const {
return cols_; }
452 std::string
print()
const;
464 std::vector<std::vector<std::pair<size_t, Interval>>> mat_;
Box (i.e., interval vector) class.
Definition Box.hpp:25
Class for interval matrices (i.e., every element of the matrix is an interval)
Definition IntervalMatrix.hpp:27
IntervalMatrix interval_hull(const IntervalMatrix &other) const
Interval matrix interval hull.
Definition IntervalMatrix.cpp:638
size_t rows() const
Get number of rows.
Definition IntervalMatrix.hpp:440
Eigen::SparseMatrix< zono_float > diam() const
Get diameter matrix.
Definition IntervalMatrix.cpp:563
IntervalMatrix operator&(const IntervalMatrix &other) const
Interval matrix intersection oeprator.
Definition IntervalMatrix.cpp:522
bool operator>=(const IntervalMatrix &other) const
Set containment operator.
Definition IntervalMatrix.cpp:537
std::string print() const
Print method.
Definition IntervalMatrix.cpp:715
zono_float width() const
Get width of interval matrix.
Definition IntervalMatrix.cpp:592
friend IntervalMatrix operator+(const Interval &interval, const IntervalMatrix &mat)
IntervalMatrix element-wise addition with interval.
Definition IntervalMatrix.cpp:167
bool contains(const Eigen::SparseMatrix< zono_float > &mat) const
Check whether the interval matrix contains a given sparse matrix.
Definition IntervalMatrix.cpp:671
void operator/=(zono_float alpha)
IntervalMatrix elementwise division by scalar.
Definition IntervalMatrix.cpp:231
IntervalMatrix intersect(const IntervalMatrix &other) const
Interval matrix intersection.
Definition IntervalMatrix.cpp:605
bool operator<=(const IntervalMatrix &other) const
Set containment operator.
Definition IntervalMatrix.cpp:532
Eigen::SparseMatrix< zono_float > center() const
Get center matrix.
Definition IntervalMatrix.cpp:547
friend std::ostream & operator<<(std::ostream &os, const IntervalMatrix &interval_matrix)
print to ostream
Definition IntervalMatrix.cpp:732
std::vector< std::vector< Interval > > to_array() const
Convert to a vector of vectors of Intervals (row-major)
Definition IntervalMatrix.cpp:85
friend IntervalMatrix operator-(const Interval &interval, const IntervalMatrix &mat)
IntervalMatrix elementwise interval subtraction.
Definition IntervalMatrix.cpp:432
bool operator==(const IntervalMatrix &other) const
Set equality operator.
Definition IntervalMatrix.cpp:542
friend IntervalMatrix operator*(zono_float alpha, const IntervalMatrix &A)
IntervalMatrix scalar multiplication.
Definition IntervalMatrix.cpp:213
void operator-=(const IntervalMatrix &other)
IntervalMatrix subtraction in-place.
Definition IntervalMatrix.cpp:437
void operator*=(zono_float alpha)
IntervalMatrix scalar multiplication in-place.
Definition IntervalMatrix.cpp:185
friend IntervalMatrix operator/(zono_float alpha, const IntervalMatrix &A)
IntervalMatrix elementwise scalar division.
Definition IntervalMatrix.cpp:483
bool contains_set(const IntervalMatrix &other) const
Check whether the interval matrix contains another interval matrix.
Definition IntervalMatrix.cpp:693
IntervalMatrix operator|(const IntervalMatrix &other) const
Interval matrix interval hull operator.
Definition IntervalMatrix.cpp:527
std::tuple< int, int, std::vector< Eigen::Triplet< Interval > > > to_triplets() const
Convert to triplets.
Definition IntervalMatrix.cpp:111
size_t cols() const
Get number of columns.
Definition IntervalMatrix.hpp:446
IntervalMatrix radius() const
Get radius matrix.
Definition IntervalMatrix.cpp:579
void operator+=(const IntervalMatrix &other)
IntervalMatrix addition in-place.
Definition IntervalMatrix.cpp:365
IntervalMatrix()
IntervalMatrix default constructor.
Definition IntervalMatrix.hpp:32
Interval class.
Definition Interval.hpp:48
#define zono_float
Defines the floating-point type used in ZonoOpt.
Definition ZonoOpt.hpp:45
Definition ZonoOpt.hpp:58