|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.analysis.function.rn2r1.RealScalarFunctionFixedVariables
public class RealScalarFunctionFixedVariables
This creates a a RealScalarFunction from another RealScalarFunction by fixing the values of a subset of variables.
| Nested Class Summary | |
|---|---|
static class |
RealScalarFunctionFixedVariables.Value
|
| Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function |
|---|
Function.EvaluationException |
| Constructor Summary | |
|---|---|
RealScalarFunctionFixedVariables(RealScalarFunction f,
java.util.Collection<RealScalarFunctionFixedVariables.Value> values)
|
|
RealScalarFunctionFixedVariables(RealScalarFunction f,
RealScalarFunctionFixedVariables.Value... values)
|
|
| Method Summary | |
|---|---|
int |
dimension4Domain()
Get the number of variables of the function. |
int |
dimension4Range()
Get the dimension of the range space the function. |
double |
evaluate(double... x)
A real function, f, takes a double array double[],
{x0, x1, ..., xn}
and maps it to a double,
f(x0, x1, ..., xn) |
boolean |
isIntegerIndex(int idx)
Check whether a particular index corresponds an integral variable. |
static double[] |
pack(double[] reals,
java.util.Collection<RealScalarFunctionFixedVariables.Value> integers)
Combine the real and integer parts to form a vector input to the original function. |
double[] |
realPart(double[] z)
Given a vector input to the original function, this extracts the real parts (excluding the fixed integer values). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RealScalarFunctionFixedVariables(RealScalarFunction f,
java.util.Collection<RealScalarFunctionFixedVariables.Value> values)
public RealScalarFunctionFixedVariables(RealScalarFunction f,
RealScalarFunctionFixedVariables.Value... values)
| Method Detail |
|---|
public double evaluate(double... x)
RealScalarFunctionf, takes a double array double[],
and maps it to a double,{x0,x1, ...,xn}
f(x0, x1, ..., xn)
evaluate in interface RealScalarFunctionx - {x} = {x0, x1, ... xn}
f({x}) as outputpublic int dimension4Domain()
FunctionFor example, for a univariate function, the domain dimension is 1. For a bivariate function, the domain dimension is 2.
dimension4Domain in interface Functionpublic int dimension4Range()
Function
For example, for a Rn->Rm function, the dimension of the range is m.
dimension4Range in interface Functionpublic boolean isIntegerIndex(int idx)
idx - an index
x[idx] is an integerpublic double[] realPart(double[] z)
z - an input to the original function
z
public static double[] pack(double[] reals,
java.util.Collection<RealScalarFunctionFixedVariables.Value> integers)
reals - the real values to the non-integral variablesintegers - the integer values to the integral variables
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||