Show / Hide Table of Contents

Class DirectedDynamicGraph

An directed graph.

Inheritance
System.Object
DirectedDynamicGraph
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public sealed class DirectedDynamicGraph : IDisposable

Constructors

DirectedDynamicGraph(MemoryMap, Int32, Int32)

Creates a new dynamic directed graph.

Declaration
public DirectedDynamicGraph(MemoryMap file, int sizeEstimate, int fixedEdgeDataSize = 1)
Parameters
MemoryMap file

System.Int32 sizeEstimate

System.Int32 fixedEdgeDataSize

DirectedDynamicGraph(Int32)

Creates a new dynamic directed graph.

Declaration
public DirectedDynamicGraph(int fixedEdgeDataSize = 1)
Parameters
System.Int32 fixedEdgeDataSize

DirectedDynamicGraph(Int32, Int32)

Creates a new dynamic directed graph.

Declaration
public DirectedDynamicGraph(int sizeEstimate, int fixedEdgeDataSize = 1)
Parameters
System.Int32 sizeEstimate

System.Int32 fixedEdgeDataSize

Properties

EdgeCount

Returns the number of edges in this graph.

Declaration
public uint EdgeCount { get; }
Property Value
System.UInt32

FixedEdgeDataSize

Gets the part of the data that is fixed, meaning a minimum of payload for each edge.

Declaration
public int FixedEdgeDataSize { get; }
Property Value
System.Int32

IsReadonly

Returns the readonly flag.

Declaration
public bool IsReadonly { get; }
Property Value
System.Boolean

VertexCount

Returns the number of vertices in this graph.

Declaration
public uint VertexCount { get; }
Property Value
System.UInt32

Methods

AddEdge(UInt32, UInt32, UInt32)

Adds an edge with the associated data.

Declaration
public uint AddEdge(uint vertex1, uint vertex2, uint data)
Parameters
System.UInt32 vertex1

System.UInt32 vertex2

System.UInt32 data

Returns
System.UInt32

AddEdge(UInt32, UInt32, UInt32[])

Adds an edge with the associated data.

Declaration
public uint AddEdge(uint vertex1, uint vertex2, params uint[] data)
Parameters
System.UInt32 vertex1

System.UInt32 vertex2

System.UInt32[] data

Returns
System.UInt32

Compress()

Compresses the data in this graph to it's smallest size.

Declaration
public void Compress()

Compress(Boolean)

Compresses the data in this graph to it's smallest size.

Declaration
public void Compress(bool toReadonly)
Parameters
System.Boolean toReadonly

Compress(Boolean, out Int64)

Compresses the data in this graph to it's smallest size.

Declaration
public void Compress(bool toReadonly, out long maxEdgeId)
Parameters
System.Boolean toReadonly

System.Int64 maxEdgeId

Deserialize(Stream, DirectedGraphProfile)

Deserializes a graph from the given stream.

Declaration
public static DirectedDynamicGraph Deserialize(Stream stream, DirectedGraphProfile profile)
Parameters
System.IO.Stream stream

DirectedGraphProfile profile

Returns
DirectedDynamicGraph

Dispose()

Releases unmanaged resources associated with this graph.

Declaration
public void Dispose()

GetEdgeEnumerator()

Returns an empty edge enumerator.

Declaration
public DirectedDynamicGraph.EdgeEnumerator GetEdgeEnumerator()
Returns
DirectedDynamicGraph.EdgeEnumerator

RemoveEdge(UInt32, UInt32)

Deletes the edge between the two given vertices.

Declaration
public int RemoveEdge(uint vertex1, uint vertex2)
Parameters
System.UInt32 vertex1

System.UInt32 vertex2

Returns
System.Int32

Remarks

Only deletes edge vertex1->vertex2 NOT vertex2 -> vertex1.

RemoveEdgeById(UInt32, UInt32)

Deletes the edge with the given id starting at the given vertex.

Declaration
public int RemoveEdgeById(uint vertex1, uint edgeId)
Parameters
System.UInt32 vertex1

System.UInt32 edgeId

Returns
System.Int32

RemoveEdges(UInt32)

Deletes all edges leading from/to the given vertex.

Declaration
public int RemoveEdges(uint vertex)
Parameters
System.UInt32 vertex

Returns
System.Int32

Remarks

Only deletes all edges vertex->* NOT *->vertex

RemoveFlags(UInt32)

Removes all flags.

Declaration
public static uint RemoveFlags(uint data)
Parameters
System.UInt32 data

Returns
System.UInt32

Serialize(Stream)

Serializes this graph to disk.

Declaration
public long Serialize(Stream stream)
Parameters
System.IO.Stream stream

Returns
System.Int64

Serialize(Stream, Boolean)

Serializes this graph to disk.

Declaration
public long Serialize(Stream stream, bool compress)
Parameters
System.IO.Stream stream

System.Boolean compress

Returns
System.Int64

Trim()

Trims the internal data structures of this graph.

Declaration
public void Trim()

Trim(out Int64)

Trims the internal data structures of this graph.

Declaration
public void Trim(out long maxEdgeId)
Parameters
System.Int64 maxEdgeId

UpdateEdge(UInt32, UInt32, Func<UInt32[], Boolean>, UInt32[])

Updates and edge's associated data.

Declaration
public uint UpdateEdge(uint vertex1, uint vertex2, Func<uint[], bool> update, params uint[] data)
Parameters
System.UInt32 vertex1

System.UInt32 vertex2

Func<System.UInt32[], System.Boolean> update

System.UInt32[] data

Returns
System.UInt32

Back to top Built by Itinero, MIT licensed.