Interval Arithmetic

For interval arithmetic, we use the Filib library.

class Interval : public interval

Interval type.

Public Functions

inline Interval(const interval& i)

Construct an Interval from a filib interval.

Parameters:
const interval &i

The filib interval

inline Interval()

Construct an empty Interval.

inline explicit Interval(double x)

Construct an Interval from a single value.

Parameters:
double x

The value

inline Interval(double x, double y)

Construct an Interval from two values.

Parameters:
double x

The infimum value

double y

The supremum value

Helper Functions

filib::Interval ipc::norm(const Eigen::Ref<const VectorXI>& v)

Compute the L2 norm of a n-dimensional interval.

Note

This should be used instead of the .norm() method of Eigen because it avoids negative values in intermediate computations.

Parameters:
const Eigen::Ref<const VectorXI> &v

The n-dimensional interval

Returns:

The L2 norm of the interval

filib::Interval ipc::squared_norm(
    const
 Eigen::Ref<const VectorXI>& v
)

Compute the squared L2 norm of an n-dimensional interval.

Note

This should be used instead of the .squaredNorm() method of Eigen because it avoids negative values in intermediate computations.

Parameters:
const Eigen::Ref<const VectorXI> &v

The n-dimensional interval

Returns:

The squared L2 norm of the interval

Type Definitions

using ipc::Vector2I = Eigen::Vector2<filib::Interval>

2D vector of intervals

using ipc::Vector3I = Eigen::Vector3<filib::Interval>

3D vector of intervals

using ipc::VectorXI = Eigen::VectorX<filib::Interval>

Dynamic vector of intervals.

using ipc::RowVector2I = Eigen::RowVector2<filib::Interval>

2D row vector of intervals

using ipc::RowVector3I = Eigen::RowVector3<filib::Interval>

3D row vector of intervals

using ipc::RowVectorXI = Eigen::RowVectorX<filib::Interval>

Dynamic row vector of intervals.

using ipc::Matrix2I = Eigen::Matrix2<filib::Interval>

2x2 matrix of intervals

using ipc::Matrix3I = Eigen::Matrix3<filib::Interval>

3x3 matrix of intervals

using ipc::MatrixXI = Eigen::MatrixX<filib::Interval>

Dynamic matrix of intervals.

using ipc::VectorMax3I = VectorMax3<filib::Interval>

Dynamic vector of intervals with a maximum size of 3.

using ipc::RowVectorMax3I = RowVectorMax3<filib::Interval>

Dynamic row vector of intervals with a maximum size of 3.

using ipc::MatrixMax3I = MatrixMax3<filib::Interval>

Dynamic matrix of intervals with a maximum size of 3x3.


Last update: Dec 12, 2024