|
AlgART Home | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.algart.math.functions.LogFunc
public abstract class LogFunc extends java.lang.Object implements Func
Logarithm function:
f(x0) =
logb(x0)
(b is the base of the logarithm).
More precisely, the result of this function is
Math.log(x[0])*(1.0/Math.log(b)) for the instance
returned by getInstance(b) method
or StrictMath.log(x[0])*(1.0/Math.log(b)) for the instance
returned by getStrictInstance(b) method.
The get(double...) method of the instance of this class requires at least 1 argument
and throws IndexOutOfBoundsException if the number of arguments is 0.
This class is immutable and thread-safe: there are no ways to modify settings of the created instance.
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 |
| Modifier and Type | Method and Description |
|---|---|
double |
get()
Equivalent to get(new double[0]). |
abstract double |
get(double... x)
Returns the result of this function for the given arguments: f(x0, x1, ..., xx.length-1). |
abstract double |
get(double x0)
Equivalent to get(new double[] {x0}). |
abstract double |
get(double x0,
double x1)
Equivalent to get(new double[] {x0, x1}). |
abstract double |
get(double x0,
double x1,
double x2)
Equivalent to get(new double[] {x0, x1, x2}). |
abstract double |
get(double x0,
double x1,
double x2,
double x3)
Equivalent to get(new double[] {x0, x1, x2, x3}). |
static LogFunc |
getInstance(double b)
Returns an instance of this class for the given logarithm base b using Math.log method. |
static LogFunc |
getStrictInstance(double b)
Returns an instance of this class for the given logarithm base b using StrictMath.log method. |
java.lang.String |
toString()
Returns a brief string description of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static LogFunc getInstance(double b)
This method returns special optimized versions of this class for base=Math.E and base=10.0.
b - the base of the logarithm.public static LogFunc getStrictInstance(double b)
This method returns special optimized versions of this class for base=Math.E and base=10.0.
b - the base of the logarithm.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()
Funcget(new double[0]).
Provides better performance because it does not require Java array creation.
get in interface Funcpublic abstract double get(double x0)
Funcget(new double[] {x0}).
Provides better performance because it does not require Java array creation.
get in interface Funcx0 - the function argument.
public abstract double get(double x0,
double x1)
Funcget(new double[] {x0, x1}).
Provides better performance because it does not require Java array creation.
get in interface Funcx0 - the first function argument.x1 - the second function argument.
public abstract double get(double x0,
double x1,
double x2)
Funcget(new double[] {x0, x1, x2}).
Provides better performance because it does not require Java array creation.
get in interface Funcx0 - the first function argument.x1 - the second function argument.x2 - the third function argument.
public abstract double get(double x0,
double x1,
double x2,
double x3)
Funcget(new double[] {x0, x1, x2, x3}).
Provides better performance because it does not require Java array creation.
get in interface Funcx0 - the first function argument.x1 - the second function argument.x2 - the third function argument.x3 - the fourth function argument.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||