Class ALTSerialization
Namespace: AnyPath.Native.Heuristics
Assembly: AnyPath.dll
Syntax
public static class ALTSerialization
Methods
ReadFrom<TNode>(ALT<TNode>, BinaryReader, Func<BinaryReader, TNode>)
Populates this ALT heuristic provider with binary data.
Declaration
public static void ReadFrom<TNode>(this ALT<TNode> alt, BinaryReader reader, Func<BinaryReader, TNode> readNode) where TNode : unmanaged, IEquatable<TNode>
Parameters
| Type | Name | Description |
|---|---|---|
| ALT<TNode> | alt | The ALT provider to populate |
| BinaryReader | reader | Binary reader to read the data from. Consider using a compressed stream source for large graphs. |
| Func<BinaryReader, TNode> | readNode | A function that reads a node from the reader |
Type Parameters
| Name | Description |
|---|---|
| TNode | The type of node that was used |
WriteTo<TNode>(ALT<TNode>, BinaryWriter, Action<BinaryWriter, TNode>)
Writes this ALT heuristics into a stream.
Declaration
public static void WriteTo<TNode>(this ALT<TNode> alt, BinaryWriter writer, Action<BinaryWriter, TNode> writeNode) where TNode : unmanaged, IEquatable<TNode>
Parameters
| Type | Name | Description |
|---|---|---|
| ALT<TNode> | alt | ALT provider to serialize |
| BinaryWriter | writer | BinaryWriter to use for writing |
| Action<BinaryWriter, TNode> | writeNode | Provide a function that serializes a single graph node |
Type Parameters
| Name | Description |
|---|---|
| TNode | Type of nodes used |
Remarks
Consider writing into a compressed stream if your graph is large.