Enum StackView.StackAccessMode
- All Implemented Interfaces:
Serializable
,Comparable<StackView.StackAccessMode>
,java.lang.constant.Constable
RandomAccess
on the (n+1)-dimensional
StackView
maps position changes into position changes of the
underlying n-dimensional RandomAccess
es.
Each RandomAccess
on a StackView
keeps a list of
RandomAccess
es on all constituent hyper-slices of the
StackView
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe default behavior is the following.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
Modifier and TypeMethodDescriptionstatic StackView.StackAccessMode
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.
-
Enum Constant Details
-
DEFAULT
The default behavior is the following.There is one "active" slice
RandomAccess
, namely the zthRandomAccess
, 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 sliceRandomAccess
becomes active is set to the position of the previously active sliceRandomAccess
. -
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
RandomAccess
es. The current (n+1)th dimension of the position is maintained as an index. Whenget()
is called it is forwarded to the sliceRandomAccess
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 Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-