codac
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:
[legend]
Collaboration diagram for codac::TubeVector:
[legend]

## Public Member Functions

Definition
TubeVector (const Interval &tdomain, int n)
Creates a n-dimensional tube $[\mathbf{x}](\cdot)$ made of one slice. More...

TubeVector (const Interval &tdomain, const IntervalVector &codomain)
Creates a n-dimensional tube $[\mathbf{x}](\cdot)$ made of one slice. More...

TubeVector (const Interval &tdomain, double timestep, int n)
Creates a n-dimensional tube $[\mathbf{x}](\cdot)$ with some temporal discretization. More...

TubeVector (const Interval &tdomain, double timestep, const IntervalVector &codomain)
Creates a n-dimensional tube $[\mathbf{x}](\cdot)$ with some temporal discretization. More...

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. More...

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)$. More...

TubeVector (std::initializer_list< Tube > list)
Creates a n-dimensional tube $[\mathbf{x}](\cdot)$ from a list of Tube objects. More...

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

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. More...

TubeVector (int n, const Tube &x)
Creates a n-dimensional tube with all the components initialized to $[x](\cdot)$. More...

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. More...

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)]$. More...

TubeVector (const std::string &binary_file_name)
Restore a n-dimensional tube from serialization. More...

TubeVector (const std::string &binary_file_name, TrajectoryVector *&traj)
Restore a n-dimensional tube from serialization, together with a TrajectoryVector object. More...

~TubeVector ()
TubeVector destructor.

int size () const
Returns the dimension of the tube. More...

void resize (int n)
Resizes this TubeVector. More...

const TubeVector subvector (int start_index, int end_index) const
Returns a subvector of this TubeVector. More...

void put (int start_index, const TubeVector &subvec)
Puts a subvector into this TubeVector at a given position. More...

const TubeVector primitive () const
Returns the primitive TubeVector of this tube, with a zero constant of integration. More...

const TubeVector primitive (const IntervalVector &c) const
Returns the primitive TubeVector of this tube. More...

const TubeVectoroperator= (const TubeVector &x)
Returns a copy of a TubeVector. More...

const Interval tdomain () const
Returns the temporal definition domain of this tube. More...

const TrajectoryVector lb () const
Returns a possible lower bound $\mathbf{x}^{-}(\cdot)$ of the tube. More...

const TrajectoryVector ub () const
Returns a possible upper bound $\mathbf{x}^{+}(\cdot)$ of the tube. More...

Slices structure
int nb_slices () const
Returns the number of slices of this tube. More...

int time_to_index (double t) const
Returns the Slice index related to the temporal key $t$. More...

void sample (double t)
Samples this tube at $t$. More...

void sample (double t, const IntervalVector &gate)
Samples this tube at $t$ with a specific gate value. More...

void sample (const Tube &x)
Samples this tube so that each component will share the same sampling of the scalar $[x](\cdot)$. More...

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)$. More...

Accessing values
const IntervalVector codomain () const
Returns the box of feasible values. More...

double volume () const
Returns the volume of this tube. More...

Tubeoperator[] (int index)
Returns the ith Tube of this TubeVector. More...

const Tubeoperator[] (int index) const
Returns a const reference to the ith Tube of this TubeVector. More...

const IntervalVector operator() (int slice_id) const
Returns the value of the ith slice. More...

const IntervalVector operator() (double t) const
Returns the evaluation of this tube at $t$. More...

const IntervalVector operator() (const Interval &t) const
Returns the interval evaluation of this tube over $[t]$. More...

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]$. More...

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)$. More...

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)$. More...

const Interval invert (const IntervalVector &y, const Interval &search_tdomain=Interval::ALL_REALS) const
Returns the interval inversion $[\mathbf{x}]^{-1}([\mathbf{y}])$. More...

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}])$. More...

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}])$. More...

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}])$. More...

const TrajectoryVector diam (bool gates_thicknesses=false) const
Returns the diameters of the tube as a trajectory. More...

const TrajectoryVector diam (const TubeVector &v) const
Returns the diameters of the tube as a trajectory. More...

const Vector max_diam () const
Returns a vector of the maximum diameters of the tube for each component. More...

double max_gate_diam (double &t) const
Returns the maximum diameter of all gates of the tube vector in all components. More...

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. More...

const Trajectory diag (bool gates_diag=false) const
Returns the slices diagonals of the tube as a trajectory. More...

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. More...

Tests
bool operator== (const TubeVector &x) const
Returns true if this tube is equal to $[\mathbf{x}](\cdot)$. More...

bool operator!= (const TubeVector &x) const
Returns true if this tube is different from $[\mathbf{x}](\cdot)$. More...

bool is_subset (const TubeVector &x) const
Returns true if this tube is a subset of $[\mathbf{x}](\cdot)$. More...

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. More...

bool is_interior_subset (const TubeVector &x) const
Returns true if this tube is a subset of the interior of $[\mathbf{x}](\cdot)$. More...

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. More...

bool is_superset (const TubeVector &x) const
Returns true if this tube is a superset of $[\mathbf{x}](\cdot)$. More...

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. More...

bool is_empty () const
Returns true if this tube is empty. More...

const BoolInterval contains (const TrajectoryVector &x) const
Returns true if this tube contains the trajectory $\mathbf{x}(\cdot)$. More...

bool overlaps (const TubeVector &x, float ratio=1.) const
Returns true if this tube overlaps the tube $[\mathbf{x}](\cdot)$. More...

Setting values
const TubeVectorset (const IntervalVector &y)
Sets a constant box value for this tube: $\forall t, [\mathbf{x}](t)=[\mathbf{y}]$. More...

const TubeVectorset (const IntervalVector &y, int slice_id)
Sets the box value of the ith slice of this tube. More...

const TubeVectorset (const IntervalVector &y, double t)
Sets the box value of this tube at $t$: $[\mathbf{x}](t)=[\mathbf{y}]$. More...

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}]$. More...

const TubeVectorset_empty ()
Sets this tube to the empty set. More...

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

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

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

TubeVectortruncate_tdomain (const Interval &tdomain)
Truncates the tdomain of $[\mathbf{x}](\cdot)$. More...

void shift_tdomain (double a)
Shifts the tdomain $[t_0,t_f]$ of $[\mathbf{x}](\cdot)$. More...

Bisection
const std::pair< TubeVector, TubeVectorbisect (double t, float ratio=0.49) const
Bisects this tube. More...

const std::pair< TubeVector, TubeVectorbisect (double t, int dim, float ratio=0.49) const
Bisects this tube along a specific dimension. More...

Assignments operators
const TubeVectoroperator+= (const Interval &x)
Operates +=. More...

const TubeVectoroperator+= (const Trajectory &x)
Operates +=. More...

const TubeVectoroperator+= (const Tube &x)
Operates +=. More...

const TubeVectoroperator+= (const IntervalVector &x)
Operates +=. More...

const TubeVectoroperator+= (const TrajectoryVector &x)
Operates +=. More...

const TubeVectoroperator+= (const TubeVector &x)
Operates +=. More...

const TubeVectoroperator-= (const Interval &x)
Operates -=. More...

const TubeVectoroperator-= (const Trajectory &x)
Operates -=. More...

const TubeVectoroperator-= (const Tube &x)
Operates -=. More...

const TubeVectoroperator-= (const IntervalVector &x)
Operates -=. More...

const TubeVectoroperator-= (const TrajectoryVector &x)
Operates -=. More...

const TubeVectoroperator-= (const TubeVector &x)
Operates -=. More...

const TubeVectoroperator*= (const Interval &x)
Operates *=. More...

const TubeVectoroperator*= (const Trajectory &x)
Operates *=. More...

const TubeVectoroperator*= (const Tube &x)
Operates *=. More...

const TubeVectoroperator/= (const Interval &x)
Operates /=. More...

const TubeVectoroperator/= (const Trajectory &x)
Operates /=. More...

const TubeVectoroperator/= (const Tube &x)
Operates /=. More...

const TubeVectoroperator|= (const IntervalVector &x)
Operates |=. More...

const TubeVectoroperator|= (const TrajectoryVector &x)
Operates |=. More...

const TubeVectoroperator|= (const TubeVector &x)
Operates |=. More...

const TubeVectoroperator &= (const IntervalVector &x)
Operates &=. More...

const TubeVectoroperator &= (const TrajectoryVector &x)
Operates &=. More...

const TubeVectoroperator &= (const TubeVector &x)
Operates &=. More...

Tree synthesis structure
void enable_synthesis (SynthesisMode mode=SynthesisMode::BINARY_TREE, double eps=1.e-3) const
Enables the computation of a synthesis tree. More...

Integration
const IntervalVector integral (double t) const
Computes the box integral $\int_0^t[\mathbf{x}](\tau)d\tau$. More...

const IntervalVector integral (const Interval &t) const
Computes the box integral $\int_0^{[t]}[\mathbf{x}](\tau)d\tau$. More...

const IntervalVector integral (const Interval &t1, const Interval &t2) const
Computes the box integral $\int_{[t_1]}^{[t_2]}[\mathbf{x}](\tau)d\tau$. More...

const std::pair< IntervalVector, IntervalVector > partial_integral (const Interval &t) const
Computes the partial box integral $\int_{0}^{[t]}[\mathbf{x}](\tau)d\tau$. More...

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$. More...

Serialization
void serialize (const std::string &binary_file_name="x.tube", int version_number=SERIALIZATION_VERSION) const
Serializes this tube. More...

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. More...

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. More...

static bool same_slicing (const TubeVector &x1, const TubeVector &x2)
Tests whether the two TubeVector objects are sharing the same slicing. More...

static const TubeVector hull (const std::list< TubeVector > &l_tubes)
Computes the hull of several tubes. More...

Static Public Member Functions inherited from codac::DynamicalItem
static bool valid_tdomain (const Interval &tdomain)
Verifies that this interval is a feasible tdomain. More...

## Protected Member Functions

TubeVector ()
Creates an undefined n-dimensional tube. More...

const IntervalVector codomain_box () const
Returns the box $[\mathbf{x}]([t_0,t_f])$. More...

void deserialize (const std::string &binary_file_name, TrajectoryVector *&traj)
Restores a n-dimensional tube from serialization, together with a TrajectoryVector object. More...

## Protected Attributes

int m_n = 0
dimension of this tube

Tubem_v_tubes = nullptr
array of components (scalar tubes)

## Friends

void deserialize_TubeVector (std::ifstream &bin_file, TubeVector *&tube)
Creates a TubeVector object from a binary file. More...

## String

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

std::ostream & operator<< (std::ostream &str, const TubeVector &x)
Displays a synthesis of this tube. More...

## Detailed Description

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

Note
Use Tube for the one-dimensional case

## ◆ 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
 tdomain temporal domain $[t_0,t_f]$ n dimension 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
 tdomain temporal domain $[t_0,t_f]$ codomain IntervalVector 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
 tdomain temporal domain $[t_0,t_f]$ timestep sampling value $\delta$ for the temporal discretization (double) n dimension 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
 tdomain temporal domain $[t_0,t_f]$ timestep sampling value $\delta$ for the temporal discretization (double) codomain IntervalVector 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
 tdomain temporal domain $[t_0,t_f]$ timestep sampling value $\delta$ for the temporal discretization (double) f TFnc 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_tdomains vector of temporal domains $[t_i]$ v_codomains vector 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
 list list 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
 x TubeVector 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
 x TubeVector from which the sampling will be duplicated codomain IntervalVector 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
 n dimension of this tube x Tube 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
 traj TrajectoryVector $\mathbf{x}(\cdot)$ to enclose timestep sampling 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
 lb TrajectoryVector defining the lower bound $\mathbf{x}^{-}(\cdot)$ of the tube ub TrajectoryVector defining the upper bound $\mathbf{x}^{+}(\cdot)$ of the tube timestep sampling 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_name path 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_name path to the binary file traj a 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

## ◆ 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
 n the 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_index first component index of the subvector to be returned end_index last 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_index position where the subvector will be put subvec the 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
 c the 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
 x the 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
 t the 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
 t the 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
 t the temporal key (double, must belong to the TubeVector's tdomain) gate the 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
 x the 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
 x the 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
 index the 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
 index the 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_id the 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
 t the 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
 t the subtdomain (Interval, must be a subset of the TubeVector's tdomain)
Returns
IntervalVector envelope $[\mathbf{x}]([t])$

## ◆ eval()

 const std::pair 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
 t the 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
 t the temporal key (double, must belong to the TubeVector's tdomain) v the 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
 t the subtdomain (Interval, must be a subset of the TubeVector's tdomain) v the 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
 y the box codomain search_tdomain the 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
 y the interval codomain v_t the 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_tdomain the 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
 y the interval codomain v the derivative tube vector such that $\dot{\mathbf{x}}(\cdot)\in[\mathbf{v}](\cdot)$ search_tdomain the 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
 y the interval codomain v_t the 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)$ v the derivative tube such that $\dot{\mathbf{x}}(\cdot)\in[\mathbf{v}](\cdot)$ search_tdomain the 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_thicknesses if 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
 v the 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
 t instant $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_diag if 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_index first component index of the subvector end_index last component index of the subvector gates_diag if 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
 x the 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
 x the 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
 x the 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
 x the 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
 x the 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
 x the 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
 x the 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
 x the 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
 x the 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
 x the other tube ratio an 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
 y IntervalVector 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
 y IntervalVector value of the ith slice slice_id index 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
 y IntervalVector value of the gate t the 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
 y IntervalVector value to be set t the 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
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
 rad half 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
 rad the 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
 tdomain new 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
 a the offset value so that $[t_0,t_f]:=[t_0+a,t_f+a]$

## ◆ bisect() [1/2]

 const std::pair 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
 t the temporal key (double, must belong to the TubeVector's domain) ratio the bisection ratio (default value: 0.49)
Returns
a pair of two TubeVector objects resulting from the bisection

## ◆ bisect() [2/2]

 const std::pair 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
 t the temporal key (double, must belong to the TubeVector's domain) dim the dimension id ratio the 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
 x Interval
Returns
(*this)+=x

## ◆ operator+=() [2/6]

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

Operates +=.

Parameters
Returns
(*this)+=x

## ◆ operator+=() [3/6]

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

Operates +=.

Parameters
 x Tube
Returns
(*this)+=x

## ◆ operator+=() [4/6]

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

Operates +=.

Parameters
 x IntervalVector
Returns
(*this)+=x

## ◆ operator+=() [5/6]

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

Operates +=.

Parameters
Returns
(*this)+=x

## ◆ operator+=() [6/6]

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

Operates +=.

Parameters
Returns
(*this)+=x

## ◆ operator-=() [1/6]

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

Operates -=.

Parameters
 x Interval
Returns
(*this)-=x

## ◆ operator-=() [2/6]

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

Operates -=.

Parameters
Returns
(*this)-=x

## ◆ operator-=() [3/6]

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

Operates -=.

Parameters
 x Tube
Returns
(*this)-=x

## ◆ operator-=() [4/6]

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

Operates -=.

Parameters
 x IntervalVector
Returns
(*this)-=x

## ◆ operator-=() [5/6]

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

Operates -=.

Parameters
Returns
(*this)-=x

## ◆ operator-=() [6/6]

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

Operates -=.

Parameters
Returns
(*this)-=x

## ◆ operator*=() [1/3]

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

Operates *=.

Parameters
 x Interval
Returns
(this)=x

## ◆ operator*=() [2/3]

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

Operates *=.

Parameters
Returns
(this)=x

## ◆ operator*=() [3/3]

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

Operates *=.

Parameters
 x Tube
Returns
(this)=x

## ◆ operator/=() [1/3]

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

Operates /=.

Parameters
 x Interval
Returns
(*this)/=x

## ◆ operator/=() [2/3]

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

Operates /=.

Parameters
Returns
(*this)/=x

## ◆ operator/=() [3/3]

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

Operates /=.

Parameters
 x Tube
Returns
(*this)/=x

## ◆ operator|=() [1/3]

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

Operates |=.

Parameters
 x IntervalVector
Returns
(*this)|=x

## ◆ operator|=() [2/3]

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

Operates |=.

Parameters
Returns
(*this)|=x

## ◆ operator|=() [3/3]

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

Operates |=.

Parameters
Returns
(*this)|=x

## ◆ operator &=() [1/3]

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

Operates &=.

Parameters
 x IntervalVector
Returns
(*this)&=x

## ◆ operator &=() [2/3]

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

Operates &=.

Parameters
Returns
(*this)&=x

## ◆ operator &=() [3/3]

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

Operates &=.

Parameters
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
 mode mode of synthesis eps precision 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
 t the 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
 t the 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
 t1 lower bound, subset of the TubeVector's tdomain t2 upper bound, subset of the TubeVector's tdomain
Returns
the set of feasible integral vectors

## ◆ partial_integral() [1/2]

 const std::pair 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
 t interval 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 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
 t1 interval lower bound, subset of the TubeVector's tdomain t2 interval 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_name name of the output file (default value: "x.tube") version_number serialization 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_name name of the output file (default value: "x.tube") traj the TrajectoryVector object to serialize (for instance, actual but unknown values) version_number serialization 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
 x1 the TubeVector x2 the 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
 x1 the first TubeVector x2 the 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_tubes list 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_name path to the binary file traj a pointer to the TrajectoryVector object to be instantiated

## ◆ operator<<

 std::ostream& operator<< ( std::ostream & str, const TubeVector & x )
friend

Displays a synthesis of this tube.

Parameters
 str ostream x tube to be displayed
Returns
ostream

## ◆ deserialize_TubeVector

 void deserialize_TubeVector ( std::ifstream & bin_file, TubeVector *& tube )
friend

Creates a TubeVector object from a binary file.

The binary file has to be written by the serialize_TubeVector() function.

Parameters
 bin_file binary file (ifstream object) tube TubeVector object to be deserialized

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