IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator > Class Template Reference

#include <InverseDistanceWeightedInterpolation.h>

List of all members.

Public Types

typedef std::iterator_traits
< PointIterator >::value_type 
Point
typedef VectorTraits< Point >
::BaseType 
PointBaseType
typedef KDTree< PointIterator > Tree
typedef std::vector< typename
Tree::Neighbour
NeighbourVector
typedef std::iterator_traits
< ValueIterator >::value_type 
Value

Public Member Functions

 InverseDistanceWeightedInterpolation (PointIterator firstPoint, PointIterator lastPoint, ValueIterator firstValue, ValueIterator lastValue, unsigned int numNeighbours, int maxLeafSize=4)
virtual ~InverseDistanceWeightedInterpolation ()
Value operator() (const Point &p) const
 Evaluate the interpolated value for the specified point.
Value operator() (const Point &p, NeighbourVector &neighbours) const


Detailed Description

template<typename PointIterator, typename ValueIterator>
class IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >

The InverseDistanceWeightedInterpolation class provides interpolation of scattered data. It is templated so that it can operate on a wide variety of point/value types. NB. The Value must be default constructible, and define sensible value=value+value, and value=value*scalar operators

Member Typedef Documentation

template<typename PointIterator , typename ValueIterator >
typedef std::vector<typename Tree::Neighbour> IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::NeighbourVector

template<typename PointIterator , typename ValueIterator >
typedef std::iterator_traits<PointIterator>::value_type IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::Point

template<typename PointIterator , typename ValueIterator >
typedef VectorTraits<Point>::BaseType IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::PointBaseType

template<typename PointIterator , typename ValueIterator >
typedef KDTree<PointIterator> IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::Tree

template<typename PointIterator , typename ValueIterator >
typedef std::iterator_traits<ValueIterator>::value_type IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::Value


Constructor & Destructor Documentation

template<typename PointIterator , typename ValueIterator >
IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::InverseDistanceWeightedInterpolation ( PointIterator  firstPoint,
PointIterator  lastPoint,
ValueIterator  firstValue,
ValueIterator  lastValue,
unsigned int  numNeighbours,
int  maxLeafSize = 4 
)

Creates the interpolator. Note that it does not own the passed points or values - it is up to you to ensure that they remain valid and unchanged as long as the interpolator is in use.

Parameters:
firstPoint RandomAccessIterator to first point
lastPoint RandomAccessIterator to last point
firstValue RandomAccessIterator to first value
lastValue RandomAccessIterator to last value
numNeighbours The amount of nearest-neighbour points to consider when performing interpolation. More usually yields slower, but better results.
maxLeafSize The number of points to store in each KDTree bucket

template<typename PointIterator , typename ValueIterator >
virtual IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::~InverseDistanceWeightedInterpolation (  )  [virtual]


Member Function Documentation

template<typename PointIterator , typename ValueIterator >
Value IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::operator() ( const Point p,
NeighbourVector neighbours 
) const

As above, but returning information about which neighbours contributed to the result. Note that for repeated queries it is quicker to call this method reusing the same NeighbourVector than it is to call the version above, which has to allocate a NeighbourVector each time.

template<typename PointIterator , typename ValueIterator >
Value IECore::InverseDistanceWeightedInterpolation< PointIterator, ValueIterator >::operator() ( const Point p  )  const

Evaluate the interpolated value for the specified point.


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

Generated on Mon Jan 24 11:13:25 2011 for Cortex by doxygen 1.5.8