head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.36; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.50; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.53.58; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.21.54; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# SGInterpTable Class Reference

A class that provids a simple linear 2d interpolation lookup table. More...

`#include <interpolater.hxx>`

List of all members.

## Public Methods
| SGInterpTable ()
| Constructor.
| SGInterpTable (const string &file)
| Constructor.
void | addEntry (double ind, double dep)
| Add an entry to the table, extending the table's length.
double | interpolate (double x) const
| Given an x value, linearly interpolate the y value from the table.
| ~SGInterpTable ()
| Destructor.

## Detailed Description

A class that provids a simple linear 2d interpolation lookup table.

The actual table is expected to be loaded from a file. The independant variable must be strictly ascending. The dependent variable can be anything.

Definition at line 52 of file interpolater.hxx.

## Constructor & Destructor Documentation

SGInterpTable::SGInterpTable | ( |  | ) |

| Constructor. Creates a new, empty table. Definition at line 42 of file interpolater.cxx.

SGInterpTable::SGInterpTable | ( | const string & | file | ) |

  | Constructor. Loads the interpolation table from the specified file. Parameters:
  file | name of interpolation file
Definition at line 50 of file interpolater.cxx. References sg_gzifstream::is_open(), and SG_LOG.

## Member Function Documentation

void SGInterpTable::addEntry | ( | double | ind,
|  | double | dep
| ) |

  | Add an entry to the table, extending the table's length. Parameters:
  ind | The independent variable.
  dep | The dependent variable.
Definition at line 73 of file interpolater.cxx.

double SGInterpTable::interpolate | ( | double | x | ) | const

  | Given an x value, linearly interpolate the y value from the table. Parameters:
  x | independent variable
Returns: interpolated dependent variable Definition at line 81 of file interpolater.cxx. References SG_LOG.

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

- interpolater.hxx
- interpolater.cxx

@ 1.3 log @Oops, try again. @ text @d205 1 a205 1