libcrn  3.9.5
A document image processing library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
crn::LinearInterpolation Class Reference

Linear interpolation. More...

#include <CRNLinearInterpolation.h>

+ Inheritance diagram for crn::LinearInterpolation:
+ Collaboration diagram for crn::LinearInterpolation:

Public Member Functions

template<typename Iter >
 LinearInterpolation (Iter beg, Iter en)
 Constructor from a list of points. More...
 
 LinearInterpolation (const LinearInterpolation &)=default
 
 LinearInterpolation (LinearInterpolation &&)=default
 
virtual ~LinearInterpolation () override
 
LinearInterpolationoperator= (const LinearInterpolation &)=default
 
LinearInterpolationoperator= (LinearInterpolation &&)=default
 
virtual double operator[] (double x) const override
 Gets ordinate at x. More...
 
const std::vector
< crn::Point2DDouble > & 
GetData () const noexcept
 Access to the sorted control point. More...
 
void Deserialize (xml::Element &el)
 
xml::Element Serialize (xml::Element &parent) const
 
- Public Member Functions inherited from crn::Cartesian2DFunction
virtual ~Cartesian2DFunction () override
 
virtual int operator[] (int x) const
 Gets ordinate at x. More...
 
- Public Member Functions inherited from crn::Object
virtual ~Object ()=default
 

Detailed Description

Linear interpolation.

Creates a linear interpolation model representing a cloud of points.

Version
1.0
Author
Yann LEYDIER
Date
Jan 2012

Definition at line 40 of file CRNLinearInterpolation.h.

Constructor & Destructor Documentation

template<typename Iter >
crn::LinearInterpolation::LinearInterpolation ( Iter  beg,
Iter  en 
)
inline

Constructor from a list of points.

Exceptions
crn::ExceptionDimensionnot enough samples
Parameters
[in]begthe first element
[in]enthe element after the last

Definition at line 48 of file CRNLinearInterpolation.h.

crn::LinearInterpolation::LinearInterpolation ( const LinearInterpolation )
default
crn::LinearInterpolation::LinearInterpolation ( LinearInterpolation &&  )
default
virtual crn::LinearInterpolation::~LinearInterpolation ( )
inlineoverridevirtual

Definition at line 60 of file CRNLinearInterpolation.h.

Member Function Documentation

void LinearInterpolation::Deserialize ( xml::Element el)

Initializes the object from an XML element. Unsafe.

Exceptions
ExceptionInvalidArgumentnot a Point2DDouble
ExceptionNotFoundattribute not found
ExceptionDomainwrong attribute
Parameters
[in]elthe XML element to read

Definition at line 70 of file CRNLinearInterpolation.cpp.

const std::vector<crn::Point2DDouble>& crn::LinearInterpolation::GetData ( ) const
inlinenoexcept

Access to the sorted control point.

Definition at line 70 of file CRNLinearInterpolation.h.

LinearInterpolation& crn::LinearInterpolation::operator= ( const LinearInterpolation )
default
LinearInterpolation& crn::LinearInterpolation::operator= ( LinearInterpolation &&  )
default
double LinearInterpolation::operator[] ( double  x) const
overridevirtual

Gets ordinate at x.

Implements crn::Cartesian2DFunction.

Definition at line 28 of file CRNLinearInterpolation.cpp.

xml::Element LinearInterpolation::Serialize ( xml::Element parent) const

Dumps the object to an XML element. Unsafe.

Parameters
[in]parentthe element in which the new element will be stored
Returns
the newly created element

Definition at line 93 of file CRNLinearInterpolation.cpp.


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