|
codac 2.0.0
|

Go to the source code of this file.
Functions | |
| 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. | |
| 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
| 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.
| lb | Matrix of lower bounds. |
| ub | Matrix of upper bounds. |
lb and ub must have the same size. | Matrix | ( | int | r, |
| int | c, | ||
| const double | bounds[][2] ) |
Constructs an interval matrix from a 2D array of bounds.
Initializes the matrix with dimensions (r,c) where each element is set to an interval constructed from the corresponding pair of lower and upper bounds in the bounds array.
| r | Number of rows in the matrix. |
| c | Number of columns in the matrix. |
| bounds | 2D array of size [r*c][2], where each sub-array contains the lower and upper bound for one element. |
r and c must be positive. bounds array size must exactly match the total number of elements.(i,j) is initialized to codac2::Interval(bounds[k][0], bounds[k][1]) with k mapping row-major order index.
|
inline |
Initializes all elements of the matrix with default intervals.
Sets every element in the matrix to a default-constructed codac2::Interval.
|
inline |
Compares this interval matrix with another matrix for equality.
Evaluates and casts the other matrix to an interval matrix, then performs an element-wise equality comparison.
| x | The other matrix (of arbitrary derived type) to compare. |
true if the matrices are equal after casting; false otherwise.
|
inline |
Marks the interval matrix as empty.
Sets all elements to an empty interval.
|
inline |
Inflates all intervals in the matrix by a fixed radius.
Adds radius r to each interval element, expanding their bounds.
| r | The non-negative radius by which to inflate each interval. |
r must be greater than or equal to zero.
|
inline |
Inflates each interval in the matrix by corresponding values from another matrix.
Inflates each element by the radius specified at the same position in matrix r.
| r | Matrix containing non-negative inflation radii. |
r must be the same. r must be greater than or equal to zero.
|
inline |
Performs element-wise intersection assignment with another matrix.
Updates each element of this matrix by intersecting it with the corresponding element of matrix x.
If x is empty, this matrix is set empty.
| x | The matrix to intersect with. |
x must be the same.
|
inline |
Performs element-wise union assignment with another matrix.
Updates each element of this matrix by taking the union with the corresponding element of matrix x.
If x is empty, this matrix remains unchanged.
| x | The matrix to union with. |
x must be the same.
|
inline |
Returns the element-wise intersection of this matrix with another.
Creates a copy of this matrix and performs element-wise intersection assignment with matrix x, then returns the result.
| x | The matrix to intersect with. |
|
inline |
Returns the element-wise union of this matrix with another.
Creates a copy of this matrix and performs element-wise union assignment with the interval-casted matrix x, then returns the result.
| x | The matrix to union with. |
|
inline |
Bisects the interval at the given index into two sub-interval matrices.
Splits the interval at element index i into two parts according to the ratio and returns a pair of matrices having the two resulting sub-intervals.
| i | Index of the element to bisect (must be within valid range). |
| ratio | Ratio to determine the split point within the interval (default 0.49, must lie in [0,1]). |
i must be bisectable.
|
inline |
Bisects the interval with the largest diameter in the matrix.
Uses max_diam_index() to find the element with the largest diameter and bisects it using the given ratio.
| ratio | Ratio to determine the split point within the interval (default 0.49). |