CrawfisSoftware.BasicGraphs 1.2.0

dotnet add package CrawfisSoftware.BasicGraphs --version 1.2.0
                    
NuGet\Install-Package CrawfisSoftware.BasicGraphs -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CrawfisSoftware.BasicGraphs" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CrawfisSoftware.BasicGraphs" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="CrawfisSoftware.BasicGraphs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CrawfisSoftware.BasicGraphs --version 1.2.0
                    
#r "nuget: CrawfisSoftware.BasicGraphs, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CrawfisSoftware.BasicGraphs@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CrawfisSoftware.BasicGraphs&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=CrawfisSoftware.BasicGraphs&version=1.2.0
                    
Install as a Cake Tool

CrawfisSoftware.BasicGraphs

Small, experimental graph library used to explore alternative implementations of IGraph (and indexed variants) compared to the IGraph implementation used in the Grid project.

The intent of this repo is to keep the graph query/traversal surface (IGraph / IIndexedGraph) small and algorithm-friendly, while separating construction and mutation concerns into builder-style types. This makes it easier to reuse the same graph algorithms across multiple backing representations.

What this repo contains

Core interfaces (read-only usage)

  • IGraph<N,E>: Graph API based on node labels (N) and edge labels (E). Optimized for algorithms that work with arbitrary node types.
  • IEdge<N,E>: Edge view with From, To, and Value.

Mutable label-based graph

  • Graph<N,E>: A simple, mutable implementation of IGraph<N,E>.
    • Nodes are added via AddNode(N).
    • Edges are added via AddEdge(from, to, edgeLabel, undirected: true).
    • Intended as a straightforward reference implementation.

Wrapper over a plain adjacency list

  • SimpleGraph: An IGraph<int,int> wrapper over an external adjacency list (IList<ICollection<int>>).
    • This intentionally demonstrates a minimal backing store.
    • Does not support Parents(...) or InEdges(...) (throws) because the representation does not store that information.

Indexed graphs (algorithm-friendly)

Many graph algorithms are simpler and faster when nodes are represented by stable integer indices. This repo provides an indexed graph abstraction:

  • IIndexedGraph<N,E>: Read-only API where nodes are int indices, with optional node labels (N) and edge labels (E).
  • IIndexedEdge<E> / IndexedEdge<E>: Edge view using From, To indices.

Implementations:

  • AdjacencyListIndexedGraph<N,E>: Immutable-ish adjacency-list based indexed graph. Optionally treats the graph as undirected.
  • CompleteIndexedGraph<N,E>: Lightweight complete graph backed by functions (Func<int,N> for nodes, Func<int,int,E> for edges) rather than stored adjacency.

Construction (separate from IGraph / IIndexedGraph)

  • GraphBuilder<N,E>: Incremental builder that collects nodes and edges into adjacency lists, then produces an IIndexedGraph<N,E> via GetGraph().
    • This is the main example of keeping “build/change” out of the query interface.

Notes / non-goals

  • This repo is deliberately small and focused on representation experiments.
  • It is not intended to be a full-featured graph framework (no algorithm suite here).
  • API surface is oriented toward being consumed by the separate “Graph algorithms” repo.

Build

dotnet build
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 95 1/26/2026
0.1.1 103 1/7/2026

Please see CHANGELOG.md for release details.