Show / Hide Table of Contents

Class TrieLinkedHashLinked<T, TEquate, THash>

A trie data structure that allows partial value sharing to reduce redundant memory.

Inheritance
System.Object
TrieLinkedHashLinked<T, TEquate, THash>
Implements
ITrie<T>
IDataStructure<Action<Action<T>>>
ISteppable<Action<Action<T>>>
System.Collections.Generic.IEnumerable<Action<Action<T>>>
DataStructure.ICountable
DataStructure.IClearable
DataStructure.IAddable<Action<Action<T>>>
DataStructure.IRemovable<Action<Action<T>>>
DataStructure.IAuditable<Action<Action<T>>>
ICloneable<TrieLinkedHashLinked<T, TEquate, THash>>
DataStructure.IEquating<T, TEquate>
DataStructure.IHashing<T, THash>
Namespace: Towel.DataStructures
Assembly: Towel.dll
Syntax
public class TrieLinkedHashLinked<T, TEquate, THash> : object, ITrie<T>, IDataStructure<Action<Action<T>>>, ISteppable<Action<Action<T>>>, System.Collections.Generic.IEnumerable<Action<Action<T>>>, DataStructure.ICountable, DataStructure.IClearable, DataStructure.IAddable<Action<Action<T>>>, DataStructure.IRemovable<Action<Action<T>>>, DataStructure.IAuditable<Action<Action<T>>>, ICloneable<TrieLinkedHashLinked<T, TEquate, THash>>, DataStructure.IEquating<T, TEquate>, DataStructure.IHashing<T, THash> where TEquate : struct, IFunc<T, T, bool> where THash : struct, IFunc<T, int>
Type Parameters
Name Description
T

The type of values in the trie.

TEquate

The type of function for quality checking T values.

THash

The type of function for hashing T values.

Constructors

| Improve this Doc View Source

TrieLinkedHashLinked(TEquate, THash)

Constructs a new trie that uses linked hash tables of linked lists.

Declaration
public TrieLinkedHashLinked(TEquate equate = default(TEquate), THash hash = default(THash))
Parameters
Type Name Description
TEquate equate

The equality delegate for the keys.

THash hash

The hashing function for the keys.

| Improve this Doc View Source

TrieLinkedHashLinked(TrieLinkedHashLinked<T, TEquate, THash>)

This constructor is for cloning purposes.

Declaration
public TrieLinkedHashLinked(TrieLinkedHashLinked<T, TEquate, THash> trie)
Parameters
Type Name Description
TrieLinkedHashLinked<T, TEquate, THash> trie

The trie to clone.

Properties

| Improve this Doc View Source

Count

The current count of the trie.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Equate

The equality function of the keys.

Declaration
public TEquate Equate { get; }
Property Value
Type Description
TEquate
| Improve this Doc View Source

Hash

The hash fucntion for the keys.

Declaration
public THash Hash { get; }
Property Value
Type Description
THash

Methods

| Improve this Doc View Source

TryAdd(Action<Action<T>>)

Tries to add a value to a data structure.

Declaration
public (bool Success, Exception? Exception) TryAdd(Action<Action<T>> stepper)
Parameters
Type Name Description
Action<Action<T>> stepper
Returns
Type Description
System.ValueTuple<System.Boolean, System.Nullable<Exception>>

True if the value was added or false if not.

Implements

ITrie<T>
IDataStructure<T>
ISteppable<T>
System.Collections.Generic.IEnumerable<>
DataStructure.ICountable
DataStructure.IClearable
DataStructure.IAddable<T>
DataStructure.IRemovable<T>
DataStructure.IAuditable<T>
ICloneable<T>
DataStructure.IEquating<T, TEquate>
DataStructure.IHashing<T, THash>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX