12#ifndef __CODAC_TRAJECTORY_H__
13#define __CODAC_TRAJECTORY_H__
18#include "codac_TFunction.h"
24 class TrajectoryVector;
26 enum class TrajDefnType { ANALYTIC_FNC, MAP_OF_VALUES };
81 explicit Trajectory(
const std::list<double>& list_t,
const std::list<double>& list_x);
224 void set(
double y,
double t);
425 const std::string
class_name()
const {
return "Trajectory"; };
Abstract class for common properties of Tube, TubeVector, Slice, Trajectory, TrajectoryVector objects...
Definition codac_DynamicalItem.h:26
One dimensional trajectory , defined as a temporal map of values.
Definition codac_Trajectory.h:35
const std::string class_name() const
Returns the name of this class.
Definition codac_Trajectory.h:425
const Trajectory diff() const
Differentiates this trajectory.
const TFunction * tfunction() const
Returns the temporal function, if the object is an analytic trajectory.
bool operator!=(const Trajectory &x) const
Returns true if this trajectory is different from .
Trajectory & sample(double timestep)
Samples the trajectory by adding new points to the map of values.
std::map< double, double > m_map_values
optional map of values <t,y>:
Definition codac_Trajectory.h:465
Trajectory(const Interval &tdomain, const TFunction &f, double timestep)
Creates a scalar trajectory from an analytic expression, and transforms it as a map of values (sampl...
const Trajectory primitive(double c, double timestep) const
Computes an approximative primitive of with some time discretization .
friend std::ostream & operator<<(std::ostream &str, const Trajectory &x)
Displays a synthesis of this trajectory.
double operator()(double t) const
Returns the evaluation of this trajectory at .
const Trajectory & operator*=(double x)
Operates *=.
Trajectory()
Creates an empty scalar trajectory .
TrajDefnType definition_type() const
Returns the definition type of this trajectory.
Interval m_tdomain
temporal domain of the trajectory
Definition codac_Trajectory.h:456
const Trajectory & operator/=(const Trajectory &x)
Operates /=.
const Interval codomain() const
Returns the interval of feasible values.
Interval m_codomain
envelope of the values of the trajectory
Definition codac_Trajectory.h:457
double first_value() const
Returns the value .
TFunction * m_function
optional pointer to the analytic expression of this trajectory
Definition codac_Trajectory.h:464
double finite_diff(double t, double h) const
Computes the finite difference at , with an automatic order of accuracy.
bool not_defined() const
Tests whether this trajectory is defined or not.
const Trajectory & operator-=(const Trajectory &x)
Operates -=.
Trajectory & shift_tdomain(double a)
Shifts the tdomain of .
const Trajectory & operator/=(double x)
Operates /=.
Trajectory(const Trajectory &traj)
Creates a copy of a scalar trajectory .
~Trajectory()
Trajectory destructor.
Trajectory(const Interval &tdomain, const TFunction &f)
Creates a scalar trajectory from an analytic expression.
friend void deserialize_TrajectoryVector(std::ifstream &bin_file, TrajectoryVector *&traj)
Creates a TrajectoryVector object from a binary file.
Trajectory & make_continuous()
Makes a trajectory continuous by avoiding infinite slopes.
const Trajectory & operator+=(double x)
Operates +=.
const Trajectory & operator=(const Trajectory &x)
Returns a copy of a Trajectory.
const Interval tdomain() const
Returns the temporal definition domain of this trajectory.
TrajDefnType m_traj_def_type
definition type
Definition codac_Trajectory.h:460
Trajectory & sample(const Trajectory &x)
Samples this trajectory so that it will share the same sampling of .
const Trajectory primitive(double c=0.) const
Computes an approximative primitive of .
int size() const
Returns the dimension of the scalar trajectory (always 1)
double last_value() const
Returns the value .
const Interval operator()(const Interval &t) const
Returns the interval evaluation of this trajectory over .
const IntervalVector codomain_box() const
Returns the box .
const Trajectory & operator-=(double x)
Operates -=.
Trajectory(const std::list< double > &list_t, const std::list< double > &list_x)
Creates a scalar trajectory from a list of values.
const std::map< double, double > & sampled_map() const
Returns the map of values, if the object is defined as a map.
bool operator==(const Trajectory &x) const
Returns true if this trajectory is equal to .
void compute_codomain()
Computes the envelope of trajectory values.
void set(double y, double t)
Sets a value at : .
Trajectory & truncate_tdomain(const Interval &tdomain)
Truncates the tdomain of .
const Trajectory & operator*=(const Trajectory &x)
Operates *=.
const Trajectory & operator+=(const Trajectory &x)
Operates +=.
bool constant_timestep(double &h) const
Returns true if the same amount of time separates each value.
friend void deserialize_Trajectory(std::ifstream &bin_file, Trajectory *&traj)
Creates a Trajectory object from a binary file.
Trajectory(const std::map< double, double > &m_map_values)
Creates a scalar trajectory from a map of values.
n-dimensional trajectory , defined as a temporal map of vector values
Definition codac_TrajectoryVector.h:38
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition codac_capd_helpers.h:9