codac
Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
codac::Slice Class Reference

Slice \(\llbracket x\rrbracket(\cdot)\) of a one dimensional tube and made of an envelope and two gates. More...

#include <codac_Slice.h>

Inheritance diagram for codac::Slice:
Inheritance graph
[legend]
Collaboration diagram for codac::Slice:
Collaboration graph
[legend]

Public Member Functions

Definition
 Slice (const Interval &tdomain, const Interval &codomain=Interval::ALL_REALS)
 Creates a slice \(\llbracket x\rrbracket\). More...
 
 Slice (const Slice &x)
 Creates a copy of the slice \(\llbracket x\rrbracket\). More...
 
 ~Slice ()
 Slice destructor.
 
int size () const
 Returns the dimension of the slice (always 1) More...
 
const Sliceoperator= (const Slice &x)
 Returns a copy of a Slice. More...
 
const Interval tdomain () const
 Returns the temporal definition domain of this slice. More...
 
Slices structure
Sliceprev_slice ()
 Points to the previous slice \(\llbracket x\rrbracket(k-1)\). More...
 
const Sliceprev_slice () const
 Points to the previous slice \(\llbracket x\rrbracket(k-1)\). More...
 
Slicenext_slice ()
 Points to the next slice \(\llbracket x\rrbracket(k+1)\). More...
 
const Slicenext_slice () const
 Points to the next slice \(\llbracket x\rrbracket(k+1)\). More...
 
const Interval input_gate () const
 Returns the value of the input gate \(\llbracket x\rrbracket(t_0)\) of this slice. More...
 
const Interval output_gate () const
 Returns the value of the output gate \(\llbracket x\rrbracket(t_f)\) of this slice. More...
 
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\). More...
 
Tests
bool operator== (const Slice &x) const
 Returns true if this slice is equal to \(\llbracket x\rrbracket(\cdot)\). More...
 
bool operator!= (const Slice &x) const
 Returns true if this slice is different from \(\llbracket x\rrbracket(\cdot)\). More...
 
bool is_subset (const Slice &x) const
 Returns true if this slice is a subset of \(\llbracket x\rrbracket(\cdot)\). More...
 
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. More...
 
bool is_interior_subset (const Slice &x) const
 Returns true if this slice is a subset of the interior of \(\llbracket x\rrbracket(\cdot)\). More...
 
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. More...
 
bool is_superset (const Slice &x) const
 Returns true if this slice is a superset of \(\llbracket x\rrbracket(\cdot)\). More...
 
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. More...
 
bool is_empty () const
 Returns true if this slice is empty. More...
 
const BoolInterval contains (const Trajectory &x) const
 Returns true if this slice contains the trajectory \(x(\cdot)\). More...
 
Setting values
void set (const Interval &y)
 Sets a constant interval value for this slice: \(\forall t, \llbracket x\rrbracket(t)=[y]\). More...
 
void set_empty ()
 Sets this slice to the empty set. More...
 
void set_envelope (const Interval &envelope, bool slice_consistency=true)
 Sets the interval value of the envelope of this slice. More...
 
void set_input_gate (const Interval &input_gate, bool slice_consistency=true)
 Sets the interval value of the input gate of this slice. More...
 
void set_output_gate (const Interval &output_gate, bool slice_consistency=true)
 Sets the interval value of the output gate of this slice. More...
 
const Sliceinflate (double rad)
 Inflates this slice by adding \([-rad,+rad]\) to all its codomain components. More...
 
Assignments operators
Sliceoperator+= (double x)
 Operates +=. More...
 
Sliceoperator+= (const Trajectory &x)
 Operates +=. More...
 
Sliceoperator+= (const Slice &x)
 Operates +=. More...
 
Sliceoperator-= (double x)
 Operates -=. More...
 
Sliceoperator-= (const Trajectory &x)
 Operates -=. More...
 
Sliceoperator-= (const Slice &x)
 Operates -=. More...
 
Sliceoperator*= (double x)
 Operates *=. More...
 
Sliceoperator*= (const Trajectory &x)
 Operates *=. More...
 
Sliceoperator*= (const Slice &x)
 Operates *=. More...
 
Sliceoperator/= (double x)
 Operates /=. More...
 
Sliceoperator/= (const Trajectory &x)
 Operates /=. More...
 
Sliceoperator/= (const Slice &x)
 Operates /=. More...
 
Sliceoperator|= (double x)
 Operates |=. More...
 
Sliceoperator|= (const Trajectory &x)
 Operates |=. More...
 
Sliceoperator|= (const Slice &x)
 Operates |=. More...
 
Sliceoperator &= (double x)
 Operates &=. More...
 
Sliceoperator &= (const Trajectory &x)
 Operates &=. More...
 
Sliceoperator &= (const Slice &x)
 Operates &=. More...
 
- 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. More...
 
void shift_tdomain (double a)
 Shifts the tdomain \([t_0,t_f]\) of \(\llbracket x\rrbracket(\cdot)\). More...
 
const IntervalVector codomain_box () const
 Returns the box \(\llbracket x\rrbracket([t_0,t_f])\). More...
 

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. More...
 
static void merge_slices (Slice *first_slice, Slice *&second_slice)
 Merges the two slices to keep only one. More...
 

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
 
Slicem_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
 

Friends

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

Accessing values

const Interval codomain () const
 Returns the envelope of the slice. More...
 
const IntervalVector box () const
 Computes the two-dimensional box \([t_0,t_f]\times\llbracket x\rrbracket([t_0,t_f])\). More...
 
double diam () const
 Returns the diameter of this slice. More...
 
double volume () const
 Returns the volume of this slice. More...
 
const Interval operator() (double t) const
 Returns the evaluation of this slice at \(t\). More...
 
const Interval operator() (const Interval &t) const
 Returns the interval evaluation of this slice over \([t]\). More...
 
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]\). More...
 
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)\). More...
 
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)\). More...
 
const Interval invert (const Interval &y, const Interval &search_tdomain=Interval::ALL_REALS) const
 Returns the interval inversion \(\llbracket x\rrbracket^{-1}([y])\). More...
 
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])\). More...
 
static double diam (const Interval &interval)
 Returns the diameter of an interval (IBEX overload) More...
 

String

std::ostream & operator<< (std::ostream &str, const Slice &x)
 Displays a synthesis of this slice. More...
 
const std::string class_name () const
 Returns the name of this class. More...
 

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

Detailed Description

Slice \(\llbracket x\rrbracket(\cdot)\) of a one dimensional tube and made of an envelope and two gates.

Constructor & Destructor Documentation

◆ Slice() [1/2]

codac::Slice::Slice ( const Interval &  tdomain,
const Interval &  codomain = Interval::ALL_REALS 
)
explicit

Creates a slice \(\llbracket x\rrbracket\).

Parameters
tdomainInterval temporal domain \([t^k_0,t^k_f]\)
codomainInterval value of the slice (all reals \([-\infty,\infty]\) by default)

◆ Slice() [2/2]

codac::Slice::Slice ( const Slice x)

Creates a copy of the slice \(\llbracket x\rrbracket\).

Parameters
xSlice to be duplicated

Member Function Documentation

◆ size()

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

Returns the dimension of the slice (always 1)

Returns
1

Implements codac::DynamicalItem.

◆ operator=()

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

Returns a copy of a Slice.

Parameters
xthe Slice object to be copied
Returns
a new Slice object with same tdomain and codomain

◆ tdomain()

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

Returns the temporal definition domain of this slice.

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

Implements codac::DynamicalItem.

◆ prev_slice() [1/2]

Slice* codac::Slice::prev_slice ( )

Points to the previous slice \(\llbracket x\rrbracket(k-1)\).

Returns
a pointer to a Slice object, or nullptr is this slice is the first one

◆ prev_slice() [2/2]

const Slice* codac::Slice::prev_slice ( ) const

Points to the previous slice \(\llbracket x\rrbracket(k-1)\).

Returns
a const pointer to a Slice object, or nullptr is this slice is the first one

◆ next_slice() [1/2]

Slice* codac::Slice::next_slice ( )

Points to the next slice \(\llbracket x\rrbracket(k+1)\).

Returns
a pointer to a Slice object, or nullptr is this slice is the last one

◆ next_slice() [2/2]

const Slice* codac::Slice::next_slice ( ) const

Points to the next slice \(\llbracket x\rrbracket(k+1)\).

Returns
a const pointer to a Slice object, or nullptr is this slice is the last one

◆ input_gate()

const Interval codac::Slice::input_gate ( ) const

Returns the value of the input gate \(\llbracket x\rrbracket(t_0)\) of this slice.

Returns
the interval input gate

◆ output_gate()

const Interval codac::Slice::output_gate ( ) const

Returns the value of the output gate \(\llbracket x\rrbracket(t_f)\) of this slice.

Returns
the interval output gate

◆ polygon()

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\).

Todo:
Store the polygon in cache memory?
Parameters
vthe derivative slice
Returns
a ConvexPolygon object

◆ codomain()

const Interval codac::Slice::codomain ( ) const

Returns the envelope of the slice.

Returns
the Interval object \(\llbracket x\rrbracket([t_0,t_f])\)

◆ box()

const IntervalVector codac::Slice::box ( ) const

Computes the two-dimensional box \([t_0,t_f]\times\llbracket x\rrbracket([t_0,t_f])\).

Returns
the slice box

◆ diam() [1/2]

static double codac::Slice::diam ( const Interval &  interval)
static

Returns the diameter of an interval (IBEX overload)

Note
returns POS_INFINITY if the interval is unbounded
returns 0 if the interval is empty
Todo:
move this elsewhere
Parameters
intervalset to be evaluated
Returns
the diameter

◆ diam() [2/2]

double codac::Slice::diam ( ) const

Returns the diameter of this slice.

Note
returns POS_INFINITY if the codomain is unbounded
returns 0 if the slice is empty
Returns
the diameter

◆ volume()

double codac::Slice::volume ( ) const

Returns the volume of this slice.

Note
returns POS_INFINITY if the codomain is unbounded
returns 0 if the slice is flat (and so without wrapping effect)
Returns
volume defined as \(w([t_0,t_f])\times w(\llbracket x\rrbracket([t_0,t_f]))\)

◆ operator()() [1/2]

const Interval codac::Slice::operator() ( double  t) const

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

Note
The returned value is either the input gate, the envelope or the output gate
Parameters
tthe temporal key (double, must belong to the Slice's tdomain)
Returns
Interval value of \(\llbracket x\rrbracket(t)\)

◆ operator()() [2/2]

const Interval codac::Slice::operator() ( const Interval &  t) const

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

Parameters
tthe temporal domain (Interval, must be a subset of the Slice's tdomain)
Returns
Interval envelope \(\llbracket x\rrbracket([t])\)

◆ eval()

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]\).

Note
It includes the lower and upper bounds of the gates
Parameters
tthe temporal domain (Interval, must be a subset of the Slice's tdomain)
Returns
the pair \(\big(\llbracket\underline{x^-}\rrbracket([t]),\llbracket\overline{x^+}\rrbracket([t])\big)\)

◆ interpol() [1/2]

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)\).

Todo:
Change the name of this method?
Parameters
tthe temporal key (double, must belong to the Slice's tdomain)
vthe derivative slice such that \(\dot{x}(\cdot)\in\llbracket v\rrbracket(\cdot)\)
Returns
Interval value of \(\llbracket x\rrbracket(t)\)

◆ interpol() [2/2]

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)\).

Todo:
Change the name of this method?
Parameters
tthe temporal domain (Interval, must be a subset of the Slice's tdomain)
vthe derivative slice such that \(\dot{x}(\cdot)\in\llbracket v\rrbracket(\cdot)\)
Returns
Interval value of \(\llbracket x\rrbracket([t])\)

◆ invert() [1/2]

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])\).

Parameters
ythe interval codomain
search_tdomainthe optional interval tdomain on which the inversion will be performed
Returns
the hull of \(\llbracket x\rrbracket^{-1}([y])\)

◆ invert() [2/2]

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])\).

Note
The knowledge of the derivative slice \(\llbracket v\rrbracket(\cdot)\) allows a finer inversion
Parameters
ythe interval codomain
vthe derivative slice such that \(\dot{x}(\cdot)\in\llbracket v\rrbracket(\cdot)\)
search_tdomainthe optional interval tdomain on which the inversion will be performed
Returns
the hull of \(\llbracket x\rrbracket^{-1}([y])\)

◆ operator==()

bool codac::Slice::operator== ( const Slice x) const

Returns true if this slice is equal to \(\llbracket x\rrbracket(\cdot)\).

Note
Equality is obtained if the slices share the same gates, codomain and tdomain
Parameters
xthe Slice object
Returns
true in case of equality

◆ operator!=()

bool codac::Slice::operator!= ( const Slice x) const

Returns true if this slice is different from \(\llbracket x\rrbracket(\cdot)\).

Note
The two slices are different if they do not share the same gates, codomain or tdomain
Parameters
xthe Slice object
Returns
true in case of difference

◆ is_subset()

bool codac::Slice::is_subset ( const Slice x) const

Returns true if this slice is a subset of \(\llbracket x\rrbracket(\cdot)\).

Note
The two slices must have the same tdomain
Parameters
xthe Slice object
Returns
true in case of subset

◆ is_strict_subset()

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.

Note
The two slices must have the same tdomain
Parameters
xthe Slice object
Returns
true in case of strict subset

◆ is_interior_subset()

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)\).

Note
The two slices must have the same tdomain
Parameters
xthe Slice object
Returns
true in case of interior subset

◆ is_strict_interior_subset()

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.

Note
The two slices must have the same tdomain
Parameters
xthe Slice object
Returns
true in case of strict interior subset

◆ is_superset()

bool codac::Slice::is_superset ( const Slice x) const

Returns true if this slice is a superset of \(\llbracket x\rrbracket(\cdot)\).

Note
The two slices must have the same tdomain
Parameters
xthe Slice object
Returns
true in case of superset

◆ is_strict_superset()

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.

Note
The two slices must have the same tdomain
Parameters
xthe Slice object
Returns
true in case of strict superset

◆ is_empty()

bool codac::Slice::is_empty ( ) const

Returns true if this slice is empty.

Note
If the input gate, the envelope or the output gate is empty, then the slice is considered empty
Returns
true in case of emptiness

◆ contains()

const BoolInterval codac::Slice::contains ( const Trajectory x) const

Returns true if this slice contains the trajectory \(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 \(x(\cdot)\) overlaps a boundary of the slice.
The tdomain of this slice must be a subset of the tdomain of \(x(\cdot)\)
Parameters
xthe trajectory that might be crossing this slice
Returns
BoolInterval::YES (or BoolInterval::NO) if this slice contains \(x(\cdot)\) (or does not contain) and BoolInterval::MAYBE in case of ambiguity

◆ set()

void codac::Slice::set ( const Interval &  y)

Sets a constant interval value for this slice: \(\forall t, \llbracket x\rrbracket(t)=[y]\).

Note
The gates and the envelope will be set to \([y]\)
Parameters
yInterval value of the slice

◆ set_empty()

void codac::Slice::set_empty ( )

Sets this slice to the empty set.

Note
The tdomain will not be affected

◆ set_envelope()

void codac::Slice::set_envelope ( const Interval &  envelope,
bool  slice_consistency = true 
)

Sets the interval value of the envelope of this slice.

Note
The gates may be contracted if the new envelope is not their superset and if the boolean parameter is set to true
Parameters
envelopeInterval value of the envelope
slice_consistencyif 'true', the value of the gates may be affected

◆ set_input_gate()

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.

Note
The value to be set will be intersected by the envelopes of the related slices if the boolean parameter is set to true
The envelopes of the related slices will not be affected
Parameters
input_gateInterval value of the input gate
slice_consistencyif 'true', the value of the gate will be computed according to the connected slices

◆ set_output_gate()

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.

Note
The value to be set will be intersected by the envelopes of the related slices if the boolean parameter is set to true
The envelopes of the related slices will not be affected
Parameters
output_gateInterval value of the output gate
slice_consistencyif 'true', the value of the gate will be computed according to the connected slices

◆ inflate()

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

Inflates this slice by adding \([-rad,+rad]\) to all its codomain components.

Note
The envelope and the gates will be inflated
Parameters
radhalf of the inflation
Returns
*this

◆ operator+=() [1/3]

Slice& codac::Slice::operator+= ( double  x)

Operates +=.

Parameters
xdouble
Returns
(*this)+=x

◆ operator+=() [2/3]

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

Operates +=.

Parameters
xTrajectory
Returns
(*this)+=x

◆ operator+=() [3/3]

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

Operates +=.

Parameters
xSlice
Returns
(*this)+=x

◆ operator-=() [1/3]

Slice& codac::Slice::operator-= ( double  x)

Operates -=.

Parameters
xdouble
Returns
(*this)-=x

◆ operator-=() [2/3]

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

Operates -=.

Parameters
xTrajectory
Returns
(*this)-=x

◆ operator-=() [3/3]

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

Operates -=.

Parameters
xSlice
Returns
(*this)-=x

◆ operator*=() [1/3]

Slice& codac::Slice::operator*= ( double  x)

Operates *=.

Parameters
xdouble
Returns
(this)=x

◆ operator*=() [2/3]

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

Operates *=.

Parameters
xTrajectory
Returns
(this)=x

◆ operator*=() [3/3]

Slice& codac::Slice::operator*= ( const Slice x)

Operates *=.

Parameters
xSlice
Returns
(this)=x

◆ operator/=() [1/3]

Slice& codac::Slice::operator/= ( double  x)

Operates /=.

Parameters
xdouble
Returns
(*this)/=x

◆ operator/=() [2/3]

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

Operates /=.

Parameters
xTrajectory
Returns
(*this)/=x

◆ operator/=() [3/3]

Slice& codac::Slice::operator/= ( const Slice x)

Operates /=.

Parameters
xSlice
Returns
(*this)/=x

◆ operator|=() [1/3]

Slice& codac::Slice::operator|= ( double  x)

Operates |=.

Parameters
xdouble
Returns
(*this)|=x

◆ operator|=() [2/3]

Slice& codac::Slice::operator|= ( const Trajectory x)

Operates |=.

Parameters
xTrajectory
Returns
(*this)|=x

◆ operator|=() [3/3]

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

Operates |=.

Parameters
xSlice
Returns
(*this)|=x

◆ operator &=() [1/3]

Slice& codac::Slice::operator&= ( double  x)

Operates &=.

Parameters
xdouble
Returns
(*this)&=x

◆ operator &=() [2/3]

Slice& codac::Slice::operator&= ( const Trajectory x)

Operates &=.

Parameters
xTrajectory
Returns
(*this)&=x

◆ operator &=() [3/3]

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

Operates &=.

Parameters
xSlice
Returns
(*this)&=x

◆ class_name()

const std::string codac::Slice::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.

605 { return "Slice"; };

◆ set_tdomain()

void codac::Slice::set_tdomain ( const Interval &  tdomain)
protected

Specifies the temporal domain \([t_0,t_f]\) of this slice.

Note
Method necessary for Tube::sample()
Parameters
tdomainthe new temporal domain to be set

◆ shift_tdomain()

void codac::Slice::shift_tdomain ( double  a)
protected

Shifts the tdomain \([t_0,t_f]\) of \(\llbracket x\rrbracket(\cdot)\).

Parameters
athe offset value so that \([t^k_0,t^k_f]:=[t^k_0+a,t^k_f+a]\)

◆ chain_slices()

static void codac::Slice::chain_slices ( Slice first_slice,
Slice second_slice 
)
staticprotected

Chains the two slices so that they share pointers and a common gate.

Note
Links to other slices will be lost
Parameters
first_slicea pointer to the first Slice object
second_slicea pointer to the second Slice object
Returns
void

◆ merge_slices()

static void codac::Slice::merge_slices ( Slice first_slice,
Slice *&  second_slice 
)
staticprotected

Merges the two slices to keep only one.

Note
One slice object and gate will be removed during the operation.
Parameters
first_slicea pointer to the first Slice object
second_slicea pointer to the second Slice object
Returns
void

◆ codomain_box()

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

Returns the box \(\llbracket x\rrbracket([t_0,t_f])\).

Note
Used for genericity purposes
Returns
the envelope of codomain values

Implements codac::DynamicalItem.

Friends And Related Function Documentation

◆ operator<<

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

Displays a synthesis of this slice.

Parameters
strostream
xslice to be displayed
Returns
ostream

◆ deserialize_Tube

void deserialize_Tube ( std::ifstream &  bin_file,
Tube *&  tube 
)
friend

Creates a Tube object from a binary file.

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

Parameters
bin_filebinary file (ifstream object)
tubeTube object to be deserialized

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