Class Indexer<T>
- Namespace
- AlgorithmsSW.Graph
- Assembly
- AlgorithmsSW.dll
Class that can assign indexes to symbols.
public class Indexer<T>
Type Parameters
TThe type of symbols to index.
- Inheritance
-
Indexer<T>
- Inherited Members
- Extension Methods
Constructors
Indexer(IComparer<T>)
Class that can assign indexes to symbols.
public Indexer(IComparer<T> comparer)
Parameters
comparerIComparer<T>
Properties
Symbols
Gets an IReadOnlySymbolTable<TKey, TValue> containing the symbols and their associated indexes.
public IReadOnlySymbolTable<T, int> Symbols { get; }
Property Value
Methods
GetIndex(T)
Returns an index associated with this index. This index is unique for each symbol.
public int GetIndex(T symbol)
Parameters
symbolTThe symbol to get the index for.
Returns
- int
The index associated with this symbol.