|
codac
1.5.7
|
n-dimensional tube \([\mathbf{x}](\cdot)\), defined as an interval of n-dimensional trajectories More...
#include <codac_TubeVector.h>


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 TubeVector & | operator= (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... | |
| Tube & | operator[] (int index) |
| Returns the ith Tube of this TubeVector. More... | |
| const Tube & | operator[] (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 Slice * | 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. 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 TubeVector & | set (const IntervalVector &y) |
| Sets a constant box value for this tube: \(\forall t, [\mathbf{x}](t)=[\mathbf{y}]\). More... | |
| const TubeVector & | set (const IntervalVector &y, int slice_id) |
| Sets the box value of the ith slice of this tube. More... | |
| const TubeVector & | set (const IntervalVector &y, double t) |
| Sets the box value of this tube at \(t\): \([\mathbf{x}](t)=[\mathbf{y}]\). More... | |
| const 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}]\). More... | |
| const TubeVector & | set_empty () |
| Sets this tube to the empty set. More... | |
| const TubeVector & | inflate (double rad) |
| Inflates this tube by adding \([-\mathbf{rad},+\mathbf{rad}]\) to all its codomain components. More... | |
| const TubeVector & | inflate (const Vector &rad) |
| Inflates this tube by adding \([-\mathbf{rad},+\mathbf{rad}]\) to all its codomain components. More... | |
| const TubeVector & | inflate (const TrajectoryVector &rad) |
| Inflates this tube by adding non-constant uncertainties defined in a trajectory. More... | |
| TubeVector & | truncate_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, TubeVector > | bisect (double t, float ratio=0.49) const |
| Bisects this tube. More... | |
| const std::pair< TubeVector, TubeVector > | bisect (double t, int dim, float ratio=0.49) const |
| Bisects this tube along a specific dimension. More... | |
Assignments operators | |
| const TubeVector & | operator+= (const Interval &x) |
| Operates +=. More... | |
| const TubeVector & | operator+= (const Trajectory &x) |
| Operates +=. More... | |
| const TubeVector & | operator+= (const Tube &x) |
| Operates +=. More... | |
| const TubeVector & | operator+= (const IntervalVector &x) |
| Operates +=. More... | |
| const TubeVector & | operator+= (const TrajectoryVector &x) |
| Operates +=. More... | |
| const TubeVector & | operator+= (const TubeVector &x) |
| Operates +=. More... | |
| const TubeVector & | operator-= (const Interval &x) |
| Operates -=. More... | |
| const TubeVector & | operator-= (const Trajectory &x) |
| Operates -=. More... | |
| const TubeVector & | operator-= (const Tube &x) |
| Operates -=. More... | |
| const TubeVector & | operator-= (const IntervalVector &x) |
| Operates -=. More... | |
| const TubeVector & | operator-= (const TrajectoryVector &x) |
| Operates -=. More... | |
| const TubeVector & | operator-= (const TubeVector &x) |
| Operates -=. More... | |
| const TubeVector & | operator*= (const Interval &x) |
| Operates *=. More... | |
| const TubeVector & | operator*= (const Trajectory &x) |
| Operates *=. More... | |
| const TubeVector & | operator*= (const Tube &x) |
| Operates *=. More... | |
| const TubeVector & | operator/= (const Interval &x) |
| Operates /=. More... | |
| const TubeVector & | operator/= (const Trajectory &x) |
| Operates /=. More... | |
| const TubeVector & | operator/= (const Tube &x) |
| Operates /=. More... | |
| const TubeVector & | operator|= (const IntervalVector &x) |
| Operates |=. More... | |
| const TubeVector & | operator|= (const TrajectoryVector &x) |
| Operates |=. More... | |
| const TubeVector & | operator|= (const TubeVector &x) |
| Operates |=. More... | |
| const TubeVector & | operator&= (const IntervalVector &x) |
| Operates &=. More... | |
| const TubeVector & | operator&= (const TrajectoryVector &x) |
| Operates &=. More... | |
| const TubeVector & | operator&= (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 | |
| Tube * | m_v_tubes = nullptr |
| array of components (scalar tubes) | |
String | |
| const std::string | class_name () const |
| Returns the name of this class. More... | |
n-dimensional tube \([\mathbf{x}](\cdot)\), defined as an interval of n-dimensional trajectories
|
explicit |
Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) made of one slice.
| tdomain | temporal domain \([t_0,t_f]\) |
| n | dimension of this tube |
|
explicit |
Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) made of one slice.
| tdomain | temporal domain \([t_0,t_f]\) |
| codomain | IntervalVector value of the slice |
|
explicit |
Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) with some temporal discretization.
| tdomain | temporal domain \([t_0,t_f]\) |
| timestep | sampling value \(\delta\) for the temporal discretization (double) |
| n | dimension of this tube |
|
explicit |
Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) with some temporal discretization.
| tdomain | temporal domain \([t_0,t_f]\) |
| timestep | sampling value \(\delta\) for the temporal discretization (double) |
| codomain | IntervalVector value of the slices |
|
explicit |
Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) from a TFnc object and with some temporal discretization.
| 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)\) |
|
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)\).
| v_tdomains | vector of temporal domains \([t_i]\) |
| v_codomains | vector of codomains \([\mathbf{x}_i]\) related to the \([t_i]\)'s |
| codac::TubeVector::TubeVector | ( | std::initializer_list< Tube > | list | ) |
Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) from a list of Tube objects.
| list | list of \([x_i](\cdot)\) tubes |
| codac::TubeVector::TubeVector | ( | const TubeVector & | x | ) |
Creates a copy of a n-dimensional tube \([\mathbf{x}](\cdot)\), with the same time discretization.
| x | TubeVector to be duplicated |
|
explicit |
Creates a copy of a n-dimensional tube \([\mathbf{x}](\cdot)\), with the same time discretization but a specific constant codomain.
| x | TubeVector from which the sampling will be duplicated |
| codomain | IntervalVector value of the slices |
|
explicit |
Creates a n-dimensional tube with all the components initialized to \([x](\cdot)\).
| n | dimension of this tube |
| x | Tube to be copied for all the components |
|
explicit |
Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) enclosing a n-dimensional trajectory \(\mathbf{x}(\cdot)\), possibly with some temporal discretization.
| traj | TrajectoryVector \(\mathbf{x}(\cdot)\) to enclose |
| timestep | sampling value \(\delta\) for the temporal discretization |
|
explicit |
Creates a n-dimensional tube \([\mathbf{x}](\cdot)\) defined as an interval of two n-dimensional trajectories \([\mathbf{lb}(\cdot),\mathbf{ub}(\cdot)]\).
| 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 |
|
explicit |
Restore a n-dimensional tube from serialization.
| binary_file_name | path to the binary file |
|
explicit |
Restore a n-dimensional tube from serialization, together with a TrajectoryVector object.
| binary_file_name | path to the binary file |
| traj | a pointer to the TrajectoryVector object to be instantiated |
|
protected |
Creates an undefined n-dimensional tube.
|
virtual |
| void codac::TubeVector::resize | ( | int | n | ) |
Resizes this TubeVector.
| n | the new size to be set |
| const TubeVector codac::TubeVector::subvector | ( | int | start_index, |
| int | end_index | ||
| ) | const |
Returns a subvector of this TubeVector.
| start_index | first component index of the subvector to be returned |
| end_index | last component index of the subvector to be returned |
| void codac::TubeVector::put | ( | int | start_index, |
| const TubeVector & | subvec | ||
| ) |
Puts a subvector into this TubeVector at a given position.
| start_index | position where the subvector will be put |
| subvec | the TubeVector to put from start_index |
| const TubeVector codac::TubeVector::primitive | ( | ) | const |
Returns the primitive TubeVector of this tube, with a zero constant of integration.
| const TubeVector codac::TubeVector::primitive | ( | const IntervalVector & | c | ) | const |
Returns the primitive TubeVector of this tube.
| c | the constant of integration |
| const TubeVector& codac::TubeVector::operator= | ( | const TubeVector & | x | ) |
Returns a copy of a TubeVector.
| x | the TubeVector object to be copied |
|
virtual |
Returns the temporal definition domain of this tube.
Implements codac::DynamicalItem.
| const TrajectoryVector codac::TubeVector::lb | ( | ) | const |
Returns a possible lower bound \(\mathbf{x}^{-}(\cdot)\) of the tube.
| const TrajectoryVector codac::TubeVector::ub | ( | ) | const |
Returns a possible upper bound \(\mathbf{x}^{+}(\cdot)\) of the tube.
| int codac::TubeVector::nb_slices | ( | ) | const |
Returns the number of slices of this tube.
| int codac::TubeVector::time_to_index | ( | double | t | ) | const |
Returns the Slice index related to the temporal key \(t\).
| t | the temporal key (double, must belong to the TubeVector's tdomain) |
| void codac::TubeVector::sample | ( | double | t | ) |
Samples this tube at \(t\).
| t | the temporal key (double, must belong to the TubeVector's tdomain) |
| void codac::TubeVector::sample | ( | double | t, |
| const IntervalVector & | gate | ||
| ) |
Samples this tube at \(t\) with a specific gate value.
| t | the temporal key (double, must belong to the TubeVector's tdomain) |
| gate | the IntervalVector value of this tube at \(t\) |
| void codac::TubeVector::sample | ( | const Tube & | x | ) |
Samples this tube so that each component will share the same sampling of the scalar \([x](\cdot)\).
| x | the Tube from which the new sampling will come from |
| 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)\).
| x | the TubeVector from which the new sampling will come from |
| const IntervalVector codac::TubeVector::codomain | ( | ) | const |
Returns the box of feasible values.
| double codac::TubeVector::volume | ( | ) | const |
Returns the volume of this tube.
| Tube& codac::TubeVector::operator[] | ( | int | index | ) |
Returns the ith Tube of this TubeVector.
| index | the index of this ith component |
| const Tube& codac::TubeVector::operator[] | ( | int | index | ) | const |
Returns a const reference to the ith Tube of this TubeVector.
| index | the index of this ith component |
| const IntervalVector codac::TubeVector::operator() | ( | int | slice_id | ) | const |
Returns the value of the ith slice.
| slice_id | the index of the ith slice |
| const IntervalVector codac::TubeVector::operator() | ( | double | t | ) | const |
Returns the evaluation of this tube at \(t\).
| t | the temporal key (double, must belong to the TubeVector's tdomain) |
| const IntervalVector codac::TubeVector::operator() | ( | const Interval & | t | ) | const |
Returns the interval evaluation of this tube over \([t]\).
| t | the subtdomain (Interval, must be a subset of the TubeVector's tdomain) |
| 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]\).
| t | the subtdomain (Interval, must be a subset of the TubeVector's tdomain) |
| 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)\).
| 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)\) |
| 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)\).
| 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)\) |
| 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}])\).
| y | the box codomain |
| search_tdomain | the optional temporal domain on which the inversion will be performed |
| 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}])\).
| 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 |
| 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}])\).
| 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 |
| 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}])\).
| 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 |
| const TrajectoryVector codac::TubeVector::diam | ( | bool | gates_thicknesses = false | ) | const |
Returns the diameters of the tube as a trajectory.
| gates_thicknesses | if true, the diameters of the gates will be evaluated too |
| const TrajectoryVector codac::TubeVector::diam | ( | const TubeVector & | v | ) | const |
Returns the diameters of the tube as a trajectory.
| v | the derivative tube such that \(\dot{x}(\cdot)\in[v](\cdot)\) |
| const Vector codac::TubeVector::max_diam | ( | ) | const |
Returns a vector of the maximum diameters of the tube for each component.
| double codac::TubeVector::max_gate_diam | ( | double & | t | ) | const |
Returns the maximum diameter of all gates of the tube vector in all components.
| t | instant \(t\) corresponding to this maximal diameter |
| 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.
| const Trajectory codac::TubeVector::diag | ( | bool | gates_diag = false | ) | const |
Returns the slices diagonals of the tube as a trajectory.
| gates_diag | if true, the diagonals of the gates will be evaluated too |
| 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.
| 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 |
| bool codac::TubeVector::operator== | ( | const TubeVector & | x | ) | const |
Returns true if this tube is equal to \([\mathbf{x}](\cdot)\).
| x | the TubeVector object |
| bool codac::TubeVector::operator!= | ( | const TubeVector & | x | ) | const |
Returns true if this tube is different from \([\mathbf{x}](\cdot)\).
| x | the TubeVector object |
| bool codac::TubeVector::is_subset | ( | const TubeVector & | x | ) | const |
Returns true if this tube is a subset of \([\mathbf{x}](\cdot)\).
| x | the TubeVector object |
| 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.
| x | the TubeVector object |
| 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)\).
| x | the TubeVector object |
| 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.
| x | the TubeVector object |
| bool codac::TubeVector::is_superset | ( | const TubeVector & | x | ) | const |
Returns true if this tube is a superset of \([\mathbf{x}](\cdot)\).
| x | the TubeVector object |
| 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.
| x | the TubeVector object |
| bool codac::TubeVector::is_empty | ( | ) | const |
Returns true if this tube is empty.
| const BoolInterval codac::TubeVector::contains | ( | const TrajectoryVector & | x | ) | const |
Returns true if this tube contains the trajectory \(\mathbf{x}(\cdot)\).
| x | the trajectory that might be contained by this tube |
| bool codac::TubeVector::overlaps | ( | const TubeVector & | x, |
| float | ratio = 1. |
||
| ) | const |
Returns true if this tube overlaps the tube \([\mathbf{x}](\cdot)\).
| 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 |
| const TubeVector& codac::TubeVector::set | ( | const IntervalVector & | y | ) |
Sets a constant box value for this tube: \(\forall t, [\mathbf{x}](t)=[\mathbf{y}]\).
| y | IntervalVector value of the slices |
| const TubeVector& codac::TubeVector::set | ( | const IntervalVector & | y, |
| int | slice_id | ||
| ) |
Sets the box value of the ith slice of this tube.
| y | IntervalVector value of the ith slice |
| slice_id | index of the ith Slice |
| const TubeVector& codac::TubeVector::set | ( | const IntervalVector & | y, |
| double | t | ||
| ) |
Sets the box value of this tube at \(t\): \([\mathbf{x}](t)=[\mathbf{y}]\).
| y | IntervalVector value of the gate |
| t | the temporal key (double, must belong to the TubeVector's tdomain) |
| 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}]\).
| y | IntervalVector value to be set |
| t | the subtdomain (Interval, must be a subset of the TubeVector's tdomain) |
| const TubeVector& codac::TubeVector::set_empty | ( | ) |
Sets this tube to the empty set.
| const TubeVector& codac::TubeVector::inflate | ( | double | rad | ) |
Inflates this tube by adding \([-\mathbf{rad},+\mathbf{rad}]\) to all its codomain components.
| rad | half of the inflation |
| const TubeVector& codac::TubeVector::inflate | ( | const Vector & | rad | ) |
Inflates this tube by adding \([-\mathbf{rad},+\mathbf{rad}]\) to all its codomain components.
| rad | half of the inflation for each component |
| const TubeVector& codac::TubeVector::inflate | ( | const TrajectoryVector & | rad | ) |
Inflates this tube by adding non-constant uncertainties defined in a trajectory.
| rad | the TrajectoryVector object defining the non-constant inflation |
| TubeVector& codac::TubeVector::truncate_tdomain | ( | const Interval & | tdomain | ) |
Truncates the tdomain of \([\mathbf{x}](\cdot)\).
| tdomain | new temporal domain \([t_0,t_f]\) |
| void codac::TubeVector::shift_tdomain | ( | double | a | ) |
Shifts the tdomain \([t_0,t_f]\) of \([\mathbf{x}](\cdot)\).
| a | the offset value so that \([t_0,t_f]:=[t_0+a,t_f+a]\) |
| const std::pair<TubeVector,TubeVector> codac::TubeVector::bisect | ( | double | t, |
| float | ratio = 0.49 |
||
| ) | const |
Bisects this tube.
| t | the temporal key (double, must belong to the TubeVector's domain) |
| ratio | the bisection ratio (default value: 0.49) |
| const std::pair<TubeVector,TubeVector> codac::TubeVector::bisect | ( | double | t, |
| int | dim, | ||
| float | ratio = 0.49 |
||
| ) | const |
Bisects this tube along a specific dimension.
| t | the temporal key (double, must belong to the TubeVector's domain) |
| dim | the dimension id |
| ratio | the bisection ratio (default value: 0.49) |
| const TubeVector& codac::TubeVector::operator+= | ( | const Interval & | x | ) |
Operates +=.
| x | Interval |
| const TubeVector& codac::TubeVector::operator+= | ( | const Trajectory & | x | ) |
| const TubeVector& codac::TubeVector::operator+= | ( | const Tube & | x | ) |
| const TubeVector& codac::TubeVector::operator+= | ( | const IntervalVector & | x | ) |
Operates +=.
| x | IntervalVector |
| const TubeVector& codac::TubeVector::operator+= | ( | const TrajectoryVector & | x | ) |
| const TubeVector& codac::TubeVector::operator+= | ( | const TubeVector & | x | ) |
| const TubeVector& codac::TubeVector::operator-= | ( | const Interval & | x | ) |
Operates -=.
| x | Interval |
| const TubeVector& codac::TubeVector::operator-= | ( | const Trajectory & | x | ) |
| const TubeVector& codac::TubeVector::operator-= | ( | const Tube & | x | ) |
| const TubeVector& codac::TubeVector::operator-= | ( | const IntervalVector & | x | ) |
Operates -=.
| x | IntervalVector |
| const TubeVector& codac::TubeVector::operator-= | ( | const TrajectoryVector & | x | ) |
| const TubeVector& codac::TubeVector::operator-= | ( | const TubeVector & | x | ) |
| const TubeVector& codac::TubeVector::operator*= | ( | const Interval & | x | ) |
Operates *=.
| x | Interval |
| const TubeVector& codac::TubeVector::operator*= | ( | const Trajectory & | x | ) |
| const TubeVector& codac::TubeVector::operator*= | ( | const Tube & | x | ) |
| const TubeVector& codac::TubeVector::operator/= | ( | const Interval & | x | ) |
Operates /=.
| x | Interval |
| const TubeVector& codac::TubeVector::operator/= | ( | const Trajectory & | x | ) |
| const TubeVector& codac::TubeVector::operator/= | ( | const Tube & | x | ) |
| const TubeVector& codac::TubeVector::operator|= | ( | const IntervalVector & | x | ) |
Operates |=.
| x | IntervalVector |
| const TubeVector& codac::TubeVector::operator|= | ( | const TrajectoryVector & | x | ) |
| const TubeVector& codac::TubeVector::operator|= | ( | const TubeVector & | x | ) |
| const TubeVector& codac::TubeVector::operator&= | ( | const IntervalVector & | x | ) |
Operates &=.
| x | IntervalVector |
| const TubeVector& codac::TubeVector::operator&= | ( | const TrajectoryVector & | x | ) |
| const TubeVector& codac::TubeVector::operator&= | ( | const TubeVector & | x | ) |
|
inlinevirtual |
Returns the name of this class.
Implements codac::DynamicalItem.
| void codac::TubeVector::enable_synthesis | ( | SynthesisMode | mode = SynthesisMode::BINARY_TREE, |
| double | eps = 1.e-3 |
||
| ) | const |
Enables the computation of a synthesis tree.
| mode | mode of synthesis |
| eps | precision of the polynomial approximation, if selected |
| const IntervalVector codac::TubeVector::integral | ( | double | t | ) | const |
Computes the box integral \(\int_0^t[\mathbf{x}](\tau)d\tau\).
| t | the temporal key (double, must belong to the TubeVector's domain) |
| const IntervalVector codac::TubeVector::integral | ( | const Interval & | t | ) | const |
Computes the box integral \(\int_0^{[t]}[\mathbf{x}](\tau)d\tau\).
| t | the subtdomain (Interval, must be a subset of the TubeVector's tdomain) |
| 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\).
| t1 | lower bound, subset of the TubeVector's tdomain |
| t2 | upper bound, subset of the TubeVector's tdomain |
| 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\).
| t | interval upper bound, subset of the TubeVector's tdomain |
| 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\).
| t1 | interval lower bound, subset of the TubeVector's tdomain |
| t2 | interval upper bound, subset of the TubeVector's tdomain |
| void codac::TubeVector::serialize | ( | const std::string & | binary_file_name = "x.tube", |
| int | version_number = SERIALIZATION_VERSION |
||
| ) | const |
Serializes this tube.
| binary_file_name | name of the output file (default value: "x.tube") |
| version_number | serialization version (used for tests purposes, default value: last version) |
| 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.
| 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) |
|
static |
Tests whether a TubeVector object shares the slicing of another Tube object.
| x1 | the TubeVector |
| x2 | the Tube |
|
static |
Tests whether the two TubeVector objects are sharing the same slicing.
| x1 | the first TubeVector |
| x2 | the second TubeVector |
|
static |
Computes the hull of several tubes.
| l_tubes | list of tubes |
|
protectedvirtual |
Returns the box \([\mathbf{x}]([t_0,t_f])\).
Implements codac::DynamicalItem.
|
protected |
Restores a n-dimensional tube from serialization, together with a TrajectoryVector object.
| binary_file_name | path to the binary file |
| traj | a pointer to the TrajectoryVector object to be instantiated |