Enum StackView.StackAccessMode

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DEFAULT
      The default behavior is the following.
      MOVE_ALL_SLICE_ACCESSES
      Alternative behavior for some special cases; this is faster assuming that we access in a loop over dimensions with the last dimension (the hyper-slice dimension) in the inner loop.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static StackView.StackAccessMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static StackView.StackAccessMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • DEFAULT

        public static final StackView.StackAccessMode DEFAULT
        The default behavior is the following.

        There is one "active" slice RandomAccess, namely the zth RandomAccess, where z denotes the (n+1)th dimension of the current position.

        When changing any dimension of the position, except the (n+1)th, this position change is applied to the active slice RandomAccess. When changing the (n+1)th dimension of the position, a new slice RandomAccess becomes active is set to the position of the previously active slice RandomAccess.

      • MOVE_ALL_SLICE_ACCESSES

        public static final StackView.StackAccessMode MOVE_ALL_SLICE_ACCESSES
        Alternative behavior for some special cases; this is faster assuming that we access in a loop over dimensions with the last dimension (the hyper-slice dimension) in the inner loop. Works as follows.

        When changing any dimension of the position, except the (n+1)th, this position change is applied to the all slice RandomAccesses. The current (n+1)th dimension of the position is maintained as an index. When get() is called it is forwarded to the slice RandomAccess at that index.

        The potential advantage of this approach is that it does not need to do a full setPosition() when changing slices. Only use this if you know what you are doing.

    • Method Detail

      • values

        public static StackView.StackAccessMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (StackView.StackAccessMode c : StackView.StackAccessMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StackView.StackAccessMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null