Class SymbolTableAlgorithms
- Namespace
- AlgorithmsSW.SymbolTable
- Assembly
- AlgorithmsSW.dll
public static class SymbolTableAlgorithms
- Inheritance
-
SymbolTableAlgorithms
- Inherited Members
-
Methods
CountKeysWithValue<TKey, TValue>(IReadOnlySymbolTable<TKey, TValue>, IComparer<TValue>)
public static Counter<TValue> CountKeysWithValue<TKey, TValue>(this IReadOnlySymbolTable<TKey, TValue> symbols, IComparer<TValue> comparer)
Parameters
symbols
IReadOnlySymbolTable<TKey, TValue>
comparer
IComparer<TValue>
Returns
- Counter<TValue>
Type Parameters
TKey
TValue
Invert<TValue>(IReadonlyRandomAccessList<TValue>, IComparer<TValue>)
public static ISymbolTable<TValue, int> Invert<TValue>(this IReadonlyRandomAccessList<TValue> list, IComparer<TValue> comparer)
Parameters
list
IReadonlyRandomAccessList<TValue>
comparer
IComparer<TValue>
Returns
- ISymbolTable<TValue, int>
Type Parameters
TValue
Invert<TKey, TValue>(IReadOnlySymbolTable<TKey, TValue>, IComparer<TValue>)
public static ISymbolTable<TValue, TKey> Invert<TKey, TValue>(this IReadOnlySymbolTable<TKey, TValue> symbols, IComparer<TValue> comparer)
Parameters
symbols
IReadOnlySymbolTable<TKey, TValue>
comparer
IComparer<TValue>
Returns
- ISymbolTable<TValue, TKey>
Type Parameters
TKey
TValue
ToSymbolTable<T>(IRandomAccessList<T>)
public static ISymbolTable<int, T> ToSymbolTable<T>(this IRandomAccessList<T> list)
Parameters
list
IRandomAccessList<T>
Returns
- ISymbolTable<int, T>
Type Parameters
T
ToSymbolTable<T>(IReadonlyRandomAccessList<T>)
public static IReadOnlySymbolTable<int, T> ToSymbolTable<T>(this IReadonlyRandomAccessList<T> list)
Parameters
list
IReadonlyRandomAccessList<T>
Returns
- IReadOnlySymbolTable<int, T>
Type Parameters
T
ToSymbolTable<TKey, TValue>(IEnumerable<(TKey key, TValue value)>, IComparer<TKey>)
public static IReadOnlySymbolTable<TKey, TValue> ToSymbolTable<TKey, TValue>(this IEnumerable<(TKey key, TValue value)> pairs, IComparer<TKey> comparer)
Parameters
pairs
IEnumerable<(TKey key, TValue value)>
comparer
IComparer<TKey>
Returns
- IReadOnlySymbolTable<TKey, TValue>
Type Parameters
TKey
TValue