Public Member Functions | Private Member Functions | Private Attributes
mbl_linear_interpolator Class Reference

#include <mbl_linear_interpolator.h>

List of all members.

Public Member Functions

 mbl_linear_interpolator ()
void clear ()
 Remove all data.
bool set (const vcl_vector< double > &x, const vcl_vector< double > &y)
 Add a (x,y) data.
double y (double x) const
 estimate y and x using linear interpolation. Returns NaN if there is no data

Private Member Functions

void sort ()

Private Attributes

vcl_vector< double > x_
vcl_vector< double > y_

Detailed Description

Definition at line 11 of file mbl_linear_interpolator.h.


Constructor & Destructor Documentation

mbl_linear_interpolator::mbl_linear_interpolator ( )

Definition at line 8 of file mbl_linear_interpolator.cxx.


Member Function Documentation

void mbl_linear_interpolator::clear ( )

Remove all data.

Definition at line 13 of file mbl_linear_interpolator.cxx.

bool mbl_linear_interpolator::set ( const vcl_vector< double > &  x,
const vcl_vector< double > &  y 
)

Add a (x,y) data.

Definition at line 19 of file mbl_linear_interpolator.cxx.

void mbl_linear_interpolator::sort ( ) [private]

Definition at line 35 of file mbl_linear_interpolator.cxx.

double mbl_linear_interpolator::y ( double  x) const

estimate y and x using linear interpolation. Returns NaN if there is no data

Definition at line 51 of file mbl_linear_interpolator.cxx.


Member Data Documentation

vcl_vector<double> mbl_linear_interpolator::x_ [private]

Definition at line 31 of file mbl_linear_interpolator.h.

vcl_vector<double> mbl_linear_interpolator::y_ [private]

Definition at line 34 of file mbl_linear_interpolator.h.


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