Package net.algart.math.functions
Class LinearFunc.Updatable
java.lang.Object
net.algart.math.functions.LinearFunc
net.algart.math.functions.LinearFunc.Updatable
- All Implemented Interfaces:
- Func,- Func.Updatable
- Enclosing class:
- LinearFunc
Updatable extension of the linear function
 with one argument.
- 
Nested Class SummaryNested classes/interfaces inherited from class net.algart.math.functions.LinearFuncLinearFunc.UpdatableNested classes/interfaces inherited from interface net.algart.math.functions.FuncFunc.Updatable
- 
Field SummaryFields inherited from interface net.algart.math.functions.FuncABS, 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
- 
Method SummaryModifier and TypeMethodDescriptiondoubleget()Equivalent toget(new double[0]).doubleget(double x0) Equivalent toget(new double[] {x0}).doubleget(double... x) Returns the result of this function for the given arguments: f(x0, x1, ..., xx.length-1).doubleget(double x0, double x1) Equivalent toget(new double[] {x0, x1}).doubleget(double x0, double x1, double x2) Equivalent toget(new double[] {x0, x1, x2}).doubleget(double x0, double x1, double x2, double x3) Equivalent toget(new double[] {x0, x1, x2, x3}).voidset(double[] x, double newResult) Correct some of x arguments so thatget(x)will be, as possible, equal to newResult.Methods inherited from class net.algart.math.functions.LinearFunca, a, b, getAveragingInstance, getInstance, getInstance, getNonweightedInstance, getUpdatableInstance, isNonweighted, n, toString
- 
Method Details- 
getpublic double get(double... x) Description copied from interface:FuncReturns the result of this function for the given arguments: f(x0, x1, ..., xx.length-1).This method must not change the values of x elements! - Specified by:
- getin interface- Func
- Specified by:
- getin class- LinearFunc
- Parameters:
- x- the function arguments.
- Returns:
- the function result.
 
- 
getpublic double get()Description copied from interface:FuncEquivalent toget(new double[0]). Provides better performance because it does not require Java array creation.- Specified by:
- getin interface- Func
- Specified by:
- getin class- LinearFunc
- Returns:
- the function result.
 
- 
getpublic double get(double x0) Description copied from interface:FuncEquivalent toget(new double[] {x0}). Provides better performance because it does not require Java array creation.- Specified by:
- getin interface- Func
- Specified by:
- getin class- LinearFunc
- Parameters:
- x0- the function argument.
- Returns:
- the function result.
 
- 
getpublic double get(double x0, double x1) Description copied from interface:FuncEquivalent toget(new double[] {x0, x1}). Provides better performance because it does not require Java array creation.- Specified by:
- getin interface- Func
- Specified by:
- getin class- LinearFunc
- Parameters:
- x0- the first function argument.
- x1- the second function argument.
- Returns:
- the function result.
 
- 
getpublic double get(double x0, double x1, double x2) Description copied from interface:FuncEquivalent toget(new double[] {x0, x1, x2}). Provides better performance because it does not require Java array creation.- Specified by:
- getin interface- Func
- Specified by:
- getin class- LinearFunc
- Parameters:
- x0- the first function argument.
- x1- the second function argument.
- x2- the third function argument.
- Returns:
- the function result.
 
- 
getpublic double get(double x0, double x1, double x2, double x3) Description copied from interface:FuncEquivalent toget(new double[] {x0, x1, x2, x3}). Provides better performance because it does not require Java array creation.- Specified by:
- getin interface- Func
- Specified by:
- getin class- LinearFunc
- Parameters:
- x0- the first function argument.
- x1- the second function argument.
- x2- the third function argument.
- x3- the fourth function argument.
- Returns:
- the function result.
 
- 
setpublic void set(double[] x, double newResult) Description copied from interface:Func.UpdatableCorrect some of x arguments so thatget(x)will be, as possible, equal to newResult. For example, if this is one-argument function f(x), and its inverse function is g(y) (g(f(x))=x), then this method should assign x[0]=g(newResult).This method does not guarantee the precise equality get(x)==newResult. (Usually, it is impossible due to limited precision of floating-point calculations.) But this method should try to provide this equality (after its call) with, as possible, maximal possible precision.- Specified by:
- setin interface- Func.Updatable
- Parameters:
- x- the function arguments.
- newResult- the desired function result.
 
 
-