library of assembled shared sources

http://lass.cocamware.com

lass::num::SplineBezierPath< ScalarType, DataType, DataTraits > Class Template Reference

connects the data nodes with cubic bezier splines. More...

#include <spline_bezier_path.h>

Inheritance diagram for lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >:

Inheritance graph
[legend]
Collaboration diagram for lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >:

Collaboration graph
[legend]

Data Structures

class  DataTriplet
struct  Node

Public Types

typedef DataTraits TDataTraits
typedef Spline< ScalarType,
DataType > 
TSplineBase
typedef TSplineBase::TScalar TScalar
typedef TSplineBase::TData TData
typedef TSplineBase::ControlRange TControlRange

Public Member Functions

 SplineBezierPath ()
template<typename PairInputIterator >
 SplineBezierPath (PairInputIterator iFirst, PairInputIterator iLast)
template<typename ScalarInputIterator , typename DataInputIterator >
 SplineBezierPath (ScalarInputIterator iFirstControl, ScalarInputIterator iLastControl, DataInputIterator iFirstData)
const TData operator() (TScalar iX) const
const TData derivative (TScalar iX) const
const TData derivative2 (TScalar iX) const
const TData integral (TScalar iA, TScalar iB) const
const bool isEmpty () const
 return true if the spline contains any nodes at all.
const TControlRange controlRange () const
 return the range of control values for which the spline can interpolate.
virtual const TData operator() (TScalar iX) const =0
virtual const TData derivative (TScalar iX) const =0
virtual const TData derivative2 (TScalar iX) const =0
virtual const TData integral (TScalar iA, TScalar iB) const =0

Private Types

typedef std::vector< NodeTNodes
typedef TNodes::const_iterator TNodeConstIterator
typedef std::pair< TScalar, TDataTSimpleNode
typedef std::vector< TSimpleNodeTSimpleNodes

Private Member Functions

template<typename PairInputIterator >
void init (PairInputIterator first, PairInputIterator last, const DataTriplet &dummy)
template<typename PairInputIterator >
void init (PairInputIterator first, PairInputIterator last, const TData &dummy)
template<typename ScalarInputIterator , typename DataInputIterator >
void init (ScalarInputIterator firstControl, ScalarInputIterator lastControl, DataInputIterator firstData, const DataTriplet &dummy)
template<typename ScalarInputIterator , typename DataInputIterator >
void init (ScalarInputIterator firstControl, ScalarInputIterator lastControl, DataInputIterator firstData, const TData &dummy)
void makeFullNodes (const TSimpleNodes &simpleNodes)
void finalInit ()
const TNodeConstIterator findNode (TScalar iX) const
 binary search to find node that belongs to x

Private Attributes

TNodes nodes_
size_t dataDimension_

Detailed Description

template<typename ScalarType, typename DataType, typename DataTraits>
class lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >

connects the data nodes with cubic bezier splines.

Author:
Bram de Greve [BdG]

Definition at line 50 of file spline_bezier_path.h.


Member Typedef Documentation

template<typename ScalarType , typename DataType , typename DataTraits >
typedef DataTraits lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::TDataTraits

Definition at line 54 of file spline_bezier_path.h.

template<typename ScalarType , typename DataType , typename DataTraits >
typedef Spline<ScalarType, DataType> lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::TSplineBase

Definition at line 55 of file spline_bezier_path.h.

template<typename ScalarType , typename DataType , typename DataTraits >
typedef TSplineBase::TScalar lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::TScalar

Reimplemented from lass::num::Spline< ScalarType, DataType >.

Definition at line 56 of file spline_bezier_path.h.

template<typename ScalarType , typename DataType , typename DataTraits >
typedef TSplineBase::TData lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::TData

Reimplemented from lass::num::Spline< ScalarType, DataType >.

Definition at line 57 of file spline_bezier_path.h.

template<typename ScalarType , typename DataType , typename DataTraits >
typedef TSplineBase::ControlRange lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::TControlRange

Definition at line 58 of file spline_bezier_path.h.

template<typename ScalarType , typename DataType , typename DataTraits >
typedef std::vector<Node> lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::TNodes [private]

Definition at line 104 of file spline_bezier_path.h.

template<typename ScalarType , typename DataType , typename DataTraits >
typedef TNodes::const_iterator lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::TNodeConstIterator [private]

Definition at line 105 of file spline_bezier_path.h.

template<typename ScalarType , typename DataType , typename DataTraits >
typedef std::pair<TScalar, TData> lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::TSimpleNode [private]

Definition at line 107 of file spline_bezier_path.h.

template<typename ScalarType , typename DataType , typename DataTraits >
typedef std::vector<TSimpleNode> lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::TSimpleNodes [private]

Definition at line 108 of file spline_bezier_path.h.


Constructor & Destructor Documentation

template<typename S , typename D , typename T >
lass::num::SplineBezierPath< S, D, T >::SplineBezierPath (  )  [inline]

Definition at line 43 of file spline_bezier_path.inl.

template<typename S , typename D , typename T >
template<typename PairInputIterator >
lass::num::SplineBezierPath< S, D, T >::SplineBezierPath ( PairInputIterator  iFirst,
PairInputIterator  iLast 
) [inline]

template<typename S , typename D , typename T >
template<typename ScalarInputIterator , typename DataInputIterator >
lass::num::SplineBezierPath< S, D, T >::SplineBezierPath ( ScalarInputIterator  iFirstControl,
ScalarInputIterator  iLastControl,
DataInputIterator  iFirstData 
) [inline]


Member Function Documentation

template<typename S , typename D , typename T >
const SplineBezierPath< S, D, T >::TData lass::num::SplineBezierPath< S, D, T >::operator() ( TScalar  iX  )  const [inline]

template<typename S , typename D , typename T >
const SplineBezierPath< S, D, T >::TData lass::num::SplineBezierPath< S, D, T >::derivative ( TScalar  iX  )  const [inline]

template<typename S , typename D , typename T >
const SplineBezierPath< S, D, T >::TData lass::num::SplineBezierPath< S, D, T >::derivative2 ( TScalar  iX  )  const [inline]

template<typename S , typename D , typename T >
const SplineBezierPath< S, D, T >::TData lass::num::SplineBezierPath< S, D, T >::integral ( TScalar  iA,
TScalar  iB 
) const [inline]

template<typename S , typename D , typename T >
const bool lass::num::SplineBezierPath< S, D, T >::isEmpty (  )  const [inline, virtual]

template<typename S , typename D , typename T >
const SplineBezierPath< S, D, T >::TControlRange lass::num::SplineBezierPath< S, D, T >::controlRange (  )  const [inline, virtual]

return the range of control values for which the spline can interpolate.

complexity:
O(1)

Implements lass::num::Spline< ScalarType, DataType >.

Definition at line 287 of file spline_bezier_path.inl.

References lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::nodes_.

template<typename S , typename D , typename T >
template<typename PairInputIterator >
void lass::num::SplineBezierPath< S, D, T >::init ( PairInputIterator  first,
PairInputIterator  last,
const DataTriplet dummy 
) [inline, private]

template<typename S , typename D , typename T >
template<typename PairInputIterator >
void lass::num::SplineBezierPath< S, D, T >::init ( PairInputIterator  first,
PairInputIterator  last,
const TData dummy 
) [inline, private]

template<typename S , typename D , typename T >
template<typename ScalarInputIterator , typename DataInputIterator >
void lass::num::SplineBezierPath< S, D, T >::init ( ScalarInputIterator  firstControl,
ScalarInputIterator  lastControl,
DataInputIterator  firstData,
const DataTriplet dummy 
) [inline, private]

template<typename S , typename D , typename T >
template<typename ScalarInputIterator , typename DataInputIterator >
void lass::num::SplineBezierPath< S, D, T >::init ( ScalarInputIterator  firstControl,
ScalarInputIterator  lastControl,
DataInputIterator  firstData,
const TData dummy 
) [inline, private]

template<typename S , typename D , typename T >
void lass::num::SplineBezierPath< S, D, T >::makeFullNodes ( const TSimpleNodes simpleNodes  )  [inline, private]

template<typename S , typename D , typename T >
void lass::num::SplineBezierPath< S, D, T >::finalInit (  )  [inline, private]

template<typename S , typename D , typename T >
const SplineBezierPath< S, D, T >::TNodeConstIterator lass::num::SplineBezierPath< S, D, T >::findNode ( TScalar  x  )  const [inline, private]

binary search to find node that belongs to x

Returns:
  • the iterator to node such that x is in the interval [node->x, next(node)->x)
  • nodes_.begin() x is smaller than nodes_.front().x
  • prev(nodes_.end(), 2) if x is greater than nodes_.back().x
complexity: O(ln N)

Definition at line 463 of file spline_bezier_path.inl.

References lass::prim::distance(), LASS_ASSERT, lass::stde::next(), lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::nodes_, and lass::stde::prev().

Referenced by lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::derivative(), lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::derivative2(), lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::integral(), and lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::operator()().

template<typename ScalarType , typename DataType >
virtual const TData lass::num::Spline< ScalarType, DataType >::operator() ( TScalar  iX  )  const [pure virtual, inherited]

template<typename ScalarType , typename DataType >
virtual const TData lass::num::Spline< ScalarType, DataType >::derivative ( TScalar  iX  )  const [pure virtual, inherited]

template<typename ScalarType , typename DataType >
virtual const TData lass::num::Spline< ScalarType, DataType >::derivative2 ( TScalar  iX  )  const [pure virtual, inherited]

template<typename ScalarType , typename DataType >
virtual const TData lass::num::Spline< ScalarType, DataType >::integral ( TScalar  iA,
TScalar  iB 
) const [pure virtual, inherited]


Field Documentation

template<typename ScalarType , typename DataType , typename DataTraits >
TNodes lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::nodes_ [private]

template<typename ScalarType , typename DataType , typename DataTraits >
size_t lass::num::SplineBezierPath< ScalarType, DataType, DataTraits >::dataDimension_ [private]


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

Generated on Mon Nov 10 14:22:10 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo