Interface ReducedIndex<T>

Type Parameters:
T - Type of the objects.
All Known Subinterfaces:
FastGraph<U>, FastMultiGraph<U>, Index<I>
All Known Implementing Classes:
AbstractFastGraph, AbstractFastMultiGraph, FastDirectedUnweightedGraph, FastDirectedUnweightedMultiGraph, FastDirectedWeightedGraph, FastDirectedWeightedMultiGraph, FastIndex, FastTree, FastUndirectedUnweightedGraph, FastUndirectedUnweightedMultiGraph, FastUndirectedWeightedGraph, FastUndirectedWeightedMultiGraph, FastUnweightedTree, FastWeightedTree

public interface ReducedIndex<T>
Index that cannot be modified.
  • Method Summary

    Modifier and Type Method Description
    T idx2object​(int idx)
    Gets the object corresponding to a certain index.
    int object2idx​(T i)
    Gets the index of a given object.
  • Method Details

    • object2idx

      int object2idx​(T i)
      Gets the index of a given object.
      Parameters:
      i - Object to obtain.
      Returns:
      the index if the object exists, -1 if not.
    • idx2object

      T idx2object​(int idx)
      Gets the object corresponding to a certain index.
      Parameters:
      idx - The index.
      Returns:
      the object corresponding to the index.