# Discrete3DFunction Class Reference

This is a TabulatedFunction that computes a discrete three dimensional function f(x,y,z). More...

`#include <TabulatedFunction.h>`

Inheritance diagram for Discrete3DFunction:

List of all members.

## Public Member Functions
| Discrete3DFunction (int xsize, int ysize, int zsize, const std::vector< double > &values)
| Create a Discrete3DFunction f(x,y,z) based on a set of tabulated values.
void | getFunctionParameters (int &xsize, int &ysize, int &zsize, std::vector< double > &values) const
| Get the parameters for the tabulated function.
void | setFunctionParameters (int xsize, int ysize, int zsize, const std::vector< double > &values)
| Set the parameters for the tabulated function.
Discrete3DFunction * | Copy () const
| Create a deep copy of the tabulated function.

## Detailed Description

This is a TabulatedFunction that computes a discrete three dimensional function f(x,y,z).

To evaluate it, x, y, and z are each rounded to the nearest integer and the table element with those indices is returned. If any index is outside the range [0, size), the result is undefined.

## Constructor & Destructor Documentation

Discrete3DFunction | ( | int | xsize,
|  | int | ysize,
|  | int | zsize,
|  | const std::vector< double > & | values |
| ) |  |  |

Create a Discrete3DFunction f(x,y,z) based on a set of tabulated values.

Parameters:

  | xsize | the number of table elements along the x direction
  | ysize | the number of table elements along the y direction
  | zsize | the number of table elements along the z direction
  | values | the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.

## Member Function Documentation

Discrete3DFunction* Copy | ( |  | ) | const`[virtual]`

Create a deep copy of the tabulated function.

Implements TabulatedFunction.

void getFunctionParameters | ( | int & | xsize,
|  | int & | ysize,
|  | int & | zsize,
|  | std::vector< double > & | values |
| ) |  |  | const

Get the parameters for the tabulated function.

Parameters:

  | xsize | the number of table elements along the x direction
  | ysize | the number of table elements along the y direction
  | zsize | the number of table elements along the z direction
  | values | the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.

void setFunctionParameters | ( | int | xsize,
|  | int | ysize,
|  | int | zsize,
|  | const std::vector< double > & | values |
| ) |  |  |

Set the parameters for the tabulated function.

Parameters:

  | xsize | the number of table elements along the x direction
  | ysize | the number of table elements along the y direction
  | zsize | the number of table elements along the z direction
  | values | the tabulated values of the function f(x,y,z), ordered so that values[i+xsize*j+xsize*ysize*k] = f(i,j,k). This must be of length xsize*ysize*zsize.

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

- TabulatedFunction.h