Struct ExcludeEdges<TNode>
Can be used to dynamically exclude certain edges from the graph without the need to rebuild it.
Namespace: AnyPath.Native.EdgeMods
Assembly: AnyPath.dll
Syntax
public struct ExcludeEdges<TNode> : IEdgeMod<TNode>, IDisposable where TNode : unmanaged, IEquatable<TNode>
Type Parameters
| Name | Description |
|---|---|
| TNode |
Remarks
Note that this Edge Modifier uses a Native Container which means it needs to be disposed, just as graphs. Use the DisposeSafe<TGraph>(TGraph) extension method for that.
Constructors
ExcludeEdges(Allocator, int)
Declaration
public ExcludeEdges(Allocator allocator, int capacity = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Allocator | allocator | |
| int | capacity |
Methods
AddExclusion(TNode, TNode)
Exlcudes an edge to be traversed. Note that this is directional.
Declaration
public bool AddExclusion(TNode from, TNode to)
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | from | The starting location. |
| TNode | to | The end of the edge. |
Returns
| Type | Description |
|---|---|
| bool |
Clear()
Clears all exclusions that were added.
Declaration
public void Clear()