All Projects → purpleprotocol → Graphlib

purpleprotocol / Graphlib

Licence: mit
Simple but powerful graph library for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Graphlib

Esp Dash
A blazing fast library to create a functional dashboard for ESP8266 and ESP32
Stars: ✭ 548 (+270.27%)
Mutual labels:  graph, library
Lib9wada
Wonderful library with lots of useful functions, algorithms and data structures in C, link it with -l9wada
Stars: ✭ 35 (-76.35%)
Mutual labels:  data-structures, library
Dsa.js Data Structures Algorithms Javascript
🥞Data Structures and Algorithms explained and implemented in JavaScript + eBook
Stars: ✭ 6,251 (+4123.65%)
Mutual labels:  graph, data-structures
Algodeck
An Open-Source Collection of 200+ Algorithmic Flash Cards to Help you Preparing your Algorithm & Data Structure Interview 💯
Stars: ✭ 4,441 (+2900.68%)
Mutual labels:  graph, data-structures
Interview Guide
Coding/technical interview guide: data structures, algorithms, complexity analyses, interview questions
Stars: ✭ 54 (-63.51%)
Mutual labels:  graph, data-structures
C Sharp Algorithms
📚 📈 Plug-and-play class-library project of standard Data Structures and Algorithms in C#
Stars: ✭ 4,684 (+3064.86%)
Mutual labels:  graph, data-structures
Algorithms
Study cases for Algorithms and Data Structures.
Stars: ✭ 32 (-78.38%)
Mutual labels:  graph, data-structures
Androidplot
Charts and plots for Android
Stars: ✭ 381 (+157.43%)
Mutual labels:  graph, library
Geeksforgeeks Dsa 2
This repository contains all the assignments and practice questions solved during the Data Structures and Algorithms course in C++ taught by the Geeks For Geeks team.
Stars: ✭ 53 (-64.19%)
Mutual labels:  graph, data-structures
Algorithms
Solved algorithms and data structures problems in many languages
Stars: ✭ 1,021 (+589.86%)
Mutual labels:  graph, data-structures
Graph
Graph algorithms and data structures
Stars: ✭ 431 (+191.22%)
Mutual labels:  data-structures, library
Best Of Python
🏆 A ranked list of awesome Python open-source libraries and tools. Updated weekly.
Stars: ✭ 1,869 (+1162.84%)
Mutual labels:  data-structures, library
Competitive coding
This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding.
Stars: ✭ 393 (+165.54%)
Mutual labels:  graph, data-structures
Competitiveprogramming
A collection of algorithms, data structures and other useful information for competitive programming.
Stars: ✭ 475 (+220.95%)
Mutual labels:  data-structures, library
Java Algorithms Implementation
Algorithms and Data Structures implemented in Java
Stars: ✭ 3,927 (+2553.38%)
Mutual labels:  graph, data-structures
Arabiccompetitiveprogramming
The repository contains the ENGLISH description files attached to the video series in my ARABIC algorithms channel.
Stars: ✭ 675 (+356.08%)
Mutual labels:  data-structures, library
Algorithms.js
Atwood's Law applied to CS101 - Classic algorithms and data structures implemented in JavaScript
Stars: ✭ 3,322 (+2144.59%)
Mutual labels:  graph, data-structures
Towel
Throw in the towel.
Stars: ✭ 333 (+125%)
Mutual labels:  data-structures, library
Libgenerics
libgenerics is a minimalistic and generic library for C basic data structures.
Stars: ✭ 42 (-71.62%)
Mutual labels:  data-structures, library
Cog
A Persistent Embedded Graph Database for Python
Stars: ✭ 90 (-39.19%)
Mutual labels:  graph, library

Graphlib

Build Status Discord Badge Latest Version Documentation

Graphlib is a simple and powerful Rust graph library.


This library attempts to provide a generic api for building, mutating and iterating over graphs that is similar to that of other data-structures found in Rust i.e. Vec, HashMap, VecDeque, etc.

Using Graphlib

use graphlib::Graph;

let mut graph: Graph<usize> = Graph::new();

// Add two vertices to the graph
let id1 = graph.add_vertex(1);
let id2 = graph.add_vertex(2);

// Add an edge between the two vertices
graph.add_edge(&id1, &id2);

assert_eq!(*graph.fetch(&id1).unwrap(), 1);
assert_eq!(*graph.fetch(&id2).unwrap(), 2);

// The graph has 2 vertices and one edge at this point
assert_eq!(graph.vertex_count(), 2);
assert_eq!(graph.edge_count(), 1);

// Remove one of the connected vertices
graph.remove(&id1);

assert_eq!(graph.vertex_count(), 1);
assert_eq!(graph.edge_count(), 0);

Using without std

In Cargo.toml:

[dependencies]
graphlib = { version = "*", features = ["no_std"] }

Contributing

We welcome anyone wishing to contribute to Graphlib! Check out the issues section of the repository before starting out.

License

Graphlib is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].