STE-Industries: utilities testing
GraphicSpace::Interpolator Class Reference

#include "Interpolator.h"

Collaboration diagram for GraphicSpace::Interpolator:
Collaboration graph

Classes

class  Coefficient
 

Public Member Functions

 Interpolator (register unsigned int thisSize) noexcept(false)
 
uint_least32_t operator() (unsigned int Row, unsigned int Column, uint_least32_t UpperLeft, uint_least32_t UpperRight, uint_least32_t LowerLeft, uint_least32_t LowerRight) const noexcept
 

Private Attributes

Coefficient InterpolationTable [MAXIMUM_INTERPOLATION_SIZE][MAXIMUM_INTERPOLATION_SIZE]
 
unsigned int Size
 
unsigned int SquaredSize
 

Static Private Attributes

static constexpr unsigned int MAXIMUM_INTERPOLATION_SIZE = 5
 

Detailed Description

The Interpolator class represents a bidimensional linear interpolator.
In can linearly interpolate values inside a square, given the values at the corners.

Definition at line 29 of file Interpolator.h.

Constructor & Destructor Documentation

◆ Interpolator()

GraphicSpace::Interpolator::Interpolator ( register unsigned int  thisSize)
noexcept
Description:
Constructor.
Parameters
thisSizeNumber of elements in a side of the square.
Exceptions
None.
Returns
Not applicable

Definition at line 32 of file Interpolator.cpp.

Member Function Documentation

◆ operator()()

uint_least32_t GraphicSpace::Interpolator::operator() ( unsigned int  Row,
unsigned int  Column,
uint_least32_t  UpperLeft,
uint_least32_t  UpperRight,
uint_least32_t  LowerLeft,
uint_least32_t  LowerRight 
) const
inlinenoexcept
Description:
Linearly interpolate a function inside a square.
Parameters
RowRow index.
ColumnColumn index.
UpperLeftValue of the function in the upper left corner.
UpperRightValue of the function in the upper right corner.
LowerLeftValue of the function in the lower left corner.
LowerRightValue of the function in the lower right corner.
Exceptions
None.
Returns
uint_least_32_t The interpolated value.
Note
If Row or column are not less than size, the behavior is undefined.
If UpperLeft, UpperRight, LowerLeft or LowerRight are not less than UINT_LEAST32_MAX / (Size * Size), the returned value is undefined.

Definition at line 41 of file Interpolator.inl.

Member Data Documentation

◆ InterpolationTable

GraphicSpace::Interpolator::InterpolationTable
private

Array of the coeffients, one for each point in the square.

See also
MAXIMUM_INTERPOLATION_SIZE

Definition at line 78 of file Interpolator.h.

◆ MAXIMUM_INTERPOLATION_SIZE

GraphicSpace::Interpolator::MAXIMUM_INTERPOLATION_SIZE = 5
staticconstexprprivate

Maximum side of the quare in which the interpolation is performed.

Definition at line 35 of file Interpolator.h.

◆ Size

GraphicSpace::Interpolator::Size
private

Number of elements in a side of the square.

Definition at line 67 of file Interpolator.h.

◆ SquaredSize

GraphicSpace::Interpolator::SquaredSize
private

Square of the number of elements in a side of the square.

Definition at line 71 of file Interpolator.h.


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