Arborescence.Models
0.15.0
See the version list below for details.
dotnet add package Arborescence.Models --version 0.15.0
NuGet\Install-Package Arborescence.Models -Version 0.15.0
<PackageReference Include="Arborescence.Models" Version="0.15.0" />
paket add Arborescence.Models --version 0.15.0
#r "nuget: Arborescence.Models, 0.15.0"
// Install Arborescence.Models as a Cake Addin #addin nuget:?package=Arborescence.Models&version=0.15.0 // Install Arborescence.Models as a Cake Tool #tool nuget:?package=Arborescence.Models&version=0.15.0
Models — Arborescence Graph Library
This package provides a basic implementation for Graph and Forward Incidence concepts.
┌ tail : E → V?
Graph ┤
└ head : E → V? ┐
├ Forward Incidence
out-edges : V → [E] ┘
SimpleIncidenceGraph
represents a directed multigraph (permitting loops) with edges not having their own identity [1].
IndexedIncidenceGraph
represents a directed multigraph (permitting loops) with edges having their own identity [2].
MutableUndirectedSimpleIncidenceGraph
and MutableUndirectedIndexedIncidenceGraph
provide their mutable undirected counterparts.
Vertices are represented as integers and must fill the range [0..VertexCount).
Edges are stored as incidence lists in contiguous spans.
Basic usage
Let's consider this simple graph:
┌──>──┐
(0) (1)─>─(2)─>─(3)┐
└──<──┘ └<┘
This is how to recreate it in the code:
SimpleIncidenceGraph.Builder builder = new();
builder.Add(1, 2);
builder.Add(1, 2);
builder.Add(2, 1);
builder.Add(2, 3);
builder.Add(3, 3);
SimpleIncidenceGraph graph = builder.ToGraph();
Console.WriteLine(graph.VertexCount);
The expected output is 4
— including vertex 0 even if it was not mentioned while creating the graph.
Vertex count is determined as one plus the max id of the vertices, so they fill the range [0..VertexCount).
Now let's explore the edges incident to vertex 2:
const int vertex = 2;
var edgeEnumerator = graph.EnumerateOutEdges(vertex);
while (edgeEnumerator.MoveNext())
{
Endpoints edge = edgeEnumerator.Current;
Debug.Assert(graph.TryGetTail(edge, out int tail) &&
tail == vertex);
if (graph.TryGetHead(edge, out int head))
Console.WriteLine(head);
}
The expected output — all the neighbors of vertex 2:
1
3
[1] https://en.wikipedia.org/wiki/Multigraph#Directed_multigraph_(edges_without_own_identity)
[2] https://en.wikipedia.org/wiki/Multigraph#Directed_multigraph_(edges_with_own_identity)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net46 was computed. net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Arborescence.Abstractions (>= 0.15.0)
- Arborescence.Primitives (>= 0.15.0)
-
.NETFramework 4.6.1
- Arborescence.Abstractions (>= 0.15.0)
- Arborescence.Primitives (>= 0.15.0)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
-
.NETStandard 1.3
- Arborescence.Abstractions (>= 0.15.0)
- Arborescence.Primitives (>= 0.15.0)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
-
.NETStandard 2.0
- Arborescence.Abstractions (>= 0.15.0)
- Arborescence.Primitives (>= 0.15.0)
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.5)
-
.NETStandard 2.1
- Arborescence.Abstractions (>= 0.15.0)
- Arborescence.Primitives (>= 0.15.0)
-
net6.0
- Arborescence.Abstractions (>= 0.15.0)
- Arborescence.Primitives (>= 0.15.0)
-
net7.0
- Arborescence.Abstractions (>= 0.15.0)
- Arborescence.Primitives (>= 0.15.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Arborescence.Models:
Package | Downloads |
---|---|
Arborescence.Models.Specialized
Special graph data structures that provide efficient implementation when vertices are integers from a contiguous range. Commonly used types: • Int32AdjacencyGraph • Int32IncidenceGraph |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.17.0 | 239 | 1/11/2024 |
0.16.5 | 180 | 1/7/2024 |
0.16.4 | 194 | 1/2/2024 |
0.16.3 | 166 | 1/1/2024 |
0.16.2 | 251 | 7/28/2023 |
0.16.1 | 288 | 6/11/2023 |
0.16.0 | 229 | 6/4/2023 |
0.15.0 | 337 | 1/17/2023 |
0.14.1 | 345 | 1/10/2023 |
0.14.0 | 314 | 1/7/2023 |
0.13.1 | 406 | 7/6/2021 |
0.13.0 | 414 | 6/27/2021 |
0.11.0 | 486 | 5/30/2021 |
0.10.0 | 424 | 5/29/2021 |
0.9.0 | 407 | 1/15/2021 |
0.8.0 | 431 | 1/6/2021 |
0.7.1 | 502 | 12/26/2020 |
0.7.0 | 554 | 12/25/2020 |
0.6.0 | 487 | 11/9/2020 |
0.5.0 | 496 | 10/24/2020 |
0.4.2 | 567 | 10/20/2020 |
0.4.1 | 548 | 10/14/2020 |
0.4.0 | 534 | 9/24/2020 |
0.3.2 | 502 | 9/6/2020 |
0.3.1 | 577 | 8/12/2020 |
0.3.0 | 512 | 7/30/2020 |
0.2.0 | 520 | 7/19/2020 |