codac 1.5.6
Loading...
Searching...
No Matches
codac::TubeVector Class Reference

n-dimensional tube \([\mathbf{x}](\cdot)\), defined as an interval of n-dimensional trajectories More...

#include <codac_TubeVector.h>

Inheritance diagram for codac::TubeVector:
Collaboration diagram for codac::TubeVector:

Public Member Functions

Definition
 TubeVector (const Interval &tdomain, int n)
 Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) made of one slice.
 
 TubeVector (const Interval &tdomain, const IntervalVector &codomain)
 Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) made of one slice.
 
 TubeVector (const Interval &tdomain, double timestep, int n)
 Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) with some temporal discretization.
 
 TubeVector (const Interval &tdomain, double timestep, const IntervalVector &codomain)
 Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) with some temporal discretization.
 
 TubeVector (const Interval &tdomain, double timestep, const TFnc &f)
 Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) from a TFnc object and with some temporal discretization.
 
 TubeVector (const std::vector< Interval > &v_tdomains, const std::vector< IntervalVector > &v_codomains)
 Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) from a list of \(k\) boxes \(\big([t_1]\times[\mathbf{x}_1],\dots,[t_k]\times[\mathbf{x}_k]\big)\).
 
 TubeVector (std::initializer_list< Tube > list)
 Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) from a list of Tube objects.
 
 TubeVector (const TubeVector &x)
 Creates a copy of a n-dimensional tube \([\mathbf{x}](\cdot)\), with the same time discretization.
 
 TubeVector (const TubeVector &x, const IntervalVector &codomain)
 Creates a copy of a n-dimensional tube \([\mathbf{x}](\cdot)\), with the same time discretization but a specific constant codomain.
 
 TubeVector (int n, const Tube &x)
 Creates a n-dimensional tube with all the components initialized to \([x](\cdot)\).
 
 TubeVector (const TrajectoryVector &traj, double timestep)
 Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) enclosing a n-dimensional trajectory \(\mathbf{x}(\cdot)\), possibly with some temporal discretization.
 
 TubeVector (const TrajectoryVector &lb, const TrajectoryVector &ub, double timestep)
 Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) defined as an interval of two n-dimensional trajectories \([\mathbf{lb}(\cdot),\mathbf{ub}(\cdot)]\).
 
 TubeVector (const std::string &binary_file_name)
 Restore a n-dimensional tube from serialization.
 
 TubeVector (const std::string &binary_file_name, TrajectoryVector *&traj)
 Restore a n-dimensional tube from serialization, together with a TrajectoryVector object.
 
 ~TubeVector ()
 TubeVector destructor.
 
int size () const
 Returns the dimension of the tube.
 
void resize (int n)
 Resizes this TubeVector.
 
const TubeVector subvector (int start_index, int end_index) const
 Returns a subvector of this TubeVector.
 
void put (int start_index, const TubeVector &subvec)
 Puts a subvector into this TubeVector at a given position.
 
const TubeVector primitive () const
 Returns the primitive TubeVector of this tube, with a zero constant of integration.
 
const TubeVector primitive (const IntervalVector &c) const
 Returns the primitive TubeVector of this tube.
 
const TubeVectoroperator= (const TubeVector &x)
 Returns a copy of a TubeVector.
 
const Interval tdomain () const
 Returns the temporal definition domain of this tube.
 
const TrajectoryVector lb () const
 Returns a possible lower bound \(\mathbf{x}^{-}(\cdot)\) of the tube.
 
const TrajectoryVector ub () const
 Returns a possible upper bound \(\mathbf{x}^{+}(\cdot)\) of the tube.
 
Slices structure
int nb_slices () const
 Returns the number of slices of this tube.
 
int time_to_index (double t) const
 Returns the Slice index related to the temporal key \(t\).
 
void sample (double t)
 Samples this tube at \(t\).
 
void sample (double t, const IntervalVector &gate)
 Samples this tube at \(t\) with a specific gate value.
 
void sample (const Tube &x)
 Samples this tube so that each component will share the same sampling of the scalar \([x](\cdot)\).
 
void sample (const TubeVector &x)
 Samples this tube so that its components will share the same sampling of the components of the n-dimensional \([\mathbf{x}](\cdot)\).
 
Accessing values
const IntervalVector codomain () const
 Returns the box of feasible values.
 
double volume () const
 Returns the volume of this tube.
 
Tubeoperator[] (int index)
 Returns the ith Tube of this TubeVector.
 
const Tubeoperator[] (int index) const
 Returns a const reference to the ith Tube of this TubeVector.
 
const IntervalVector operator() (int slice_id) const
 Returns the value of the ith slice.
 
const IntervalVector operator() (double t) const
 Returns the evaluation of this tube at \(t\).
 
const IntervalVector operator() (const Interval &t) const
 Returns the interval evaluation of this tube over \([t]\).
 
const std::pair< IntervalVector, IntervalVector > eval (const Interval &t=Interval::ALL_REALS) const
 Returns the interval evaluations of the bounds of the tube \(\underline{\mathbf{x}^-}(\cdot)\) and \(\overline{\mathbf{x}^+}(\cdot)\) over \([t]\).
 
const IntervalVector interpol (double t, const TubeVector &v) const
 Returns the optimal evaluation of this tube at \(t\), based on the derivative information \(\dot{\mathbf{x}}(\cdot)\).
 
const IntervalVector interpol (const Interval &t, const TubeVector &v) const
 Returns the optimal interval evaluation of this tube over \([t]\), based on the derivative information \(\dot{\mathbf{x}}(\cdot)\).
 
const Interval invert (const IntervalVector &y, const Interval &search_tdomain=Interval::ALL_REALS) const
 Returns the interval inversion \([\mathbf{x}]^{-1}([\mathbf{y}])\).
 
void invert (const IntervalVector &y, std::vector< Interval > &v_t, const Interval &search_tdomain=Interval::ALL_REALS) const
 Computes the set of continuous values of the inversion \([\mathbf{x}]^{-1}([\mathbf{y}])\).
 
const Interval invert (const IntervalVector &y, const TubeVector &v, const Interval &search_tdomain=Interval::ALL_REALS) const
 Returns the optimal interval inversion \([\mathbf{x}]^{-1}([\mathbf{y}])\).
 
void invert (const IntervalVector &y, std::vector< Interval > &v_t, const TubeVector &v, const Interval &search_tdomain=Interval::ALL_REALS) const
 Computes the set of continuous values of the optimal inversion \([\mathbf{x}]^{-1}([\mathbf{y}])\).
 
const TrajectoryVector diam (bool gates_thicknesses=false) const
 Returns the diameters of the tube as a trajectory.
 
const TrajectoryVector diam (const TubeVector &v) const
 Returns the diameters of the tube as a trajectory.
 
const Vector max_diam () const
 Returns a vector of the maximum diameters of the tube for each component.
 
double max_gate_diam (double &t) const
 Returns the maximum diameter of all gates of the tube vector in all components.
 
const Slicesteepest_slice () const
 Returns the slice of the Tube of this TubeVector with the largest difference between the mid values of the input and output gates, in all components.
 
const Trajectory diag (bool gates_diag=false) const
 Returns the slices diagonals of the tube as a trajectory.
 
const Trajectory diag (int start_index, int end_index, bool gates_diag=false) const
 Returns the slices diagonals of a subvector of this tube as a trajectory.
 
Tests
bool operator== (const TubeVector &x) const
 Returns true if this tube is equal to \([\mathbf{x}](\cdot)\).
 
bool operator!= (const TubeVector &x) const
 Returns true if this tube is different from \([\mathbf{x}](\cdot)\).
 
bool is_subset (const TubeVector &x) const
 Returns true if this tube is a subset of \([\mathbf{x}](\cdot)\).
 
bool is_strict_subset (const TubeVector &x) const
 Returns true if this tube is a subset of \([\mathbf{x}](\cdot)\), and not \([\mathbf{x}](\cdot)\) itself.
 
bool is_interior_subset (const TubeVector &x) const
 Returns true if this tube is a subset of the interior of \([\mathbf{x}](\cdot)\).
 
bool is_strict_interior_subset (const TubeVector &x) const
 Returns true if this tube is a subset of the interior of \([\mathbf{x}](\cdot)\), and not \([\mathbf{x}](\cdot)\) itself.
 
bool is_superset (const TubeVector &x) const
 Returns true if this tube is a superset of \([\mathbf{x}](\cdot)\).
 
bool is_strict_superset (const TubeVector &x) const
 Returns true if this tube is a superset of \([\mathbf{x}](\cdot)\), and not \([\mathbf{x}](\cdot)\) itself.
 
bool is_empty () const
 Returns true if this tube is empty.
 
const BoolInterval contains (const TrajectoryVector &x) const
 Returns true if this tube contains the trajectory \(\mathbf{x}(\cdot)\).
 
bool overlaps (const TubeVector &x, float ratio=1.) const
 Returns true if this tube overlaps the tube \([\mathbf{x}](\cdot)\).
 
Setting values
const TubeVectorset (const IntervalVector &y)
 Sets a constant box value for this tube: \(\forall t, [\mathbf{x}](t)=[\mathbf{y}]\).
 
const TubeVectorset (const IntervalVector &y, int slice_id)
 Sets the box value of the ith slice of this tube.
 
const TubeVectorset (const IntervalVector &y, double t)
 Sets the box value of this tube at \(t\): \([\mathbf{x}](t)=[\mathbf{y}]\).
 
const TubeVectorset (const IntervalVector &y, const Interval &t)
 Sets the box value of this tube over \([t]\): \(\forall t\in[t], [\mathbf{x}](t)=[\mathbf{y}]\).
 
const TubeVectorset_empty ()
 Sets this tube to the empty set.
 
const TubeVectorinflate (double rad)
 Inflates this tube by adding \([-\mathbf{rad},+\mathbf{rad}]\) to all its codomain components.
 
const TubeVectorinflate (const Vector &rad)
 Inflates this tube by adding \([-\mathbf{rad},+\mathbf{rad}]\) to all its codomain components.
 
const TubeVectorinflate (const TrajectoryVector &rad)
 Inflates this tube by adding non-constant uncertainties defined in a trajectory.
 
TubeVectortruncate_tdomain (const Interval &tdomain)
 Truncates the tdomain of \([\mathbf{x}](\cdot)\).
 
void shift_tdomain (double a)
 Shifts the tdomain \([t_0,t_f]\) of \([\mathbf{x}](\cdot)\).
 
Bisection
const std::pair< TubeVector, TubeVectorbisect (double t, float ratio=0.49) const
 Bisects this tube.
 
const std::pair< TubeVector, TubeVectorbisect (double t, int dim, float ratio=0.49) const
 Bisects this tube along a specific dimension.
 
Assignments operators
const TubeVectoroperator+= (const Interval &x)
 Operates +=.
 
const TubeVectoroperator+= (const Trajectory &x)
 Operates +=.
 
const TubeVectoroperator+= (const Tube &x)
 Operates +=.
 
const TubeVectoroperator+= (const IntervalVector &x)
 Operates +=.
 
const TubeVectoroperator+= (const TrajectoryVector &x)
 Operates +=.
 
const TubeVectoroperator+= (const TubeVector &x)
 Operates +=.
 
const TubeVectoroperator-= (const Interval &x)
 Operates -=.
 
const TubeVectoroperator-= (const Trajectory &x)
 Operates -=.
 
const TubeVectoroperator-= (const Tube &x)
 Operates -=.
 
const TubeVectoroperator-= (const IntervalVector &x)
 Operates -=.
 
const TubeVectoroperator-= (const TrajectoryVector &x)
 Operates -=.
 
const TubeVectoroperator-= (const TubeVector &x)
 Operates -=.
 
const TubeVectoroperator*= (const Interval &x)
 Operates *=.
 
const TubeVectoroperator*= (const Trajectory &x)
 Operates *=.
 
const TubeVectoroperator*= (const Tube &x)
 Operates *=.
 
const TubeVectoroperator/= (const Interval &x)
 Operates /=.
 
const TubeVectoroperator/= (const Trajectory &x)
 Operates /=.
 
const TubeVectoroperator/= (const Tube &x)
 Operates /=.
 
const TubeVectoroperator|= (const IntervalVector &x)
 Operates |=.
 
const TubeVectoroperator|= (const TrajectoryVector &x)
 Operates |=.
 
const TubeVectoroperator|= (const TubeVector &x)
 Operates |=.
 
const TubeVectoroperator&= (const IntervalVector &x)
 Operates &=.
 
const TubeVectoroperator&= (const TrajectoryVector &x)
 Operates &=.
 
const TubeVectoroperator&= (const TubeVector &x)
 Operates &=.
 
Tree synthesis structure
void enable_synthesis (SynthesisMode mode=SynthesisMode::BINARY_TREE, double eps=1.e-3) const
 Enables the computation of a synthesis tree.
 
Integration
const IntervalVector integral (double t) const
 Computes the box integral \(\int_0^t[\mathbf{x}](\tau)d\tau\).
 
const IntervalVector integral (const Interval &t) const
 Computes the box integral \(\int_0^{[t]}[\mathbf{x}](\tau)d\tau\).
 
const IntervalVector integral (const Interval &t1, const Interval &t2) const
 Computes the box integral \(\int_{[t_1]}^{[t_2]}[\mathbf{x}](\tau)d\tau\).
 
const std::pair< IntervalVector, IntervalVector > partial_integral (const Interval &t) const
 Computes the partial box integral \(\int_{0}^{[t]}[\mathbf{x}](\tau)d\tau\).
 
const std::pair< IntervalVector, IntervalVector > partial_integral (const Interval &t1, const Interval &t2) const
 Computes the partial box integral \(\int_{[t_1]}^{[t_2]}[\mathbf{x}](\tau)d\tau\).
 
Serialization
void serialize (const std::string &binary_file_name="x.tube", int version_number=SERIALIZATION_VERSION) const
 Serializes this tube.
 
void serialize (const std::string &binary_file_name, const TrajectoryVector &traj, int version_number=SERIALIZATION_VERSION) const
 Serializes this tube together with a TrajectoryVector object.
 
- Public Member Functions inherited from codac::DynamicalItem
virtual ~DynamicalItem ()
 DynamicalItem destructor.
 

Static Public Member Functions

static bool same_slicing (const TubeVector &x1, const Tube &x2)
 Tests whether a TubeVector object shares the slicing of another Tube object.
 
static bool same_slicing (const TubeVector &x1, const TubeVector &x2)
 Tests whether the two TubeVector objects are sharing the same slicing.
 
static const TubeVector hull (const std::list< TubeVector > &l_tubes)
 Computes the hull of several tubes.
 
- Static Public Member Functions inherited from codac::DynamicalItem
static bool valid_tdomain (const Interval &tdomain)
 Verifies that this interval is a feasible tdomain.
 

Protected Member Functions

 TubeVector ()
 Creates an undefined n-dimensional tube.
 
const IntervalVector codomain_box () const
 Returns the box \([\mathbf{x}]([t_0,t_f])\).
 
void deserialize (const std::string &binary_file_name, TrajectoryVector *&traj)
 Restores a n-dimensional tube from serialization, together with a TrajectoryVector object.
 

Protected Attributes

int m_n = 0
 dimension of this tube
 
Tubem_v_tubes = nullptr
 array of components (scalar tubes)
 

String

const std::string class_name () const
 Returns the name of this class.
 

Detailed Description

n-dimensional tube \([\mathbf{x}](\cdot)\), defined as an interval of n-dimensional trajectories

Note
Use Tube for the one-dimensional case

Constructor & Destructor Documentation

◆ TubeVector() [1/15]

codac::TubeVector::TubeVector ( const Interval & tdomain,
int n )
explicit

Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) made of one slice.

Parameters
tdomaintemporal domain \([t_0,t_f]\)
ndimension of this tube

◆ TubeVector() [2/15]

codac::TubeVector::TubeVector ( const Interval & tdomain,
const IntervalVector & codomain )
explicit

Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) made of one slice.

Note
The dimension of the tube is specified by the codomain box
Parameters
tdomaintemporal domain \([t_0,t_f]\)
codomainIntervalVector value of the slice

◆ TubeVector() [3/15]

codac::TubeVector::TubeVector ( const Interval & tdomain,
double timestep,
int n )
explicit

Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) with some temporal discretization.

Parameters
tdomaintemporal domain \([t_0,t_f]\)
timestepsampling value \(\delta\) for the temporal discretization (double)
ndimension of this tube

◆ TubeVector() [4/15]

codac::TubeVector::TubeVector ( const Interval & tdomain,
double timestep,
const IntervalVector & codomain )
explicit

Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) with some temporal discretization.

Parameters
tdomaintemporal domain \([t_0,t_f]\)
timestepsampling value \(\delta\) for the temporal discretization (double)
codomainIntervalVector value of the slices

◆ TubeVector() [5/15]

codac::TubeVector::TubeVector ( const Interval & tdomain,
double timestep,
const TFnc & f )
explicit

Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) from a TFnc object and with some temporal discretization.

Note
Due to the slicing implementation of the tube, a wrapping effect will occur to reliably enclose the TFnc object
The dimension of the tube is specified by the output of \([\mathbf{f}]\)
Parameters
tdomaintemporal domain \([t_0,t_f]\)
timestepsampling value \(\delta\) for the temporal discretization (double)
fTFnc object that will be enclosed by the tube: \(\forall t\in[t_0,t_f], [\mathbf{f}](t)\subseteq[\mathbf{x}](t)\)

◆ TubeVector() [6/15]

codac::TubeVector::TubeVector ( const std::vector< Interval > & v_tdomains,
const std::vector< IntervalVector > & v_codomains )
explicit

Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) from a list of \(k\) boxes \(\big([t_1]\times[\mathbf{x}_1],\dots,[t_k]\times[\mathbf{x}_k]\big)\).

Note
The slicing will be based on the vector of temporal domains.
The \([t_i]\)'s must cover continuously the tdomain of \([\mathbf{x}](\cdot)\).
Parameters
v_tdomainsvector of temporal domains \([t_i]\)
v_codomainsvector of codomains \([\mathbf{x}_i]\) related to the \([t_i]\)'s

◆ TubeVector() [7/15]

codac::TubeVector::TubeVector ( std::initializer_list< Tube > list)

Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) from a list of Tube objects.

Parameters
listlist of \([x_i](\cdot)\) tubes

◆ TubeVector() [8/15]

codac::TubeVector::TubeVector ( const TubeVector & x)

Creates a copy of a n-dimensional tube \([\mathbf{x}](\cdot)\), with the same time discretization.

Parameters
xTubeVector to be duplicated

◆ TubeVector() [9/15]

codac::TubeVector::TubeVector ( const TubeVector & x,
const IntervalVector & codomain )
explicit

Creates a copy of a n-dimensional tube \([\mathbf{x}](\cdot)\), with the same time discretization but a specific constant codomain.

Parameters
xTubeVector from which the sampling will be duplicated
codomainIntervalVector value of the slices

◆ TubeVector() [10/15]

codac::TubeVector::TubeVector ( int n,
const Tube & x )
explicit

Creates a n-dimensional tube with all the components initialized to \([x](\cdot)\).

Note
The TubeVector object will have the same slicing as the tube \([x](\cdot)\)
Parameters
ndimension of this tube
xTube to be copied for all the components

◆ TubeVector() [11/15]

codac::TubeVector::TubeVector ( const TrajectoryVector & traj,
double timestep )
explicit

Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) enclosing a n-dimensional trajectory \(\mathbf{x}(\cdot)\), possibly with some temporal discretization.

Note
Due to the slicing implementation of the tube, a wrapping effect will occur to reliably enclose the TrajectoryVector object
Parameters
trajTrajectoryVector \(\mathbf{x}(\cdot)\) to enclose
timestepsampling value \(\delta\) for the temporal discretization

◆ TubeVector() [12/15]

codac::TubeVector::TubeVector ( const TrajectoryVector & lb,
const TrajectoryVector & ub,
double timestep )
explicit

Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) defined as an interval of two n-dimensional trajectories \([\mathbf{lb}(\cdot),\mathbf{ub}(\cdot)]\).

Note
Due to the slicing implementation of the tube, a wrapping effect will occur to reliably enclose the TrajectoryVector object
Parameters
lbTrajectoryVector defining the lower bound \(\mathbf{x}^{-}(\cdot)\) of the tube
ubTrajectoryVector defining the upper bound \(\mathbf{x}^{+}(\cdot)\) of the tube
timestepsampling value \(\delta\) for the temporal discretization

◆ TubeVector() [13/15]

codac::TubeVector::TubeVector ( const std::string & binary_file_name)
explicit

Restore a n-dimensional tube from serialization.

Note
The TubeVector must have been serialized beforehand by the appropriate method serialize()
Parameters
binary_file_namepath to the binary file

◆ TubeVector() [14/15]

codac::TubeVector::TubeVector ( const std::string & binary_file_name,
TrajectoryVector *& traj )
explicit

Restore a n-dimensional tube from serialization, together with a TrajectoryVector object.

Note
The TubeVector and the TrajectoryVector must have been serialized beforehand by the appropriate method serialize()
Parameters
binary_file_namepath to the binary file
traja pointer to the TrajectoryVector object to be instantiated

◆ TubeVector() [15/15]

codac::TubeVector::TubeVector ( )
protected

Creates an undefined n-dimensional tube.

Note
Constructor necessary for the deserialize_TubeVector method

Member Function Documentation

◆ size()

int codac::TubeVector::size ( ) const
virtual

Returns the dimension of the tube.

Returns
n

Implements codac::DynamicalItem.

◆ resize()

void codac::TubeVector::resize ( int n)

Resizes this TubeVector.

Note
If the size is increased, the existing components are not modified and the new ones are set to \([t_0,t_f]\mapsto[-\infty,\infty]\)
Parameters
nthe new size to be set

◆ subvector()

const TubeVector codac::TubeVector::subvector ( int start_index,
int end_index ) const

Returns a subvector of this TubeVector.

Parameters
start_indexfirst component index of the subvector to be returned
end_indexlast component index of the subvector to be returned
Returns
a TubeVector extracted from this TubeVector

◆ put()

void codac::TubeVector::put ( int start_index,
const TubeVector & subvec )

Puts a subvector into this TubeVector at a given position.

Parameters
start_indexposition where the subvector will be put
subvecthe TubeVector to put from start_index

◆ primitive() [1/2]

const TubeVector codac::TubeVector::primitive ( ) const

Returns the primitive TubeVector of this tube, with a zero constant of integration.

Returns
a new TubeVector object with same slicing, enclosing the feasible primitives of this tube

◆ primitive() [2/2]

const TubeVector codac::TubeVector::primitive ( const IntervalVector & c) const

Returns the primitive TubeVector of this tube.

Parameters
cthe constant of integration
Returns
a new TubeVector object with same slicing, enclosing the feasible primitives of this tube

◆ operator=()

const TubeVector & codac::TubeVector::operator= ( const TubeVector & x)

Returns a copy of a TubeVector.

Parameters
xthe TubeVector object to be copied
Returns
a new TubeVector object with same slicing and values

◆ tdomain()

const Interval codac::TubeVector::tdomain ( ) const
virtual

Returns the temporal definition domain of this tube.

Returns
an Interval object \([t_0,t_f]\)

Implements codac::DynamicalItem.

◆ lb()

const TrajectoryVector codac::TubeVector::lb ( ) const

Returns a possible lower bound \(\mathbf{x}^{-}(\cdot)\) of the tube.

Note
The exact lower bound cannot be known. However, the returned trajectory \(\mathbf{x}^{-}(\cdot)\) is guaranteed to be enclosed in the tube \([\mathbf{x}](\cdot)\).
Returns
a candidate for \(\mathbf{x}^{-}(\cdot)\)

◆ ub()

const TrajectoryVector codac::TubeVector::ub ( ) const

Returns a possible upper bound \(\mathbf{x}^{+}(\cdot)\) of the tube.

Note
The exact upper bound cannot be known. However, the returned trajectory \(\mathbf{x}^{+}(\cdot)\) is guaranteed to be enclosed in the tube \([\mathbf{x}](\cdot)\).
Returns
a candidate for \(\mathbf{x}^{+}(\cdot)\)

◆ nb_slices()

int codac::TubeVector::nb_slices ( ) const

Returns the number of slices of this tube.

Returns
an integer

◆ time_to_index()

int codac::TubeVector::time_to_index ( double t) const

Returns the Slice index related to the temporal key \(t\).

Parameters
tthe temporal key (double, must belong to the TubeVector's tdomain)
Returns
an integer

◆ sample() [1/4]

void codac::TubeVector::sample ( double t)

Samples this tube at \(t\).

Note
Without any effect on one component that has two Slice objects already defined at \(t\) (if the gate \([\mathbf{x}](t)\) already exists)
Parameters
tthe temporal key (double, must belong to the TubeVector's tdomain)

◆ sample() [2/4]

void codac::TubeVector::sample ( double t,
const IntervalVector & gate )

Samples this tube at \(t\) with a specific gate value.

Note
Without any effect on one component that has two Slice objects already defined at \(t\) (if the gate \([\mathbf{x}](t)\) already exists)
Parameters
tthe temporal key (double, must belong to the TubeVector's tdomain)
gatethe IntervalVector value of this tube at \(t\)

◆ sample() [3/4]

void codac::TubeVector::sample ( const Tube & x)

Samples this tube so that each component will share the same sampling of the scalar \([x](\cdot)\).

Note
The previous sampling of this tube is preserved
Parameters
xthe Tube from which the new sampling will come from

◆ sample() [4/4]

void codac::TubeVector::sample ( const TubeVector & x)

Samples this tube so that its components will share the same sampling of the components of the n-dimensional \([\mathbf{x}](\cdot)\).

Note
The previous sampling of this tube is preserved
Parameters
xthe TubeVector from which the new sampling will come from

◆ codomain()

const IntervalVector codac::TubeVector::codomain ( ) const

Returns the box of feasible values.

Returns
an IntervalVector object \([\mathbf{x}]([t_0,t_f])\)

◆ volume()

double codac::TubeVector::volume ( ) const

Returns the volume of this tube.

Note
returns POS_INFINITY if the codomain is unbounded
returns 0 if the tube is flat (and so without wrapping effect)
Returns
volume defined as \(w([t_0,t_f])\times w([x_1]([t_0,t_f]))\times\dots\times w([x_n]([t_0,t_f]))\)

◆ operator[]() [1/2]

Tube & codac::TubeVector::operator[] ( int index)

Returns the ith Tube of this TubeVector.

Parameters
indexthe index of this ith component
Returns
a reference to the ith component

◆ operator[]() [2/2]

const Tube & codac::TubeVector::operator[] ( int index) const

Returns a const reference to the ith Tube of this TubeVector.

Parameters
indexthe index of this ith component
Returns
a const reference to the ith component

◆ operator()() [1/3]

const IntervalVector codac::TubeVector::operator() ( int slice_id) const

Returns the value of the ith slice.

Parameters
slice_idthe index of the ith slice
Returns
IntervalVector value of \([\mathbf{x}](i)\)

◆ operator()() [2/3]

const IntervalVector codac::TubeVector::operator() ( double t) const

Returns the evaluation of this tube at \(t\).

Parameters
tthe temporal key (double, must belong to the TubeVector's tdomain)
Returns
IntervalVector value of \([\mathbf{x}](t)\)

◆ operator()() [3/3]

const IntervalVector codac::TubeVector::operator() ( const Interval & t) const

Returns the interval evaluation of this tube over \([t]\).

Parameters
tthe subtdomain (Interval, must be a subset of the TubeVector's tdomain)
Returns
IntervalVector envelope \([\mathbf{x}]([t])\)

◆ eval()

const std::pair< IntervalVector, IntervalVector > codac::TubeVector::eval ( const Interval & t = Interval::ALL_REALS) const

Returns the interval evaluations of the bounds of the tube \(\underline{\mathbf{x}^-}(\cdot)\) and \(\overline{\mathbf{x}^+}(\cdot)\) over \([t]\).

Parameters
tthe subtdomain (Interval, must be a subset of the TubeVector's tdomain)
Returns
the pair \(\big([\underline{\mathbf{x}^-}]([t]),[\overline{\mathbf{x}^+}]([t])\big)\)

◆ interpol() [1/2]

const IntervalVector codac::TubeVector::interpol ( double t,
const TubeVector & v ) const

Returns the optimal evaluation of this tube at \(t\), based on the derivative information \(\dot{\mathbf{x}}(\cdot)\).

Todo
Change the name of this method?
Parameters
tthe temporal key (double, must belong to the TubeVector's tdomain)
vthe derivative tube such that \(\dot{\mathbf{x}}(\cdot)\in[\mathbf{v}](\cdot)\)
Returns
IntervalVector value of \([\mathbf{x}](t)\)

◆ interpol() [2/2]

const IntervalVector codac::TubeVector::interpol ( const Interval & t,
const TubeVector & v ) const

Returns the optimal interval evaluation of this tube over \([t]\), based on the derivative information \(\dot{\mathbf{x}}(\cdot)\).

Todo
Change the name of this method?
Parameters
tthe subtdomain (Interval, must be a subset of the TubeVector's tdomain)
vthe derivative tube such that \(\dot{\mathbf{x}}(\cdot)\in[\mathbf{v}](\cdot)\)
Returns
IntervalVector value of \([\mathbf{x}]([t])\)

◆ invert() [1/4]

const Interval codac::TubeVector::invert ( const IntervalVector & y,
const Interval & search_tdomain = Interval::ALL_REALS ) const

Returns the interval inversion \([\mathbf{x}]^{-1}([\mathbf{y}])\).

Note
If the inversion results in several pre-images, their union is returned
Parameters
ythe box codomain
search_tdomainthe optional temporal domain on which the inversion will be performed
Returns
the hull of \([\mathbf{x}]^{-1}([\mathbf{y}])\)

◆ invert() [2/4]

void codac::TubeVector::invert ( const IntervalVector & y,
std::vector< Interval > & v_t,
const Interval & search_tdomain = Interval::ALL_REALS ) const

Computes the set of continuous values of the inversion \([\mathbf{x}]^{-1}([\mathbf{y}])\).

Parameters
ythe interval codomain
v_tthe vector of the sub-tdomains \([t_k]\) for which \(\forall t\in[t_k] \mid \mathbf{x}(t)\in[\mathbf{y}], \mathbf{x}(\cdot)\in[\mathbf{x}](\cdot)\)
search_tdomainthe optional temporal domain on which the inversion will be performed

◆ invert() [3/4]

const Interval codac::TubeVector::invert ( const IntervalVector & y,
const TubeVector & v,
const Interval & search_tdomain = Interval::ALL_REALS ) const

Returns the optimal interval inversion \([\mathbf{x}]^{-1}([\mathbf{y}])\).

Note
The knowledge of the derivative tube \([\mathbf{v}](\cdot)\) allows a finer inversion
If the inversion results in several pre-images, their union is returned
Parameters
ythe interval codomain
vthe derivative tube vector such that \(\dot{\mathbf{x}}(\cdot)\in[\mathbf{v}](\cdot)\)
search_tdomainthe optional temporal domain on which the inversion will be performed
Returns
the hull of \([\mathbf{x}]^{-1}([\mathbf{y}])\)

◆ invert() [4/4]

void codac::TubeVector::invert ( const IntervalVector & y,
std::vector< Interval > & v_t,
const TubeVector & v,
const Interval & search_tdomain = Interval::ALL_REALS ) const

Computes the set of continuous values of the optimal inversion \([\mathbf{x}]^{-1}([\mathbf{y}])\).

Note
The knowledge of the derivative tube \([\mathbf{v}](\cdot)\) allows finer inversions
Parameters
ythe interval codomain
v_tthe vector of the sub-tdomains \([t_k]\) for which \(\exists t\in[t_k] \mid \mathbf{x}(t)\in[\mathbf{y}], \mathbf{x}(\cdot)\in[\mathbf{x}](\cdot), \dot{\mathbf{x}}(\cdot)\in[\mathbf{v}](\cdot)\)
vthe derivative tube such that \(\dot{\mathbf{x}}(\cdot)\in[\mathbf{v}](\cdot)\)
search_tdomainthe optional temporal domain on which the inversion will be performed

◆ diam() [1/2]

const TrajectoryVector codac::TubeVector::diam ( bool gates_thicknesses = false) const

Returns the diameters of the tube as a trajectory.

Note
Without derivative knowledge, and because the tube is made of boxed slices, the trajectory will be discontinuous and so the returned object will not reliably represent the diameters. It can be mainly used for display purposes.
Parameters
gates_thicknessesif true, the diameters of the gates will be evaluated too
Returns
the set of diameters associated to temporal inputs

◆ diam() [2/2]

const TrajectoryVector codac::TubeVector::diam ( const TubeVector & v) const

Returns the diameters of the tube as a trajectory.

Note
Because the tube is made of boxed slices, the trajectory may be discontinuous and so the returned object will not reliably represent the diameters. It can be mainly used for display purposes.
Parameters
vthe derivative tube such that \(\dot{x}(\cdot)\in[v](\cdot)\)
Returns
the set of diameters associated to temporal inputs

◆ max_diam()

const Vector codac::TubeVector::max_diam ( ) const

Returns a vector of the maximum diameters of the tube for each component.

Returns
the maximal thicknesses of this tube

◆ max_gate_diam()

double codac::TubeVector::max_gate_diam ( double & t) const

Returns the maximum diameter of all gates of the tube vector in all components.

Parameters
tinstant \(t\) corresponding to this maximal diameter
Returns
the maximal diameter of a component of a gate

◆ steepest_slice()

const Slice * codac::TubeVector::steepest_slice ( ) const

Returns the slice of the Tube of this TubeVector with the largest difference between the mid values of the input and output gates, in all components.

Returns
a pointer to the steepest slice

◆ diag() [1/2]

const Trajectory codac::TubeVector::diag ( bool gates_diag = false) const

Returns the slices diagonals of the tube as a trajectory.

Note
Without derivative knowledge, and because the tube is made of boxed slices, the trajectory will be discontinuous and so the returned object will not reliably represent the diagonals. It can be mainly used for display purposes.
Parameters
gates_diagif true, the diagonals of the gates will be evaluated too
Returns
the set of diagonals associated to temporal inputs

◆ diag() [2/2]

const Trajectory codac::TubeVector::diag ( int start_index,
int end_index,
bool gates_diag = false ) const

Returns the slices diagonals of a subvector of this tube as a trajectory.

Note
Without derivative knowledge, and because the tube is made of boxed slices, the trajectory will be discontinuous and so the returned object will not reliably represent the diagonals. It can be mainly used for display purposes.
Parameters
start_indexfirst component index of the subvector
end_indexlast component index of the subvector
gates_diagif true, the diagonals of the gates will be evaluated too
Returns
the set of diagonals associated to temporal inputs

◆ operator==()

bool codac::TubeVector::operator== ( const TubeVector & x) const

Returns true if this tube is equal to \([\mathbf{x}](\cdot)\).

Note
Equality is obtained if the tubes share the same bounds, tdomain and sampling
Parameters
xthe TubeVector object
Returns
true in case of equality

◆ operator!=()

bool codac::TubeVector::operator!= ( const TubeVector & x) const

Returns true if this tube is different from \([\mathbf{x}](\cdot)\).

Note
The two tubes are different if they do not share the same bounds, tdomain or sampling
Parameters
xthe TubeVector object
Returns
true in case of difference

◆ is_subset()

bool codac::TubeVector::is_subset ( const TubeVector & x) const

Returns true if this tube is a subset of \([\mathbf{x}](\cdot)\).

Note
The two tubes may not share the same slicing, but must have the same tdomain
Parameters
xthe TubeVector object
Returns
true in case of subset

◆ is_strict_subset()

bool codac::TubeVector::is_strict_subset ( const TubeVector & x) const

Returns true if this tube is a subset of \([\mathbf{x}](\cdot)\), and not \([\mathbf{x}](\cdot)\) itself.

Note
The two tubes may not share the same slicing, but must have the same tdomain
Parameters
xthe TubeVector object
Returns
true in case of strict subset

◆ is_interior_subset()

bool codac::TubeVector::is_interior_subset ( const TubeVector & x) const

Returns true if this tube is a subset of the interior of \([\mathbf{x}](\cdot)\).

Note
The two tubes may not share the same slicing, but must have the same tdomain
Parameters
xthe TubeVector object
Returns
true in case of interior subset

◆ is_strict_interior_subset()

bool codac::TubeVector::is_strict_interior_subset ( const TubeVector & x) const

Returns true if this tube is a subset of the interior of \([\mathbf{x}](\cdot)\), and not \([\mathbf{x}](\cdot)\) itself.

Note
The two tubes may not share the same slicing, but must have the same tdomain
Parameters
xthe TubeVector object
Returns
true in case of strict interior subset

◆ is_superset()

bool codac::TubeVector::is_superset ( const TubeVector & x) const

Returns true if this tube is a superset of \([\mathbf{x}](\cdot)\).

Note
The two tubes may not share the same slicing, but must have the same tdomain
Parameters
xthe TubeVector object
Returns
true in case of superset

◆ is_strict_superset()

bool codac::TubeVector::is_strict_superset ( const TubeVector & x) const

Returns true if this tube is a superset of \([\mathbf{x}](\cdot)\), and not \([\mathbf{x}](\cdot)\) itself.

Note
The two tubes may not share the same slicing, but must have the same tdomain
Parameters
xthe TubeVector object
Returns
true in case of strict superset

◆ is_empty()

bool codac::TubeVector::is_empty ( ) const

Returns true if this tube is empty.

Note
If \([\mathbf{x}](t)=\varnothing\) for some \(t\), then the tube \([\mathbf{x}](\cdot)\) is considered empty
Returns
true in case of emptiness

◆ contains()

const BoolInterval codac::TubeVector::contains ( const TrajectoryVector & x) const

Returns true if this tube contains the trajectory \(\mathbf{x}(\cdot)\).

Note
Due to the reliable numerical representation of a trajectory, some wrapping effect may appear for its evaluations (either if it is defined by a map of values or an analytic function). Hence, this "contains" test may not be able to conclude, if the thin envelope of \(\mathbf{x}(\cdot)\) overlaps a boundary of the tube.
Parameters
xthe trajectory that might be contained by this tube
Returns
BoolInterval::YES (or BoolInterval::NO) if this tube contains \(\mathbf{x}(\cdot)\) (or does not contain) and BoolInterval::MAYBE in case of ambiguity

◆ overlaps()

bool codac::TubeVector::overlaps ( const TubeVector & x,
float ratio = 1. ) const

Returns true if this tube overlaps the tube \([\mathbf{x}](\cdot)\).

Parameters
xthe other tube
ratioan optional overlapping ratio between 0 and 1 (1 by default). For instance, if ratio=0.3 and there is an overlapping of at least 30%, then the function returns true
Returns
true in case of overlapping with respect to the defined ratio

◆ set() [1/4]

const TubeVector & codac::TubeVector::set ( const IntervalVector & y)

Sets a constant box value for this tube: \(\forall t, [\mathbf{x}](t)=[\mathbf{y}]\).

Note
The sampling of this tube is preserved
Parameters
yIntervalVector value of the slices
Returns
*this

◆ set() [2/4]

const TubeVector & codac::TubeVector::set ( const IntervalVector & y,
int slice_id )

Sets the box value of the ith slice of this tube.

Parameters
yIntervalVector value of the ith slice
slice_idindex of the ith Slice
Returns
*this

◆ set() [3/4]

const TubeVector & codac::TubeVector::set ( const IntervalVector & y,
double t )

Sets the box value of this tube at \(t\): \([\mathbf{x}](t)=[\mathbf{y}]\).

Note
It may create a gate (and so one more slice) if the tube is not already sampled at \(t\). Otherwise, it will update the value of the already existing gate.
Parameters
yIntervalVector value of the gate
tthe temporal key (double, must belong to the TubeVector's tdomain)
Returns
*this

◆ set() [4/4]

const TubeVector & codac::TubeVector::set ( const IntervalVector & y,
const Interval & t )

Sets the box value of this tube over \([t]\): \(\forall t\in[t], [\mathbf{x}](t)=[\mathbf{y}]\).

Note
It may create two gates (and so further slices) if the tube is not already sampled at \(t^-\) and \(t^+\). This is done to ensure that \(\forall t\in[t], [\mathbf{x}](t)=[\mathbf{y}]\).
Parameters
yIntervalVector value to be set
tthe subtdomain (Interval, must be a subset of the TubeVector's tdomain)
Returns
*this

◆ set_empty()

const TubeVector & codac::TubeVector::set_empty ( )

Sets this tube to the empty set.

Note
By convention, all slices will be set to the empty set
Returns
*this

◆ inflate() [1/3]

const TubeVector & codac::TubeVector::inflate ( double rad)

Inflates this tube by adding \([-\mathbf{rad},+\mathbf{rad}]\) to all its codomain components.

Note
All slices and gates will be inflated
Parameters
radhalf of the inflation
Returns
*this

◆ inflate() [2/3]

const TubeVector & codac::TubeVector::inflate ( const Vector & rad)

Inflates this tube by adding \([-\mathbf{rad},+\mathbf{rad}]\) to all its codomain components.

Note
All slices and gates will be inflated
Parameters
radhalf of the inflation for each component
Returns
*this

◆ inflate() [3/3]

const TubeVector & codac::TubeVector::inflate ( const TrajectoryVector & rad)

Inflates this tube by adding non-constant uncertainties defined in a trajectory.

Note
From the trajectory \(\mathbf{a}(\cdot)\), the function will inflate this tube such that \(\forall t, [\mathbf{x}](t):=[\mathbf{x}](t)+[-\mathbf{a}(t),+\mathbf{a}(t)]\)
All slices and gates will be inflated
Parameters
radthe TrajectoryVector object defining the non-constant inflation
Returns
*this

◆ truncate_tdomain()

TubeVector & codac::TubeVector::truncate_tdomain ( const Interval & tdomain)

Truncates the tdomain of \([\mathbf{x}](\cdot)\).

Note
The new tdomain must be a subset of the old one
Parameters
tdomainnew temporal domain \([t_0,t_f]\)
Returns
a reference to this tube

◆ shift_tdomain()

void codac::TubeVector::shift_tdomain ( double a)

Shifts the tdomain \([t_0,t_f]\) of \([\mathbf{x}](\cdot)\).

Parameters
athe offset value so that \([t_0,t_f]:=[t_0+a,t_f+a]\)

◆ bisect() [1/2]

const std::pair< TubeVector, TubeVector > codac::TubeVector::bisect ( double t,
float ratio = 0.49 ) const

Bisects this tube.

Note
The tube is bisected along the codomain and according to a defined ratio
The bisection is performed on the largest component of the gate \([\mathbf{x}](t)\)
If the tube is not already sampled at \(t\), then a sampling is performed
Parameters
tthe temporal key (double, must belong to the TubeVector's domain)
ratiothe bisection ratio (default value: 0.49)
Returns
a pair of two TubeVector objects resulting from the bisection

◆ bisect() [2/2]

const std::pair< TubeVector, TubeVector > codac::TubeVector::bisect ( double t,
int dim,
float ratio = 0.49 ) const

Bisects this tube along a specific dimension.

Note
The tube is bisected along the codomain and according to a defined ratio
The bisection is performed on the gate \([x_i](t)\)
If the tube is not already sampled at \(t\), then a sampling is performed
Parameters
tthe temporal key (double, must belong to the TubeVector's domain)
dimthe dimension id
ratiothe bisection ratio (default value: 0.49)
Returns
a pair of two TubeVector objects resulting from the bisection

◆ operator+=() [1/6]

const TubeVector & codac::TubeVector::operator+= ( const Interval & x)

Operates +=.

Parameters
xInterval
Returns
(*this)+=x

◆ operator+=() [2/6]

const TubeVector & codac::TubeVector::operator+= ( const Trajectory & x)

Operates +=.

Parameters
xTrajectory
Returns
(*this)+=x

◆ operator+=() [3/6]

const TubeVector & codac::TubeVector::operator+= ( const Tube & x)

Operates +=.

Parameters
xTube
Returns
(*this)+=x

◆ operator+=() [4/6]

const TubeVector & codac::TubeVector::operator+= ( const IntervalVector & x)

Operates +=.

Parameters
xIntervalVector
Returns
(*this)+=x

◆ operator+=() [5/6]

const TubeVector & codac::TubeVector::operator+= ( const TrajectoryVector & x)

Operates +=.

Parameters
xTrajectoryVector
Returns
(*this)+=x

◆ operator+=() [6/6]

const TubeVector & codac::TubeVector::operator+= ( const TubeVector & x)

Operates +=.

Parameters
xTubeVector
Returns
(*this)+=x

◆ operator-=() [1/6]

const TubeVector & codac::TubeVector::operator-= ( const Interval & x)

Operates -=.

Parameters
xInterval
Returns
(*this)-=x

◆ operator-=() [2/6]

const TubeVector & codac::TubeVector::operator-= ( const Trajectory & x)

Operates -=.

Parameters
xTrajectory
Returns
(*this)-=x

◆ operator-=() [3/6]

const TubeVector & codac::TubeVector::operator-= ( const Tube & x)

Operates -=.

Parameters
xTube
Returns
(*this)-=x

◆ operator-=() [4/6]

const TubeVector & codac::TubeVector::operator-= ( const IntervalVector & x)

Operates -=.

Parameters
xIntervalVector
Returns
(*this)-=x

◆ operator-=() [5/6]

const TubeVector & codac::TubeVector::operator-= ( const TrajectoryVector & x)

Operates -=.

Parameters
xTrajectoryVector
Returns
(*this)-=x

◆ operator-=() [6/6]

const TubeVector & codac::TubeVector::operator-= ( const TubeVector & x)

Operates -=.

Parameters
xTubeVector
Returns
(*this)-=x

◆ operator*=() [1/3]

const TubeVector & codac::TubeVector::operator*= ( const Interval & x)

Operates *=.

Parameters
xInterval
Returns
(this)=x

◆ operator*=() [2/3]

const TubeVector & codac::TubeVector::operator*= ( const Trajectory & x)

Operates *=.

Parameters
xTrajectory
Returns
(this)=x

◆ operator*=() [3/3]

const TubeVector & codac::TubeVector::operator*= ( const Tube & x)

Operates *=.

Parameters
xTube
Returns
(this)=x

◆ operator/=() [1/3]

const TubeVector & codac::TubeVector::operator/= ( const Interval & x)

Operates /=.

Parameters
xInterval
Returns
(*this)/=x

◆ operator/=() [2/3]

const TubeVector & codac::TubeVector::operator/= ( const Trajectory & x)

Operates /=.

Parameters
xTrajectory
Returns
(*this)/=x

◆ operator/=() [3/3]

const TubeVector & codac::TubeVector::operator/= ( const Tube & x)

Operates /=.

Parameters
xTube
Returns
(*this)/=x

◆ operator|=() [1/3]

const TubeVector & codac::TubeVector::operator|= ( const IntervalVector & x)

Operates |=.

Parameters
xIntervalVector
Returns
(*this)|=x

◆ operator|=() [2/3]

const TubeVector & codac::TubeVector::operator|= ( const TrajectoryVector & x)

Operates |=.

Parameters
xTrajectoryVector
Returns
(*this)|=x

◆ operator|=() [3/3]

const TubeVector & codac::TubeVector::operator|= ( const TubeVector & x)

Operates |=.

Parameters
xTubeVector
Returns
(*this)|=x

◆ operator&=() [1/3]

const TubeVector & codac::TubeVector::operator&= ( const IntervalVector & x)

Operates &=.

Parameters
xIntervalVector
Returns
(*this)&=x

◆ operator&=() [2/3]

const TubeVector & codac::TubeVector::operator&= ( const TrajectoryVector & x)

Operates &=.

Parameters
xTrajectoryVector
Returns
(*this)&=x

◆ operator&=() [3/3]

const TubeVector & codac::TubeVector::operator&= ( const TubeVector & x)

Operates &=.

Parameters
xTubeVector
Returns
(*this)&=x

◆ class_name()

const std::string codac::TubeVector::class_name ( ) const
inlinevirtual

Returns the name of this class.

Note
Only used for some generic display method
Returns
the predefined name

Implements codac::DynamicalItem.

1021{ return "TubeVector"; };

◆ enable_synthesis()

void codac::TubeVector::enable_synthesis ( SynthesisMode mode = SynthesisMode::BINARY_TREE,
double eps = 1.e-3 ) const

Enables the computation of a synthesis tree.

Note
The synthesis tree speeds up computations such as integrals or evaluations
Parameters
modemode of synthesis
epsprecision of the polynomial approximation, if selected

◆ integral() [1/3]

const IntervalVector codac::TubeVector::integral ( double t) const

Computes the box integral \(\int_0^t[\mathbf{x}](\tau)d\tau\).

Note
From the monotonicity of the integral operator, \(\int_0^t[\mathbf{x}](\tau)d\tau=[\int_0^t\mathbf{x}^-(\tau)d\tau,\int_0^t\mathbf{x}^+(\tau)d\tau]\)
Parameters
tthe temporal key (double, must belong to the TubeVector's domain)
Returns
the set of feasible integral vectors

◆ integral() [2/3]

const IntervalVector codac::TubeVector::integral ( const Interval & t) const

Computes the box integral \(\int_0^{[t]}[\mathbf{x}](\tau)d\tau\).

Note
From the monotonicity of the integral operator, \(\int_0^{[t]}[\mathbf{x}](\tau)d\tau=[\int_0^{[t]}\mathbf{x}^-(\tau)d\tau,\int_0^{[t]}\mathbf{x}^+(\tau)d\tau]\)
Parameters
tthe subtdomain (Interval, must be a subset of the TubeVector's tdomain)
Returns
the set of feasible integral vectors

◆ integral() [3/3]

const IntervalVector codac::TubeVector::integral ( const Interval & t1,
const Interval & t2 ) const

Computes the box integral \(\int_{[t_1]}^{[t_2]}[\mathbf{x}](\tau)d\tau\).

Note
From the monotonicity of the integral operator, \(\int_{[t_1]}^{[t_2]}[\mathbf{x}](\tau)d\tau=[\int_{[t_1]}^{[t_2]}\mathbf{x}^-(\tau)d\tau,\int_{[t_1]}^{[t_2]}\mathbf{x}^+(\tau)d\tau]\)
Parameters
t1lower bound, subset of the TubeVector's tdomain
t2upper bound, subset of the TubeVector's tdomain
Returns
the set of feasible integral vectors

◆ partial_integral() [1/2]

const std::pair< IntervalVector, IntervalVector > codac::TubeVector::partial_integral ( const Interval & t) const

Computes the partial box integral \(\int_{0}^{[t]}[\mathbf{x}](\tau)d\tau\).

Note
From the monotonicity of the integral operator, \(\int_{0}^{[t]}[\mathbf{x}](\tau)d\tau=[\int_{0}^{[t]}\mathbf{x}^-(\tau)d\tau,\int_{0}^{[t]}\mathbf{x}^+(\tau)d\tau]\)
Parameters
tinterval upper bound, subset of the TubeVector's tdomain
Returns
the pair \(\big([i^-],[i^+]\big)\), where \([i^-]=\int_{0}^{[t]}\mathbf{x}^-(\tau)d\tau\) and \([i^+]=\int_{0}^{[t]}\mathbf{x}^+(\tau)d\tau\)

◆ partial_integral() [2/2]

const std::pair< IntervalVector, IntervalVector > codac::TubeVector::partial_integral ( const Interval & t1,
const Interval & t2 ) const

Computes the partial box integral \(\int_{[t_1]}^{[t_2]}[\mathbf{x}](\tau)d\tau\).

Note
From the monotonicity of the integral operator, \(\int_{[t_1]}^{[t_2]}[\mathbf{x}](\tau)d\tau=[\int_{[t_1]}^{[t_2]}\mathbf{x}^-(\tau)d\tau,\int_{[t_1]}^{[t_2]}\mathbf{x}^+(\tau)d\tau]\)
Parameters
t1interval lower bound, subset of the TubeVector's tdomain
t2interval upper bound, subset of the TubeVector's tdomain
Returns
the pair \(\big([i^-],[i^+]\big)\), where \([i^-]=\int_{[t_1]}^{[t_2]}\mathbf{x}^-(\tau)d\tau\) and \([i^+]=\int_{[t_1]}^{[t_2]}\mathbf{x}^+(\tau)d\tau\)

◆ serialize() [1/2]

void codac::TubeVector::serialize ( const std::string & binary_file_name = "x.tube",
int version_number = SERIALIZATION_VERSION ) const

Serializes this tube.

Note
The values and sampling (slices and gates) are serialized
Parameters
binary_file_namename of the output file (default value: "x.tube")
version_numberserialization version (used for tests purposes, default value: last version)

◆ serialize() [2/2]

void codac::TubeVector::serialize ( const std::string & binary_file_name,
const TrajectoryVector & traj,
int version_number = SERIALIZATION_VERSION ) const

Serializes this tube together with a TrajectoryVector object.

Note
The values and sampling (slices and gates) are serialized
The serialization of a TrajectoryVector defined from a Function object is not supported
The output file will appear in the executable current directory
Parameters
binary_file_namename of the output file (default value: "x.tube")
trajthe TrajectoryVector object to serialize (for instance, actual but unknown values)
version_numberserialization version (used for tests purposes, default value: last version)

◆ same_slicing() [1/2]

static bool codac::TubeVector::same_slicing ( const TubeVector & x1,
const Tube & x2 )
static

Tests whether a TubeVector object shares the slicing of another Tube object.

Note
If true, it means the two tubes are defined with the same amount of slices and identical sampling
Parameters
x1the TubeVector
x2the Tube
Returns
true in case of same slicing

◆ same_slicing() [2/2]

static bool codac::TubeVector::same_slicing ( const TubeVector & x1,
const TubeVector & x2 )
static

Tests whether the two TubeVector objects are sharing the same slicing.

Note
If true, it means the two tubes are defined with the same amount of slices and identical sampling
Parameters
x1the first TubeVector
x2the second TubeVector
Returns
true in case of same slicing

◆ hull()

static const TubeVector codac::TubeVector::hull ( const std::list< TubeVector > & l_tubes)
static

Computes the hull of several tubes.

Parameters
l_tubeslist of tubes
Returns
the tube vector enveloping the other ones

◆ codomain_box()

const IntervalVector codac::TubeVector::codomain_box ( ) const
protectedvirtual

Returns the box \([\mathbf{x}]([t_0,t_f])\).

Note
Used for genericity purposes
Returns
the envelope of codomain values

Implements codac::DynamicalItem.

◆ deserialize()

void codac::TubeVector::deserialize ( const std::string & binary_file_name,
TrajectoryVector *& traj )
protected

Restores a n-dimensional tube from serialization, together with a TrajectoryVector object.

Note
The TubeVector and the TrajectoryVector must have been serialized beforehand by the appropriate method serialize()
Parameters
binary_file_namepath to the binary file
traja pointer to the TrajectoryVector object to be instantiated

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