Logo Search packages:      
Sourcecode: inkscape version File versions

Geom::Piecewise< T > Class Template Reference

#include <piecewise.h>

List of all members.


Detailed Description

template<typename T>
class Geom::Piecewise< T >

Piecewise function class. The Piecewise class manages a sequence of elements of a type as segments and the ’cuts’ between them. These cuts are time values which separate the pieces. This function representation allows for more interesting functions, as it provides a viable output for operations such as inversion, which may require multiple SBasis to properly invert the original. As for technical details, while the actual SBasis segments begin on the first cut and end on the last, the function is defined throughout all inputs by ex- tending the first and last segments. The exact switching between segments is arbitrarily such that beginnings (t=0) have preference over endings (t=1). This only matters if it is discontinuous at the location.

\[ f(t) \rightarrow \left\{ \begin{array}{cc} s_1,& t <= c_2 \\ s_2,& c_2 <= t <= c_3\\ \ldots s_n,& c_n <= t \end{array}\right. \]

Definition at line 67 of file piecewise.h.


Public Types

typedef T::output_type output_type
typedef T::output_type output_type

Public Member Functions

void clear ()
void clear ()
void concat (const Piecewise< T > &other)
void concat (const Piecewise< T > &other)
void continuousConcat (const Piecewise< T > &other)
void continuousConcat (const Piecewise< T > &other)
Interval domain () const
Interval domain () const
bool empty () const
bool empty () const
output_type firstValue () const
output_type firstValue () const
unsigned input_dim ()
unsigned input_dim ()
bool invariants () const
bool invariants () const
output_type lastValue () const
output_type lastValue () const
double mapToDomain (double t, unsigned i) const
double mapToDomain (double t, unsigned i) const
void offsetDomain (double o)
void offsetDomain (double o)
Piecewise< T > operator() (Piecewise< SBasis >f)
Piecewise< T > operator() (SBasis f)
output_type operator() (double t) const
Piecewise< T > operator() (Piecewise< SBasis >f)
Piecewise< T > operator() (SBasis f)
output_type operator() (double t) const
T & operator[] (unsigned i)
operator[] (unsigned i) const
T & operator[] (unsigned i)
operator[] (unsigned i) const
 Piecewise (const output_type &v)
 Piecewise (const T &s)
 Piecewise (const output_type &v)
 Piecewise (const T &s)
void push (const T &s, double to)
void push (const T &s, double to)
void push_cut (double c)
void push_cut (double c)
void push_seg (const T &s)
void push_seg (const T &s)
void reserve (unsigned i)
void reserve (unsigned i)
void scaleDomain (double s)
void scaleDomain (double s)
unsigned segN (double t, int low=0, int high=-1) const
unsigned segN (double t, int low=0, int high=-1) const
double segT (double t, int i=-1) const
double segT (double t, int i=-1) const
void setDomain (Interval dom)
void setDomain (Interval dom)
unsigned size () const
unsigned size () const
std::vector< output_type > valueAndDerivatives (double t, unsigned n_derivs) const
std::vector< output_type > valueAndDerivatives (double t, unsigned n_derivs) const
output_type valueAt (double t) const
output_type valueAt (double t) const

Public Attributes

std::vector< double > cuts
std::vector< T > segs

Private Member Functions

 BOOST_CLASS_REQUIRE (T, Geom, FragmentConcept)
 BOOST_CLASS_REQUIRE (T, Geom, FragmentConcept)

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

Generated by  Doxygen 1.6.0   Back to index