|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.mathutil.dimension.MultiDimension
public class MultiDimension
Handle multi-dimensional integer-based dimensions. Depending on how the values are interpreted, this structure can be used to either represent a coordinate, velocity or a constraint.
Constructor Summary | |
---|---|
MultiDimension(int n)
Allocate a MultiDimension. |
|
MultiDimension(MultiDimension lower)
|
Method Summary | |
---|---|
double |
calculateLowerStep(DimensionConstraint constraint,
int d)
|
double |
calculateUpperStep(DimensionConstraint constraint,
int d)
|
int |
flatten(DimensionConstraint constraint)
Flatten the multi-dimensional index into a single dimension index. |
boolean |
forward(DimensionConstraint constraint)
Roll the dimension forward by one. |
int |
getDimension(int d)
Get a dimension. |
int[] |
getDimensions()
|
void |
setDimension(int d,
int value)
Set a single dimension. |
int |
size()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MultiDimension(int n)
n
- The number of dimensions.public MultiDimension(MultiDimension lower)
Method Detail |
---|
public int getDimension(int d)
d
- The dimension to get.
public int size()
public int[] getDimensions()
public boolean forward(DimensionConstraint constraint)
constraint
- The dimension constraints.
public int flatten(DimensionConstraint constraint)
constraint
- The dimension constraints.
public void setDimension(int d, int value)
d
- The dimension to set.value
- The new value.public String toString()
toString
in class Object
public double calculateLowerStep(DimensionConstraint constraint, int d)
public double calculateUpperStep(DimensionConstraint constraint, int d)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |