spis.Util.Func
Class ReciprocalFunction
java.lang.Object
spis.Util.Func.ReciprocalFunction
- All Implemented Interfaces:
- ScalFunctionOfScal
- public class ReciprocalFunction
- extends java.lang.Object
- implements ScalFunctionOfScal
Class Name : ReciprocalFunction
Project ref : SPIS project
File name : ReciprocalFunction.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France
http://www.onecert.fr
Status : under development
Creation : 3 nov. 2004
Modification :
Description : Defines the reciprocal function of a given function:
Given y = f(x) in the constructor, this function is x = f-1(y).
Valid only for a monotonic function (increasing or decreasing)
The implementation is through tabulation (parameters requested by the constructors).
Versions and anomalies correction :
Version number | Author (name, e-mail) | Corrections/Modifications |
0.1 | JF Roussel, roussel@onecert.fr | Creation |
- Version:
- 0.1
- Author:
- JF Roussel
Method Summary |
float |
compute(float y)
applies this function to x and returns the result |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReciprocalFunction
public ReciprocalFunction(ScalFunctionOfScal f,
float xmin,
float xmax,
int stepNb)
- Constructor with a linear spacing of tabulated x points
- Parameters:
f
- function to be invertedxmin
- Minimum x to be consderedxmax
- Maximum x to be consderedstepNb
- Number of steps to cut the [xmin, xmax] interval into
ReciprocalFunction
public ReciprocalFunction(ScalFunctionOfScal f,
float xmin,
float xmax,
float firstStep,
float stepRatio)
- Constructor with a geometric spacing of tabulated x points.
Points will be: xmin, xmin + firstStep, xmin + firstStep + firstStep*stepRatio...
- Parameters:
f
- function to be invertedxmin
- Minimum x to be consderedxmax
- Maximum x to be consderedfirstStep
- Size of the first x step (xmin -> xmin + firstStep)stepRatio
- Ratio for next step
compute
public float compute(float y)
- Description copied from interface:
ScalFunctionOfScal
- applies this function to x and returns the result
- Specified by:
compute
in interface ScalFunctionOfScal
- Parameters:
y
-
- Returns:
- the reciprocal function x = f-1(y)
- See Also:
ScalFunctionOfScal.compute(float)