codac 2.0.0
Loading...
Searching...
No Matches
codac2::ProjBase Class Reference

Base class for projection-related operations. More...

#include <codac2_ProjBase.h>

Protected Member Functions

 ProjBase (const std::vector< Index > &proj_indices, const IntervalVector &y, double default_eps=0.01)
 Constructs a ProjBase object.
 
IntervalVector extract_x (const IntervalVector &w) const
 Extracts the projected subvector \(\mathbf{x}\) from a full vector \(\mathbf{w}\in\mathbb{R}^n\).
 
IntervalVector extract_y (const IntervalVector &w) const
 Extracts the complementary subvector \(\mathbf{y}\) from a full vector \(\mathbf{w}\in\mathbb{R}^n\).
 
IntervalVector cart_prod_xy (const IntervalVector &x, const IntervalVector &y) const
 Returns a full vector of dimension \(n\) by merging the two input sub-vectors x and y, according to the projection index sets _xi and _y. The values from x are placed at the positions specified by _xi, and the values from y fill the remaining positions.
 
Index y_max_diam_index (const IntervalVector &y) const
 Returns the component in \(\{0, \dots, n-1\}\) with the largest diameter, among the components of the complementary projection.
 

Detailed Description

Base class for projection-related operations.

ProjBase provides common utilities for projection operators such as CtcProj and SepProj. It handles the decomposition and reconstruction of boxes based on a projection index set \(x_i\in\{0, \dots, n-1\}\).

Used internally by projection contractors and separators to manage subspaces efficiently.

Constructor & Destructor Documentation

◆ ProjBase()

codac2::ProjBase::ProjBase ( const std::vector< Index > & proj_indices,
const IntervalVector & y,
double default_eps = 0.01 )
protected

Constructs a ProjBase object.

Initializes the projection index set \(x_i\) and the complementary vector \(\mathbf{y}\) in a space of dimension \(n\).

Parameters
proj_indicesIndices \(x_i\) of the projected components (kept in \(\mathbf{x}\)).
yInterval vector for the non-projected components.
default_epsDefault epsilon used to explore along the y-column to be projected.

Member Function Documentation

◆ extract_x()

IntervalVector codac2::ProjBase::extract_x ( const IntervalVector & w) const
protected

Extracts the projected subvector \(\mathbf{x}\) from a full vector \(\mathbf{w}\in\mathbb{R}^n\).

Given a full vector \(\mathbf{w}\in\mathbb{R}^n\) and a set of projection indices \(x_i\in\subset\{0, \dots, n-1\}\), this function extracts the components of \(\mathbf{w}\) whose indices belong to \(x_i\).

Parameters
wThe full input vector \(\mathbf{w}\in\mathbb{R}^n\).
Returns
IntervalVector The extracted vector \(\mathbf{x}\), containing the components of \(\mathbf{w}\) at indices defined in \(x_i\).
Note
It complements extract_y().

◆ extract_y()

IntervalVector codac2::ProjBase::extract_y ( const IntervalVector & w) const
protected

Extracts the complementary subvector \(\mathbf{y}\) from a full vector \(\mathbf{w}\in\mathbb{R}^n\).

Given a full vector \(\mathbf{w}\in\mathbb{R}^n\) and a set of projection indices \(x_i\in\{0, \dots, n-1\}\), this function extracts the components of \(\mathbf{w}\) that are not in the projection (i.e., whose indices are in the complement of \(x_i\)).

Parameters
wThe full input vector \(\mathbf{w}\in\mathbb{R}^n\).
Returns
IntervalVector The extracted vector containing the components of \(\mathbf{w}\) at indices not in \(x_i\).
Note
It complements extract_x().

◆ cart_prod_xy()

IntervalVector codac2::ProjBase::cart_prod_xy ( const IntervalVector & x,
const IntervalVector & y ) const
protected

Returns a full vector of dimension \(n\) by merging the two input sub-vectors x and y, according to the projection index sets _xi and _y. The values from x are placed at the positions specified by _xi, and the values from y fill the remaining positions.

Precondition
x.size() == _xi.size()
y.size() == _y.size()
Parameters
xIntervalVector containing the components corresponding to _xi.
yIntervalVector containing the remaining components.
Returns
IntervalVector the full reconstructed vector of dimension \(n\), combining x and y.

◆ y_max_diam_index()

Index codac2::ProjBase::y_max_diam_index ( const IntervalVector & y) const
protected

Returns the component in \(\{0, \dots, n-1\}\) with the largest diameter, among the components of the complementary projection.

Parameters
yThe subvector \(\mathbf{y}\) (complement of the projection).
Returns
Index The \(\mathbf{w}\)-index of the complement components having the largest diameter.

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