public final class Index extends AIndex
| Modifier and Type | Field and Description |
|---|---|
int[] |
data |
| Constructor and Description |
|---|
Index(int length) |
| Modifier and Type | Method and Description |
|---|---|
Index |
clone() |
Index |
compose(AIndex a) |
Index |
compose(Index a) |
boolean |
equals(Index o) |
boolean |
equals(Object o) |
int |
get(int i)
Gets the index value at position i
|
int[] |
getData() |
int |
indexPosition(int i)
Looks up an index value in the index, returning its position or -1 if not found
Index must be both sorted and distinct.
|
boolean |
isDistinctSorted()
Returns true if this index is distinct and sorted (in strictly increasing order)
|
boolean |
isFullyMutable() |
int |
length()
Returns the length of this index list
|
void |
lookupWith(Index source) |
static Index |
of(int... indexes)
Creates a new Index, using the specified index values
|
void |
permute(Index permutationIndex)
Permutes this vector according to a given permutation index
|
void |
reverse()
Reverses an index
|
int |
seekPosition(int i)
Finds the position a value would take in a sorted index.
|
void |
set(int i,
int value) |
void |
sort()
Sorts the Index (in-place)
|
void |
swap(int i,
int j)
Swaps (in-place) the indexes at two positions
|
int[] |
toArray() |
static Index |
wrap(int[] indexes)
Creates a new Index, wrapping the provided index array
|
public void swap(int i,
int j)
public boolean isDistinctSorted()
AIndexisDistinctSorted in class AIndexpublic static Index wrap(int[] indexes)
public static Index of(int... indexes)
public int get(int i)
AIndexpublic int length()
AIndexpublic void permute(Index permutationIndex)
permutationIndex - public boolean equals(Index o)
public int[] getData()
public boolean isFullyMutable()
isFullyMutable in class AIndexpublic void lookupWith(Index source)
public int indexPosition(int i)
i - public int seekPosition(int i)
i - The position of the value - will point to either the value or the next higher value presentCopyright © 2013. All Rights Reserved.