spis.Util.Func
Class LimitedExp
java.lang.Object
spis.Util.Func.LimitedExp
- All Implemented Interfaces:
- ScalFunctionOfScal
- public class LimitedExp
- extends java.lang.Object
- implements ScalFunctionOfScal
Class Name : LimitedExp
Project ref : SPIS project
File name : LimitedExp.java
File type : class
Copyright : ONERA, 2 Av. E. Belin, 31055 Toulouse cedex, France
http://www.onecert.fr
Status : under development
Creation : Mar 26, 2004
Modification :
Description : Exponential function, limited by a power law function
for large argument:
- returns y0 * exp((x-x1)/x0) for (x-x1)/x0 < 0
- returns y0 * (1 + (x-x1)/(x0*exponent))^exponent for (x-x1)/x0 > 0
Its derivative is thus continuous (at x=x1 in particular).
It is mostly used with exponent=1 to give the collected current from
a Maxwellian distribution: it is exact for negative (x-x1)/x0=(pot-potRef)/temp,
but only an upper boundary for positive (x-x1)/x0 (exact if all trajectories
are filled in OML regime)
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
Constructor Summary |
LimitedExp(float y0_,
float x0_,
float x1_,
float exponent_)
Constructor with y0, x0, x1 and exponent constants to define f(x) = y0*exp((x-x1)/x0)
for negative exponential argument and f(x) = y0 * (1 + (x-x1)/(x0*exponent))^exponent for (x-x1)/x0 > 0. |
Method Summary |
void |
apply(float[] x,
int n)
|
float |
compute(float x)
applies this function to x and returns the result |
void |
compute(float[] x,
int n,
float[] y)
applies this limited exponential to the array x (0 to n-1 elements) and assigns the result to y |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LimitedExp
public LimitedExp(float y0_,
float x0_,
float x1_,
float exponent_)
- Constructor with y0, x0, x1 and exponent constants to define f(x) = y0*exp((x-x1)/x0)
for negative exponential argument and f(x) = y0 * (1 + (x-x1)/(x0*exponent))^exponent for (x-x1)/x0 > 0.
compute
public float compute(float x)
- Description copied from interface:
ScalFunctionOfScal
- applies this function to x and returns the result
- Specified by:
compute
in interface ScalFunctionOfScal
compute
public void compute(float[] x,
int n,
float[] y)
- applies this limited exponential to the array x (0 to n-1 elements) and assigns the result to y
apply
public void apply(float[] x,
int n)