Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Table Class Reference

#include <Table.h>

Inheritance diagram for Table:

Function Stk List of all members.

Detailed Description

STK table lookup class.

This class loads a table of floating-point doubles, which are assumed to be in big-endian format. Linear interpolation is performed for fractional lookup indexes.

An StkError will be thrown if the table file is not found.

by Perry R. Cook and Gary P. Scavone, 1995 - 2004.

Definition at line 22 of file Table.h.

Public Member Functions

 Table (std::string fileName)
 The constructor loads the data from fileName.

 ~Table ()
 Class destructor.

long getLength () const
 Return the number of elements in the table.

StkFloat tick (StkFloat index)
 Return the table value at position index.

StkFloat * tick (StkFloat *vector, unsigned int vectorSize)
 Take vectorSize inputs from vector and replace them with corresponding outputs.

StkFramestick (StkFrames &frames, unsigned int channel=1)
 Take a channel of the StkFrames object as inputs to the function and replace with corresponding outputs.


Constructor & Destructor Documentation

Table::Table std::string  fileName  ) 
 

The constructor loads the data from fileName.

An StkError will be thrown in the file cannot be found or opened.


Member Function Documentation

StkFloat Table::tick StkFloat  index  )  [virtual]
 

Return the table value at position index.

Linear interpolation is performed if index is fractional.

Implements Function.

StkFrames& Table::tick StkFrames frames,
unsigned int  channel = 1
[virtual]
 

Take a channel of the StkFrames object as inputs to the function and replace with corresponding outputs.

The channel argument should be one or greater (the first channel is specified by 1). An StkError will be thrown if the channel argument is zero or it is greater than the number of channels in the StkFrames object.

Reimplemented from Function.


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.