|
AlgART Home | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.algart.math.functions.AbstractFunc
public abstract class AbstractFunc extends java.lang.Object implements Func
A skeletal implementation of the Func interface to minimize
the effort required to implement this interface.
Warning: in most cases, we strongly recommend to override the overloaded versions of get method
(get(), get(double), get(double, double), get(double, double, double)),
if they are applicable for your function. The default implementations, provided by this class,
work relatively slowly, because they allocate a little Java array for passing to the basic
get(double...) method. For example, if you create a function with two arguments
get(double, double).
AlgART Laboratory 2007-2013
| Modifier and Type | Interface and Description |
|---|
| Nested classes/interfaces inherited from interface net.algart.math.functions.Func |
|---|
Func.Updatable |
| Modifier and Type | Field and Description |
|---|
| Fields inherited from interface net.algart.math.functions.Func |
|---|
ABS, ABS_DIFF, HALF_X_MINUS_Y, HALF_X_PLUS_Y, HALF_Y_MINUS_X, IDENTITY, MAX, MIN, POSITIVE_DIFF, REVERSE, SELECT, SELECT_FROM_8_DIRECTIONS_2D, SELECT_IF_GREATER, SELECT_IF_GREATER_OR_EQUAL, SHIFTS_ALONG_8_DIRECTIONS_2D, UPDATABLE_IDENTITY, X_MINUS_Y, X_PLUS_Y, Y_MINUS_X |
| Constructor and Description |
|---|
AbstractFunc()
|
| Modifier and Type | Method and Description |
|---|---|
double |
get()
This implementation calls get(EMPTY),
where EMPTY is a constant array double[0]. |
abstract double |
get(double... x)
Returns the result of this function for the given arguments: f(x0, x1, ..., xx.length-1). |
double |
get(double x0)
This implementation calls get(new double[] {x0}). |
double |
get(double x0,
double x1)
This implementation calls get(new double[] {x0, x1}). |
double |
get(double x0,
double x1,
double x2)
This implementation calls get(new double[] {x0, x1, x2}). |
double |
get(double x0,
double x1,
double x2,
double x3)
This implementation calls get(new double[] {x0, x1, x2, x3}). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractFunc()
| Method Detail |
|---|
public abstract double get(double... x)
FuncThis method must not change the values of x elements!
get in interface Funcx - the function arguments.public double get()
get(EMPTY),
where EMPTY is a constant array double[0].
get in interface Funcjava.lang.IndexOutOfBoundsException - may be thrown this function requires at least 1 argument.public double get(double x0)
get(new double[] {x0}).
May be overridden to provide better performance.
get in interface Funcx0 - the function argument.java.lang.IndexOutOfBoundsException - may be thrown this function requires at least 2 arguments.
public double get(double x0,
double x1)
get(new double[] {x0, x1}).
May be overridden to provide better performance.
get in interface Funcx0 - the first function argument.x1 - the second function argument.java.lang.IndexOutOfBoundsException - may be thrown this function requires at least 3 arguments.
public double get(double x0,
double x1,
double x2)
get(new double[] {x0, x1, x2}).
May be overridden to provide better performance.
get in interface Funcx0 - the first function argument.x1 - the second function argument.x2 - the third function argument.java.lang.IndexOutOfBoundsException - may be thrown this function requires at least 3 arguments.
public double get(double x0,
double x1,
double x2,
double x3)
get(new double[] {x0, x1, x2, x3}).
May be overridden to provide better performance.
get in interface Funcx0 - the first function argument.x1 - the second function argument.x2 - the third function argument.x3 - the fourth function argument.java.lang.IndexOutOfBoundsException - may be thrown this function requires at least 3 arguments.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||