12#ifndef __CODAC2_TUBEEVALUATION_H__
13#define __CODAC2_TUBEEVALUATION_H__
20 TubeEvaluation& operator=(
const T& x)
24 std::list<TSlice>::iterator it_lb = _tube->tdomain()->sample(_t.lb(), _t.is_degenerated());
25 std::list<TSlice>::iterator it_ub;
27 if(!_t.is_degenerated())
29 it_ub = _tube->tdomain()->sample(_t.ub(),
false);
32 if(it_lb->t0_tf().ub() == _t.lb())
41 _tube->operator()(it_lb).set(x);
42 }
while(it_lb != it_ub && (++it_lb) != _tube->tdomain()->tslices().end());
47 explicit operator T()
const
49 return _tube->eval(_t);
52 friend std::ostream& operator<<(std::ostream& os,
const TubeEvaluation<T>& x)
54 os << x._tube->eval(x._t) << std::flush;
61 explicit TubeEvaluation(Tube<T> *tubevector,
double t) :
62 _t(Interval(t)), _tube(tubevector)
67 explicit TubeEvaluation(Tube<T> *tubevector,
const Interval& t) :
68 _t(t), _tube(tubevector)
80class ConstTubeEvaluation
84 explicit operator T()
const
86 return _tube->eval(_t);
89 friend std::ostream& operator<<(std::ostream& os,
const ConstTubeEvaluation<T>& x)
91 os << x._tube->eval(x._t) << std::flush;
98 explicit ConstTubeEvaluation(
const Tube<T> *tubevector,
double t) :
99 _t(Interval(t)), _tube(tubevector)
104 explicit ConstTubeEvaluation(
const Tube<T> *tubevector,
const Interval& t) :
105 _t(t), _tube(tubevector)
111 const Tube<T>* _tube;