Documentation of 'org.encog.mathutil.dimension.MultiDimension' Java class
MultiDimension
org.encog.mathutil.dimension

Class MultiDimension



  • public class MultiDimension
    extends java.lang.Object
    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 Detail

      • MultiDimension

        public MultiDimension(int n)
        Allocate a MultiDimension.
        Parameters:
        n - The number of dimensions.
    • Method Detail

      • getDimension

        public int getDimension(int d)
        Get a dimension.
        Parameters:
        d - The dimension to get.
        Returns:
        The value of the specified dimension.
      • size

        public int size()
        Returns:
        The number of dimensions.
      • getDimensions

        public int[] getDimensions()
        Returns:
        The dimensions as an array.
      • forward

        public boolean forward(DimensionConstraint constraint)
        Roll the dimension forward by one. Start with the low dimension and tick forward. This can be used to iterate through every index position.
        Parameters:
        constraint - The dimension constraints.
        Returns:
        True if there are still more combinations, false if we are done.
      • flatten

        public int flatten(DimensionConstraint constraint)
        Flatten the multi-dimensional index into a single dimension index.
        Parameters:
        constraint - The dimension constraints.
        Returns:
        The flat 1d index.
      • setDimension

        public void setDimension(int d,
                                 int value)
        Set a single dimension.
        Parameters:
        d - The dimension to set.
        value - The new value.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • calculateLowerStep

        public double calculateLowerStep(DimensionConstraint constraint,
                                         int d)
      • calculateUpperStep

        public double calculateUpperStep(DimensionConstraint constraint,
                                         int d)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.