codac 2.0.0
Loading...
Searching...
No Matches
codac2::CtcEval Class Reference

Evaluation contractor \(\mathcal{C}_\textrm{eval}\) for scalar or vector tubes. More...

#include <codac2_CtcEval.h>

Public Member Functions

 CtcEval ()
 Creates the evaluation contractor \(\mathcal{C}_\textrm{eval}\).
template<typename T>
requires std::is_same_v<T,Interval> || std::is_same_v<T,IntervalVector>
void contract (Interval &t, T &z, SlicedTube< T > &x, const SlicedTube< T > &v) const
 \(\mathcal{C}_\textrm{eval}\big([t],[z],[x](\cdot),[v](\cdot)\big)\): contracts the observation \([t]\times[z]\) and the tube \([x](\cdot)\) subject to \(z=x(t)\) and \(\dot{x}(\cdot)=v(\cdot)\).
template<typename T>
requires std::is_same_v<T,Interval> || std::is_same_v<T,IntervalVector>
void contract (Interval &t, T &z, SlicedTube< T > &x, const SlicedTube< T > &v, const std::pair< SlicedTube< T >, SlicedTube< T > > &primitives) const
 \(\mathcal{C}_\textrm{eval}\big([t],[z],[x](\cdot),[v](\cdot)\big)\): contracts the observation \([t]\times[z]\) and the tube \([x](\cdot)\) subject to \(z=x(t)\) and \(\dot{x}(\cdot)=v(\cdot)\), using precomputed partial primitives of the derivative tube.

Detailed Description

Evaluation contractor \(\mathcal{C}_\textrm{eval}\) for scalar or vector tubes.

Given a tube \([x](\cdot)\), a derivative tube \([v](\cdot)\) and an observation \([t]\times[z]\), the contractor reduces \([t]\), \([z]\) and \([x](\cdot)\) subject to

\[ z=x(t),\qquad \dot{x}(\cdot)=v(\cdot) \]

The derivative tube is not contracted.

Member Function Documentation

◆ contract() [1/2]

template<typename T>
requires std::is_same_v<T,Interval> || std::is_same_v<T,IntervalVector>
void codac2::CtcEval::contract ( Interval & t,
T & z,
SlicedTube< T > & x,
const SlicedTube< T > & v ) const
inline

\(\mathcal{C}_\textrm{eval}\big([t],[z],[x](\cdot),[v](\cdot)\big)\): contracts the observation \([t]\times[z]\) and the tube \([x](\cdot)\) subject to \(z=x(t)\) and \(\dot{x}(\cdot)=v(\cdot)\).

Template Parameters
Tscalar or vector interval type
Parameters
ttemporal interval \([t]\) of the evaluation
zinterval or box \([z]\) enclosing the evaluation
xscalar or vector tube \([x](\cdot)\)
vderivative tube \([v](\cdot)\)
Note
The tubes must share the same TDomain, which may be refined by adding gates
55 {
56 contract_impl<T>(t,z,x,v,nullptr);
57 }

◆ contract() [2/2]

template<typename T>
requires std::is_same_v<T,Interval> || std::is_same_v<T,IntervalVector>
void codac2::CtcEval::contract ( Interval & t,
T & z,
SlicedTube< T > & x,
const SlicedTube< T > & v,
const std::pair< SlicedTube< T >, SlicedTube< T > > & primitives ) const
inline

\(\mathcal{C}_\textrm{eval}\big([t],[z],[x](\cdot),[v](\cdot)\big)\): contracts the observation \([t]\times[z]\) and the tube \([x](\cdot)\) subject to \(z=x(t)\) and \(\dot{x}(\cdot)=v(\cdot)\), using precomputed partial primitives of the derivative tube.

For \([v](\cdot)=[v^-(\cdot),v^+(\cdot)]\), the provided tubes enclose the partial primitives

\[ p^-(t)=\int_{t_0}^{t}v^-(s)\,ds,\qquad p^+(t)=\int_{t_0}^{t}v^+(s)\,ds \]

Template Parameters
Tscalar or vector interval type
Parameters
ttemporal interval \([t]\) of the evaluation
zinterval or box \([z]\) enclosing the evaluation
xscalar or vector tube \([x](\cdot)\)
vderivative tube \([v](\cdot)\)
primitivespair of tubes returned by v.partial_primitives()
Note
All tubes must share the same TDomain, which may be refined by adding gates
The primitives can be reused after temporal refinement by duplication of slices, provided the derivative envelopes and temporal extent remain unchanged
86 {
87 assert_release(x.tdomain() == v.tdomain());
88 assert_release(primitives.first.tdomain() == v.tdomain());
89 assert_release(primitives.second.tdomain() == v.tdomain());
90 contract_impl(t,z,x,v,&primitives);
91 }

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