|
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.Projection
public class Projection
This class creates a real-valued function RealScalarFunction from a vector-valued function RealVectorFunction by
taking only one of its coordinate components in the vector output.
This is essentially projecting a high dimensional output to only 1 dimension.
For example, suppose we have a Rn → Rm RealVectorFunction
f1 = [y1, y2, y3]'
We can create a Rn → R1 RealScalarFunction by taking its second coordinate.
That is
f2 = y2
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function |
|---|
Function.EvaluationException |
| Field Summary | |
|---|---|
int |
dimension
the dimension/coordinate to take from the output of f
It counts from 1. |
RealVectorFunction |
f
the original Rn → Rm function |
| Constructor Summary | |
|---|---|
Projection(RealVectorFunction f,
int dimension)
Construct a Rn → R1 projection from the Rn → Rm function f. |
|
| 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) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final RealVectorFunction f
public final int dimension
f
It counts from 1.
| Constructor Detail |
|---|
public Projection(RealVectorFunction f,
int dimension)
f.
f - a vector-valued functiondimension - the dimension/coordinate of the f value to output| 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 Function
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||