Class NodeArrayAdapter
- java.lang.Object
-
- elki.index.tree.spatial.rstarvariants.util.NodeArrayAdapter
-
- All Implemented Interfaces:
ArrayAdapter<SpatialEntry,AbstractNode<? extends SpatialEntry>>
public class NodeArrayAdapter extends java.lang.Object implements ArrayAdapter<SpatialEntry,AbstractNode<? extends SpatialEntry>>
Access the entries of a node as array-like.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description static NodeArrayAdapter
STATIC
Static adapter.
-
Constructor Summary
Constructors Modifier Constructor Description protected
NodeArrayAdapter()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpatialEntry
get(AbstractNode<? extends SpatialEntry> array, int off)
Get the off'th item from the array.int
size(AbstractNode<? extends SpatialEntry> array)
Get the size of the array.
-
-
-
Field Detail
-
STATIC
public static final NodeArrayAdapter STATIC
Static adapter.
-
-
Method Detail
-
size
public int size(AbstractNode<? extends SpatialEntry> array)
Description copied from interface:ArrayAdapter
Get the size of the array.- Specified by:
size
in interfaceArrayAdapter<SpatialEntry,AbstractNode<? extends SpatialEntry>>
- Parameters:
array
- Array-like thing- Returns:
- Size
-
get
public SpatialEntry get(AbstractNode<? extends SpatialEntry> array, int off) throws java.lang.IndexOutOfBoundsException
Description copied from interface:ArrayAdapter
Get the off'th item from the array.- Specified by:
get
in interfaceArrayAdapter<SpatialEntry,AbstractNode<? extends SpatialEntry>>
- Parameters:
array
- Array to get fromoff
- Offset- Returns:
- Item at offset off
- Throws:
java.lang.IndexOutOfBoundsException
- for an invalid index.
-
-