Show / Hide Table of Contents

Class DirectedMetaGraph

A direct graph with extra meta-data per edge.

Inheritance
System.Object
DirectedMetaGraph
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public sealed class DirectedMetaGraph

Constructors

DirectedMetaGraph(Int32, Int32)

Creates a new graph.

Declaration
public DirectedMetaGraph(int edgeDataSize, int edgeMetaDataSize)
Parameters
System.Int32 edgeDataSize

System.Int32 edgeMetaDataSize

DirectedMetaGraph(Int32, Int32, Int64)

Creates a new graph.

Declaration
public DirectedMetaGraph(int edgeDataSize, int edgeMetaDataSize, long sizeEstimate)
Parameters
System.Int32 edgeDataSize

System.Int32 edgeMetaDataSize

System.Int64 sizeEstimate

Properties

EdgeCount

Returns the number of edges in this graph.

Declaration
public long EdgeCount { get; }
Property Value
System.Int64

EdgeDataSize

Gets the edge data size.

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

Graph

Gets the basic graph.

Declaration
public DirectedGraph Graph { get; }
Property Value
DirectedGraph

VertexCount

Returns the number of vertices in this graph.

Declaration
public long VertexCount { get; }
Property Value
System.Int64

Methods

AddEdge(UInt32, UInt32, UInt32, UInt32)

Adds a new edge.

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

System.UInt32 vertex2

System.UInt32 data

System.UInt32 metaData

Returns
System.UInt32

AddEdge(UInt32, UInt32, UInt32[], UInt32[])

Adds a new edge.

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

System.UInt32 vertex2

System.UInt32[] data

System.UInt32[] metaData

Returns
System.UInt32

Compress()

Relocates data internally in the most compact way possible.

Declaration
public void Compress()

Compress(Boolean)

Relocates data internally in the most compact way possible.

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

Deserialize(Stream, DirectedMetaGraphProfile)

Deserializes from a stream.

Declaration
public static DirectedMetaGraph Deserialize(Stream stream, DirectedMetaGraphProfile profile)
Parameters
System.IO.Stream stream

DirectedMetaGraphProfile profile

Returns
DirectedMetaGraph

Dispose()

Disposes.

Declaration
public void Dispose()

GetEdgeEnumerator()

Gets an empty edge enumerator.

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

GetEdgeEnumerator(UInt32)

Gets an edge enumerator for the given vertex.

Declaration
public DirectedMetaGraph.EdgeEnumerator GetEdgeEnumerator(uint vertex)
Parameters
System.UInt32 vertex

Returns
DirectedMetaGraph.EdgeEnumerator

RemoveEdge(UInt32, UInt32)

Removes the given edge.

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

System.UInt32 vertex2

Returns
System.Int32

RemoveEdges(UInt32)

Removes all edges from/to the given vertex.

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

Returns
System.Int32

Serialize(Stream)

Serializes to a stream.

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

Returns
System.Int64

Serialize(Stream, Boolean)

Serializes to a stream.

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

System.Boolean toReadonly

Returns
System.Int64

Trim()

Resizes the internal data structures to their smallest size possible.

Declaration
public void Trim()

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

Updates and edge's associated data.

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

System.UInt32 vertex2

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

System.UInt32[] data

System.UInt32[] metaData

Returns
System.UInt32

Back to top Built by Itinero, MIT licensed.