|
template<int R = RowsAtCompileTime, int C = ColsAtCompileTime>
requires IsIntervalDomain<Scalar> |
| | Matrix (const Matrix< double, R, C > &lb, const Matrix< double, R, C > &ub) |
| | Constructs an interval matrix from lower and upper bound matrices.
|
| |
template<int R = RowsAtCompileTime, int C = ColsAtCompileTime>
requires IsIntervalDomain<Scalar> |
| | Matrix (int r, int c, const double bounds[][2]) |
| | Constructs an interval matrix from a 2D array of bounds.
|
| |
| auto & | init () |
| | Initializes all elements of the matrix with default intervals.
|
| |
template<int R = RowsAtCompileTime, int C = ColsAtCompileTime, typename OtherDerived>
requires IsIntervalDomain<Scalar> |
| bool | operator== (const MatrixBase< OtherDerived > &x) const |
| | Compares this interval matrix with another matrix for equality.
|
| |
| double | min_rad () const |
| | Returns the minimum radius among the interval elements.
|
| |
| double | max_rad () const |
| | Returns the maximum radius among the interval elements.
|
| |
| double | min_diam () const |
| | Returns the minimum diameter among the interval elements.
|
| |
| double | max_diam () const |
| | Returns the maximum diameter among the interval elements.
|
| |
| Index | min_diam_index () const |
| | Returns the index of the element with the minimum diameter.
|
| |
| Index | max_diam_index () const |
| | Returns the index of the element with the maximum diameter.
|
| |
| Index | extr_diam_index (bool min) const |
| | Returns the index of the element with the minimum or maximum diameter.
|
| |
| void | set_empty () |
| | Marks the interval matrix as empty.
|
| |
| auto & | inflate (double r) |
| | Inflates all intervals in the matrix by a fixed radius.
|
| |
template<typename OtherDerived>
requires IsIntervalDomain<Scalar> |
| auto & | inflate (const MatrixBase< OtherDerived > &r) |
| | Inflates each interval in the matrix by corresponding values from another matrix.
|
| |
| template<typename OtherDerived> |
| auto & | operator&= (const MatrixBase< OtherDerived > &x) |
| | Performs element-wise intersection assignment with another matrix.
|
| |
| template<typename OtherDerived> |
| auto & | operator|= (const MatrixBase< OtherDerived > &x) |
| | Performs element-wise union assignment with another matrix.
|
| |
| template<typename OtherDerived> |
| auto | operator& (const MatrixBase< OtherDerived > &x) const |
| | Returns the element-wise intersection of this matrix with another.
|
| |
| template<typename OtherDerived> |
| auto | operator| (const MatrixBase< OtherDerived > &x) const |
| | Returns the element-wise union of this matrix with another.
|
| |
template<int R = RowsAtCompileTime, int C = ColsAtCompileTime>
requires IsIntervalDomain<Scalar> |
| auto | bisect (Index i, float ratio=0.49) const |
| | Bisects the interval at the given index into two sub-interval matrices.
|
| |
template<int R = RowsAtCompileTime, int C = ColsAtCompileTime>
requires IsIntervalDomain<Scalar> |
| auto | bisect_largest (float ratio=0.49) const |
| | Bisects the interval with the largest diameter in the matrix.
|
| |
This class reuses some of the functions developed for ibex::IntervalMatrixBase. The original IBEX code is revised in modern C++ and adapted to the template structure proposed in Codac, based on the Eigen library. See ibex::IntervalMatrixBase (IBEX lib, author: Gilles Chabert)
This file is included in the declaration of Eigen::MatrixBase, thanks to the preprocessor token EIGEN_MATRIX_PLUGIN. See: https://eigen.tuxfamily.org/dox/TopicCustomizing_Plugins.html and the file codac2_matrices.h
- Date
- 2024
- Author
- Simon Rohou, Gilles Chabert
- Copyright
- Copyright 2023 Codac Team
- License: GNU Lesser General Public License (LGPL)
template<int R = RowsAtCompileTime, int C = ColsAtCompileTime>
requires IsIntervalDomain<Scalar>
| Matrix |
( |
const Matrix< double, R, C > & | lb, |
|
|
const Matrix< double, R, C > & | ub ) |
Constructs an interval matrix from lower and upper bound matrices.
Initializes the interval matrix with the given lower bound matrix lb and upper bound matrix ub.
Each element of the resulting interval matrix is constructed from corresponding elements in lb and ub. If any lower bound element is greater than its corresponding upper bound element, the matrix is set to empty.
- Parameters
-
| lb | Matrix of lower bounds. |
| ub | Matrix of upper bounds. |
- Precondition
lb and ub must have the same size.
52{
53 assert_release(
lb.size() ==
ub.size());
54
55 for(Index i = 0 ; i < this->size() ; i++)
56 {
57 auto& lbi = *(this->data()+i);
58 const auto& ubi = *(
ub.data()+i);
59
60 if(lbi.lb() > ubi)
61 {
63 break;
64 }
65
66 else
67 lbi |= ubi;
68 }
69}
void set_empty()
Marks the interval matrix as empty.
Definition codac2_Matrix_addons_IntervalMatrixBase.h:299
Matrix()=delete
Deleted default constructor to prevent default instantiation when either the number of rows or column...
auto lb() const
Returns a matrix containing the lower bounds of each interval element.
Definition codac2_MatrixBase_addons_IntervalMatrixBase.h:91
auto ub() const
Returns a matrix containing the upper bounds of each interval element.
Definition codac2_MatrixBase_addons_IntervalMatrixBase.h:103