cgv
Loading...
Searching...
No Matches
cgv::math::uniform_piecewise_linear_function< X, Y > Struct Template Reference

Template class representing a piecewise linear function with uniformly spaced breakpoints that maps from X to Y. More...

#include <interpolate.h>

Public Member Functions

evaluate (X x) const
 Return the piecewise linear interpolated value at position x.
 

Public Attributes

interval< X > domain = { X(0), X(1) }
 The input parameter domain.
 
std::vector< Y > breakpoints
 The points that define the piecewise intervals and are assumed to be spaced uniformly over the domain.
 

Detailed Description

template<typename X, typename Y>
struct cgv::math::uniform_piecewise_linear_function< X, Y >

Template class representing a piecewise linear function with uniformly spaced breakpoints that maps from X to Y.

Definition at line 425 of file interpolate.h.

Member Function Documentation

◆ evaluate()

template<typename X , typename Y >
Y cgv::math::uniform_piecewise_linear_function< X, Y >::evaluate ( x) const
inline

Member Data Documentation

◆ breakpoints

template<typename X , typename Y >
std::vector<Y> cgv::math::uniform_piecewise_linear_function< X, Y >::breakpoints

The points that define the piecewise intervals and are assumed to be spaced uniformly over the domain.

Definition at line 429 of file interpolate.h.

Referenced by cgv::math::uniform_piecewise_linear_function< X, Y >::evaluate().

◆ domain

template<typename X , typename Y >
interval<X> cgv::math::uniform_piecewise_linear_function< X, Y >::domain = { X(0), X(1) }

The input parameter domain.

Definition at line 427 of file interpolate.h.

Referenced by cgv::math::uniform_piecewise_linear_function< X, Y >::evaluate().


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