A Graph implemented using nothing but `Vec`s in rust

Overview

VecGraph

A Graph implemented using nothing but Vecs in rust.

Details

The graph is implemented using two Vecs: nodes and edges.

nodes stores "nodes". which are just data points. edges stores EdgeDatas. Which is just a Vec of usize. representing all the indices of nodes that a particular node points to. The node and its edges are associated by having the same index. so edges of the node at index 0 are present in the EdgeData at index 0.

For Example Let's say we have a graph with four nodes. So we would have four items in the nodes Vec, and four EdgeData items in the edges Vec.

nodes = [Node0, Node1, Node2, Node3]
edges = [EdgeData0 = [], EdgeData1 = [], EdgeData2 = [], EdgeData3 = []]

Remember that EdgeData is just a Vec of usize.

Now let's say that Node0 is connected to Node1 and Node3, and that Node3 is connected to Node0 and Node2. Our Graph will look like this:

nodes = [Node0, Node1, Node2, Node3]
edges = [EdgeData0 = [1, 3], EdgeData1 = [], EdgeData2 = [], EdgeData3 = [0, 2]]
You might also like...
A fast, lightweight and extensible implementation of a graph data structure.

fast-graph A fast, lightweight and extensible implementation of a graph data structure. Note ⚠️ There will be some breaking changes in the coming 1-2

Pathfinding library for calculating all node pairs' shortest paths in an unweighted undirected graph.

bit_gossip bit_gossip, named after its implementation technique, is a simple pathfinding library for calculating all node pairs' shortest paths in an

A vector graphics renderer using OpenGL with a Rust & C API.
A vector graphics renderer using OpenGL with a Rust & C API.

bufro A vector graphics renderer using OpenGL with a Rust & C API. A Rust example can be found in examples/quickstart.rs (using glutin). A C example c

ASCII 3D-renderer using Ray Marching technique written in Rust with NCurses
ASCII 3D-renderer using Ray Marching technique written in Rust with NCurses

pistol ASCII renderer using Ray Marching technique written in Rust 🦀 with NCurses. This project is a giga-chad compared to my previous attempt to wri

A universe that consists of meta knowledge domains from Stack Exchange, made using Bevy with
A universe that consists of meta knowledge domains from Stack Exchange, made using Bevy with

Stack of Knowledge Universe A universe that consists of meta knowledge domains from Stack Exchange, made using Bevy with ❤️ . Setup Remove .placeholde

Real-time 3D orientation visualization of a BNO055 IMU using Bissel and Bevy
Real-time 3D orientation visualization of a BNO055 IMU using Bissel and Bevy

orientation This is a demonstration of real-time visualization of the attitude of a BNO055 IMU across a wireless network to a Bevy app using the Bisse

Python library for embedding large graphs in 2D space, using force-directed layouts.

Graph Force A python/rust library for embedding graphs in 2D space, using force-directed layouts. Installation pip install graph_force Usage The first

A toy ray tracer in Rust
A toy ray tracer in Rust

tray_rust - A Toy Ray Tracer in Rust tray_rust is a toy physically based ray tracer built off of the techniques discussed in Physically Based Renderin

A low-overhead Vulkan-like GPU API for Rust.
A low-overhead Vulkan-like GPU API for Rust.

Getting Started | Documentation | Blog gfx-rs gfx-rs is a low-level, cross-platform graphics and compute abstraction library in Rust. It consists of t

Owner
null
Graph data structure library for Rust.

petgraph Graph data structure library. Supports Rust 1.41 and later. Please read the API documentation here Crate feature flags: graphmap (default) en

null 2k Jan 9, 2023
A graph library for Rust.

Gamma A graph library for Rust. Gamma provides primitives and traversals for working with graphs. It is based on ideas presented in A Minimal Graph AP

Metamolecular, LLC 122 Dec 29, 2022
🦀 Rust Graph Routing runtime for Apollo Federation 🚀

Apollo Router The Apollo Router is a configurable, high-performance graph router for a federated graph. Getting started Follow the quickstart tutorial

Apollo GraphQL 502 Jan 8, 2023
Graph API client writen in Rust

graph-rs Now available on stable Rust at crates.io graph-rs-sdk = "0.1.0" 0.1.0 and above use stable Rust. Anything before 0.1.0 uses nightly Rust. M

Sean Reeise 56 Jan 3, 2023
Rust library for of graph ensembles

Rust library for random graph ensembles Minimal Rust version: 1.55.0 Implements simple sampling and monte carlo (or rather markov-) steps, that can be

Yannick Feld 2 Dec 14, 2022
GraphScope: A One-Stop Large-Scale Graph Computing System from Alibaba

A One-Stop Large-Scale Graph Computing System from Alibaba GraphScope is a unified distributed graph computing platform that provides a one-stop envir

Alibaba 2.2k Jan 1, 2023
A simple and elegant, pipewire graph editor

pw-viz A simple and elegant, pipewire graph editor This is still a WIP, node layouting is kinda jank at the moment. Installation A compiled binary is

null 180 Dec 27, 2022
A graph crate with simplicity in mind

A graph crate with simplicity in mind. Prepona aims to be simple to use (for users of the crate) and develop further (for contributors). Nearly every

Mohamad Amin Rayej 80 Dec 15, 2022
Simple, performant graph generator for Feynman diagrams* ⚛️

Feynman diagram generator ⚛️ A simple generator of "Feynman diagram" permutations (as defined by problem 781). Incrementally builds isomorphically uni

eugene huang 3 Jan 1, 2023
Theorem relational dependencies automatic extraction and visualization as a graph for Lean4.

Lean Graph Interactive visualization of dependencies for any theorem/definitions in your Lean project. How to use In your browser: lean-graph.com Or r

Patrik Číhal 8 Jan 3, 2024