public abstract class FastFunc extends Object
Constructor and Description |
---|
FastFunc(double min,
double max,
int nSamples)
Main Constructor in which the values of this function are computed
|
Modifier and Type | Method and Description |
---|---|
double |
evaluate(double x) |
double |
lookup(double x)
Returns the value of the precomputed function using a simple
nearest neighbor interpolation.
|
void |
lookup(double[][] A,
double[][] x)
Returns the value of the precomputed function using a simple
nearest neighbor interpolation.
|
public FastFunc(double min, double max, int nSamples)
min
- minimum value to samplemax
- maximum value to samplesamples
- number of samplespublic double lookup(double x)
x
- function argument (you must ensure this is in range)public void lookup(double[][] A, double[][] x)
A
- function valuesx
- argumentspublic double evaluate(double x)
Copyright © 2013 Metron, Inc.. All rights reserved.