codac 1.5.6
|
Slice \(\llbracket x\rrbracket(\cdot)\) of a one dimensional tube and made of an envelope and two gates. More...
#include <codac_Slice.h>
Public Member Functions | |
Definition | |
Slice (const Interval &tdomain, const Interval &codomain=Interval::ALL_REALS) | |
Creates a slice \(\llbracket x\rrbracket\). | |
Slice (const Slice &x) | |
Creates a copy of the slice \(\llbracket x\rrbracket\). | |
~Slice () | |
Slice destructor. | |
int | size () const |
Returns the dimension of the slice (always 1) | |
const Slice & | operator= (const Slice &x) |
Returns a copy of a Slice. | |
const Interval | tdomain () const |
Returns the temporal definition domain of this slice. | |
Slices structure | |
Slice * | prev_slice () |
Points to the previous slice \(\llbracket x\rrbracket(k-1)\). | |
const Slice * | prev_slice () const |
Points to the previous slice \(\llbracket x\rrbracket(k-1)\). | |
Slice * | next_slice () |
Points to the next slice \(\llbracket x\rrbracket(k+1)\). | |
const Slice * | next_slice () const |
Points to the next slice \(\llbracket x\rrbracket(k+1)\). | |
const Interval | input_gate () const |
Returns the value of the input gate \(\llbracket x\rrbracket(t_0)\) of this slice. | |
const Interval | output_gate () const |
Returns the value of the output gate \(\llbracket x\rrbracket(t_f)\) of this slice. | |
const ConvexPolygon | polygon (const Slice &v) const |
Computes a convex polygon that optimally encloses the values of the slice according to the knowledge of the derivative slice \(\llbracket v\rrbracket\). | |
Tests | |
bool | operator== (const Slice &x) const |
Returns true if this slice is equal to \(\llbracket x\rrbracket(\cdot)\). | |
bool | operator!= (const Slice &x) const |
Returns true if this slice is different from \(\llbracket x\rrbracket(\cdot)\). | |
bool | is_subset (const Slice &x) const |
Returns true if this slice is a subset of \(\llbracket x\rrbracket(\cdot)\). | |
bool | is_strict_subset (const Slice &x) const |
Returns true if this slice is a subset of \(\llbracket x\rrbracket(\cdot)\), and not \(\llbracket x\rrbracket(\cdot)\) itself. | |
bool | is_interior_subset (const Slice &x) const |
Returns true if this slice is a subset of the interior of \(\llbracket x\rrbracket(\cdot)\). | |
bool | is_strict_interior_subset (const Slice &x) const |
Returns true if this slice is a subset of the interior of \(\llbracket x\rrbracket(\cdot)\), and not \(\llbracket x\rrbracket(\cdot)\) itself. | |
bool | is_superset (const Slice &x) const |
Returns true if this slice is a superset of \(\llbracket x\rrbracket(\cdot)\). | |
bool | is_strict_superset (const Slice &x) const |
Returns true if this slice is a superset of \(\llbracket x\rrbracket(\cdot)\), and not \(\llbracket x\rrbracket(\cdot)\) itself. | |
bool | is_empty () const |
Returns true if this slice is empty. | |
const BoolInterval | contains (const Trajectory &x) const |
Returns true if this slice contains the trajectory \(x(\cdot)\). | |
Setting values | |
void | set (const Interval &y) |
Sets a constant interval value for this slice: \(\forall t, \llbracket x\rrbracket(t)=[y]\). | |
void | set_empty () |
Sets this slice to the empty set. | |
void | set_envelope (const Interval &envelope, bool slice_consistency=true) |
Sets the interval value of the envelope of this slice. | |
void | set_input_gate (const Interval &input_gate, bool slice_consistency=true) |
Sets the interval value of the input gate of this slice. | |
void | set_output_gate (const Interval &output_gate, bool slice_consistency=true) |
Sets the interval value of the output gate of this slice. | |
const Slice & | inflate (double rad) |
Inflates this slice by adding \([-rad,+rad]\) to all its codomain components. | |
Assignments operators | |
Slice & | operator+= (double x) |
Operates +=. | |
Slice & | operator+= (const Trajectory &x) |
Operates +=. | |
Slice & | operator+= (const Slice &x) |
Operates +=. | |
Slice & | operator-= (double x) |
Operates -=. | |
Slice & | operator-= (const Trajectory &x) |
Operates -=. | |
Slice & | operator-= (const Slice &x) |
Operates -=. | |
Slice & | operator*= (double x) |
Operates *=. | |
Slice & | operator*= (const Trajectory &x) |
Operates *=. | |
Slice & | operator*= (const Slice &x) |
Operates *=. | |
Slice & | operator/= (double x) |
Operates /=. | |
Slice & | operator/= (const Trajectory &x) |
Operates /=. | |
Slice & | operator/= (const Slice &x) |
Operates /=. | |
Slice & | operator|= (double x) |
Operates |=. | |
Slice & | operator|= (const Trajectory &x) |
Operates |=. | |
Slice & | operator|= (const Slice &x) |
Operates |=. | |
Slice & | operator&= (double x) |
Operates &=. | |
Slice & | operator&= (const Trajectory &x) |
Operates &=. | |
Slice & | operator&= (const Slice &x) |
Operates &=. | |
Public Member Functions inherited from codac::DynamicalItem | |
virtual | ~DynamicalItem () |
DynamicalItem destructor. | |
Protected Member Functions | |
void | set_tdomain (const Interval &tdomain) |
Specifies the temporal domain \([t_0,t_f]\) of this slice. | |
void | shift_tdomain (double a) |
Shifts the tdomain \([t_0,t_f]\) of \(\llbracket x\rrbracket(\cdot)\). | |
const IntervalVector | codomain_box () const |
Returns the box \(\llbracket x\rrbracket([t_0,t_f])\). | |
Static Protected Member Functions | |
static void | chain_slices (Slice *first_slice, Slice *second_slice) |
Chains the two slices so that they share pointers and a common gate. | |
static void | merge_slices (Slice *first_slice, Slice *&second_slice) |
Merges the two slices to keep only one. | |
Protected Attributes | |
Interval | m_tdomain |
temporal domain \([t_0,t_f]\) of the slice | |
Interval | m_codomain = Interval::ALL_REALS |
envelope of the slice | |
Interval * | m_output_gate = nullptr |
input and output gates | |
Slice * | m_next_slice = nullptr |
pointers to previous and next slices of the related tube | |
TubeTreeSynthesis * | m_synthesis_reference = nullptr |
pointer to a leaf of the optional synthesis tree of the related tube | |
String | |
const std::string | class_name () const |
Returns the name of this class. | |
Accessing values | |
const Interval | codomain () const |
Returns the envelope of the slice. | |
const IntervalVector | box () const |
Computes the two-dimensional box \([t_0,t_f]\times\llbracket x\rrbracket([t_0,t_f])\). | |
double | diam () const |
Returns the diameter of this slice. | |
double | volume () const |
Returns the volume of this slice. | |
const Interval | operator() (double t) const |
Returns the evaluation of this slice at \(t\). | |
const Interval | operator() (const Interval &t) const |
Returns the interval evaluation of this slice over \([t]\). | |
const std::pair< Interval, Interval > | eval (const Interval &t=Interval::ALL_REALS) const |
Returns the interval evaluations of the bounds of the slice over \([t]\). | |
const Interval | interpol (double t, const Slice &v) const |
Returns the optimal evaluation of this slice at \(t\), based on the derivative information \(\dot{x}(\cdot)\). | |
const Interval | interpol (const Interval &t, const Slice &v) const |
Returns the optimal evaluation of this slice over \([t]\), based on the derivative information \(\dot{x}(\cdot)\). | |
const Interval | invert (const Interval &y, const Interval &search_tdomain=Interval::ALL_REALS) const |
Returns the interval inversion \(\llbracket x\rrbracket^{-1}([y])\). | |
const Interval | invert (const Interval &y, const Slice &v, const Interval &search_tdomain=Interval::ALL_REALS) const |
Returns the optimal interval inversion \(\llbracket x\rrbracket^{-1}([y])\). | |
static double | diam (const Interval &interval) |
Returns the diameter of an interval (IBEX overload) | |
Additional Inherited Members | |
Static Public Member Functions inherited from codac::DynamicalItem | |
static bool | valid_tdomain (const Interval &tdomain) |
Verifies that this interval is a feasible tdomain. | |
Slice \(\llbracket x\rrbracket(\cdot)\) of a one dimensional tube and made of an envelope and two gates.
|
explicit |
Creates a slice \(\llbracket x\rrbracket\).
tdomain | Interval temporal domain \([t^k_0,t^k_f]\) |
codomain | Interval value of the slice (all reals \([-\infty,\infty]\) by default) |
codac::Slice::Slice | ( | const Slice & | x | ) |
Creates a copy of the slice \(\llbracket x\rrbracket\).
x | Slice to be duplicated |
|
virtual |
|
virtual |
Returns the temporal definition domain of this slice.
Implements codac::DynamicalItem.
Slice * codac::Slice::prev_slice | ( | ) |
Points to the previous slice \(\llbracket x\rrbracket(k-1)\).
const Slice * codac::Slice::prev_slice | ( | ) | const |
Points to the previous slice \(\llbracket x\rrbracket(k-1)\).
Slice * codac::Slice::next_slice | ( | ) |
Points to the next slice \(\llbracket x\rrbracket(k+1)\).
const Slice * codac::Slice::next_slice | ( | ) | const |
Points to the next slice \(\llbracket x\rrbracket(k+1)\).
const Interval codac::Slice::input_gate | ( | ) | const |
Returns the value of the input gate \(\llbracket x\rrbracket(t_0)\) of this slice.
const Interval codac::Slice::output_gate | ( | ) | const |
Returns the value of the output gate \(\llbracket x\rrbracket(t_f)\) of this slice.
const ConvexPolygon codac::Slice::polygon | ( | const Slice & | v | ) | const |
Computes a convex polygon that optimally encloses the values of the slice according to the knowledge of the derivative slice \(\llbracket v\rrbracket\).
v | the derivative slice |
const Interval codac::Slice::codomain | ( | ) | const |
Returns the envelope of the slice.
const IntervalVector codac::Slice::box | ( | ) | const |
Computes the two-dimensional box \([t_0,t_f]\times\llbracket x\rrbracket([t_0,t_f])\).
|
static |
Returns the diameter of an interval (IBEX overload)
interval | set to be evaluated |
double codac::Slice::diam | ( | ) | const |
Returns the diameter of this slice.
double codac::Slice::volume | ( | ) | const |
Returns the volume of this slice.
const Interval codac::Slice::operator() | ( | double | t | ) | const |
Returns the evaluation of this slice at \(t\).
t | the temporal key (double, must belong to the Slice's tdomain) |
const Interval codac::Slice::operator() | ( | const Interval & | t | ) | const |
Returns the interval evaluation of this slice over \([t]\).
t | the temporal domain (Interval, must be a subset of the Slice's tdomain) |
const std::pair< Interval, Interval > codac::Slice::eval | ( | const Interval & | t = Interval::ALL_REALS | ) | const |
Returns the interval evaluations of the bounds of the slice over \([t]\).
t | the temporal domain (Interval, must be a subset of the Slice's tdomain) |
const Interval codac::Slice::interpol | ( | double | t, |
const Slice & | v ) const |
Returns the optimal evaluation of this slice at \(t\), based on the derivative information \(\dot{x}(\cdot)\).
t | the temporal key (double, must belong to the Slice's tdomain) |
v | the derivative slice such that \(\dot{x}(\cdot)\in\llbracket v\rrbracket(\cdot)\) |
const Interval codac::Slice::interpol | ( | const Interval & | t, |
const Slice & | v ) const |
Returns the optimal evaluation of this slice over \([t]\), based on the derivative information \(\dot{x}(\cdot)\).
t | the temporal domain (Interval, must be a subset of the Slice's tdomain) |
v | the derivative slice such that \(\dot{x}(\cdot)\in\llbracket v\rrbracket(\cdot)\) |
const Interval codac::Slice::invert | ( | const Interval & | y, |
const Interval & | search_tdomain = Interval::ALL_REALS ) const |
Returns the interval inversion \(\llbracket x\rrbracket^{-1}([y])\).
y | the interval codomain |
search_tdomain | the optional interval tdomain on which the inversion will be performed |
const Interval codac::Slice::invert | ( | const Interval & | y, |
const Slice & | v, | ||
const Interval & | search_tdomain = Interval::ALL_REALS ) const |
Returns the optimal interval inversion \(\llbracket x\rrbracket^{-1}([y])\).
y | the interval codomain |
v | the derivative slice such that \(\dot{x}(\cdot)\in\llbracket v\rrbracket(\cdot)\) |
search_tdomain | the optional interval tdomain on which the inversion will be performed |
bool codac::Slice::operator== | ( | const Slice & | x | ) | const |
Returns true if this slice is equal to \(\llbracket x\rrbracket(\cdot)\).
x | the Slice object |
bool codac::Slice::operator!= | ( | const Slice & | x | ) | const |
Returns true if this slice is different from \(\llbracket x\rrbracket(\cdot)\).
x | the Slice object |
bool codac::Slice::is_subset | ( | const Slice & | x | ) | const |
Returns true if this slice is a subset of \(\llbracket x\rrbracket(\cdot)\).
x | the Slice object |
bool codac::Slice::is_strict_subset | ( | const Slice & | x | ) | const |
Returns true if this slice is a subset of \(\llbracket x\rrbracket(\cdot)\), and not \(\llbracket x\rrbracket(\cdot)\) itself.
x | the Slice object |
bool codac::Slice::is_interior_subset | ( | const Slice & | x | ) | const |
Returns true if this slice is a subset of the interior of \(\llbracket x\rrbracket(\cdot)\).
x | the Slice object |
bool codac::Slice::is_strict_interior_subset | ( | const Slice & | x | ) | const |
Returns true if this slice is a subset of the interior of \(\llbracket x\rrbracket(\cdot)\), and not \(\llbracket x\rrbracket(\cdot)\) itself.
x | the Slice object |
bool codac::Slice::is_superset | ( | const Slice & | x | ) | const |
Returns true if this slice is a superset of \(\llbracket x\rrbracket(\cdot)\).
x | the Slice object |
bool codac::Slice::is_strict_superset | ( | const Slice & | x | ) | const |
Returns true if this slice is a superset of \(\llbracket x\rrbracket(\cdot)\), and not \(\llbracket x\rrbracket(\cdot)\) itself.
x | the Slice object |
bool codac::Slice::is_empty | ( | ) | const |
Returns true if this slice is empty.
const BoolInterval codac::Slice::contains | ( | const Trajectory & | x | ) | const |
Returns true if this slice contains the trajectory \(x(\cdot)\).
x | the trajectory that might be crossing this slice |
void codac::Slice::set | ( | const Interval & | y | ) |
Sets a constant interval value for this slice: \(\forall t, \llbracket x\rrbracket(t)=[y]\).
y | Interval value of the slice |
void codac::Slice::set_empty | ( | ) |
Sets this slice to the empty set.
void codac::Slice::set_envelope | ( | const Interval & | envelope, |
bool | slice_consistency = true ) |
Sets the interval value of the envelope of this slice.
envelope | Interval value of the envelope |
slice_consistency | if 'true', the value of the gates may be affected |
void codac::Slice::set_input_gate | ( | const Interval & | input_gate, |
bool | slice_consistency = true ) |
Sets the interval value of the input gate of this slice.
input_gate | Interval value of the input gate |
slice_consistency | if 'true', the value of the gate will be computed according to the connected slices |
void codac::Slice::set_output_gate | ( | const Interval & | output_gate, |
bool | slice_consistency = true ) |
Sets the interval value of the output gate of this slice.
output_gate | Interval value of the output gate |
slice_consistency | if 'true', the value of the gate will be computed according to the connected slices |
const Slice & codac::Slice::inflate | ( | double | rad | ) |
Inflates this slice by adding \([-rad,+rad]\) to all its codomain components.
rad | half of the inflation |
Slice & codac::Slice::operator+= | ( | double | x | ) |
Operates +=.
x | double |
Slice & codac::Slice::operator+= | ( | const Trajectory & | x | ) |
Slice & codac::Slice::operator-= | ( | double | x | ) |
Operates -=.
x | double |
Slice & codac::Slice::operator-= | ( | const Trajectory & | x | ) |
Slice & codac::Slice::operator*= | ( | double | x | ) |
Operates *=.
x | double |
Slice & codac::Slice::operator*= | ( | const Trajectory & | x | ) |
Slice & codac::Slice::operator/= | ( | double | x | ) |
Operates /=.
x | double |
Slice & codac::Slice::operator/= | ( | const Trajectory & | x | ) |
Slice & codac::Slice::operator|= | ( | double | x | ) |
Operates |=.
x | double |
Slice & codac::Slice::operator|= | ( | const Trajectory & | x | ) |
Slice & codac::Slice::operator&= | ( | double | x | ) |
Operates &=.
x | double |
Slice & codac::Slice::operator&= | ( | const Trajectory & | x | ) |
|
inlinevirtual |
Returns the name of this class.
Implements codac::DynamicalItem.
|
protected |
Specifies the temporal domain \([t_0,t_f]\) of this slice.
tdomain | the new temporal domain to be set |
|
protected |
Shifts the tdomain \([t_0,t_f]\) of \(\llbracket x\rrbracket(\cdot)\).
a | the offset value so that \([t^k_0,t^k_f]:=[t^k_0+a,t^k_f+a]\) |
|
protectedvirtual |
Returns the box \(\llbracket x\rrbracket([t_0,t_f])\).
Implements codac::DynamicalItem.