Documentation of 'org.jlab.groot.math.MultiIndex' Java class
MultiIndex
org.jlab.groot.math

Class MultiIndex

  • All Implemented Interfaces:
    java.io.Serializable


    public class MultiIndex
    extends java.lang.Object
    implements java.io.Serializable
    Handles the indexing of multidimensional arrays.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      MultiIndex()
      Initializes the arrays to size 0.
      MultiIndex(int... d)
      Initializes the variables based on the number of arguments
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getArrayIndex(int... ind)
      Gets the needed size for 1D, 2D, and 3D arrays to be stored in a 1D array
      int getArraySize()
      Gets the size of the resulting 1D array from the dimension sizes
      void setDimensions(int... d)
      Sets the dimension sizes at each index and initializes every element of the current index to -1.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultiIndex

        public MultiIndex()
        Initializes the arrays to size 0.
      • MultiIndex

        public MultiIndex(int... d)
        Initializes the variables based on the number of arguments
        Parameters:
        d - the list of dimension sizes. Used to determine the array sizes.
    • Method Detail

      • setDimensions

        public final void setDimensions(int... d)
        Sets the dimension sizes at each index and initializes every element of the current index to -1.
        Parameters:
        d - the list of dimension sizes
      • getArraySize

        public int getArraySize()
        Gets the size of the resulting 1D array from the dimension sizes
        Returns:
        the size of the 1D array from storing everything in the multi-dimensional arrays
      • getArrayIndex

        public int getArrayIndex(int... ind)
        Gets the needed size for 1D, 2D, and 3D arrays to be stored in a 1D array
        Parameters:
        ind - The size of each dimension
        Returns:
        The size of the 1D array from storing all the elements

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.