Skip to content

Commit e9198c5

Browse files
committed
WIP
1 parent fb51cb0 commit e9198c5

32 files changed

+3583
-245
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
name: Tests
1+
name: Run Tests
22

33
on:
44
workflow_dispatch: { } # Allow manual execution
55
workflow_call: # Make this workflow callable from other workflows
6+
push:
7+
tags:
8+
- 'v*' # Trigger on version tags
69

710
jobs:
811
build:

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ binaries = []
4141
ctor = "0.2.9"
4242
tracing = "0.1.41"
4343
tracing-subscriber = "0.3.19"
44-
petgraph = { version = "0.7.1", features = ["graphmap", "stable_graph", "matrix_graph", "serde-1", "rayon"] }
4544
rand = "0.9.0"
4645
sprs = "0.11.3"
46+
ordered-float = "5.0.0"
47+
rayon = "1.10.0"
48+
nalgebra = "0.33.2"
49+
petgraph = { version = "0.7.1", features = ["graphmap", "stable_graph", "matrix_graph", "serde-1", "rayon"] }
4750

4851
[dev-dependencies]
4952
criterion = { version = "0.5", features = ["html_reports"] }

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ format: ## Format Rust files
2222
.PHONY: test
2323
test: format ## Run tests
2424
@echo "Running tests..."
25-
DEBUG_GRAPHINA=$(DEBUG_GRAPHINA) RUST_BACKTRACE=$(RUST_BACKTRACE) cargo test -- --nocapture
25+
DEBUG_GRAPHINA=$(DEBUG_GRAPHINA) RUST_LOG=debug RUST_BACKTRACE=$(RUST_BACKTRACE) cargo test -- --nocapture
2626

2727
.PHONY: coverage
2828
coverage: format ## Generate test coverage report

README.md

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Graphina
22

33
[![Tests](https://img.shields.io/github/actions/workflow/status/habedi/graphina/tests.yml?label=tests&style=popout-square&logo=github)](https://github.com/habedi/graphina/actions/workflows/tests.yml)
4+
[![Lint](https://img.shields.io/github/actions/workflow/status/habedi/graphina/lint.yml?label=lint&style=popout-square&logo=github)](https://github.com/habedi/graphina/actions/workflows/lint.yml)
45
[![Code Coverage](https://img.shields.io/codecov/c/github/habedi/graphina?style=popout-square&logo=codecov)](https://codecov.io/gh/habedi/graphina)
56
[![CodeFactor](https://img.shields.io/codefactor/grade/github/habedi/graphina?style=popout-square&logo=codefactor)](https://www.codefactor.io/repository/github/habedi/graphina)
67
[![Crates.io](https://img.shields.io/crates/v/graphina.svg?style=popout-square&color=fc8d62&logo=rust)](https://crates.io/crates/graphina)
@@ -23,35 +24,19 @@ set of ready-to-use algorithms for graph analysis and mining.
2324
2425
## Features
2526

26-
* **Graphs**:
27-
- [x] Directed and undirected graphs
28-
- [x] Weighted and unweighted graphs
29-
30-
* **IO**:
31-
- [x] Edge list
32-
- [x] Adjacency list
33-
- [ ] GraphML
34-
- [ ] GML
35-
- [ ] JSON
36-
37-
* **Generators**:
38-
- [x] Erdős–Rényi Graph
39-
- [x] Complete Graph
40-
- [x] Bipartite Graph
41-
- [x] Star Graph
42-
- [x] Cycle Graph
43-
- [x] Watts–Strogatz Graph
44-
- [x] Barabási–Albert Graph
45-
46-
* **Algorithms**:
47-
- [ ] Graph traversal
48-
- [ ] Shortest paths
49-
- [ ] Minimum spanning tree
50-
- [ ] Connected components
51-
- [ ] Clustering, partitioning, and community detection
52-
- [ ] Centrality
53-
- [ ] Graph matching
54-
- [ ] Graph visualization
27+
| Module | Feature | Status | Notes |
28+
|------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|---------------------------------------------|
29+
| [**Types**](src/graph/types.rs) | - ✓ Directed and undirected graphs<br>- ✓ Weighted and unweighted graphs | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | Core graph types |
30+
| [**Exceptions**](src/graph/exceptions.rs) | - ✓ Base exceptions (`GraphinaException`)<br>- ✓ Serious error (`GraphinaError`)<br>- ✓ Pointless concept (`GraphinaPointlessConcept`)<br>- ✓ Algorithm error (`GraphinaAlgorithmError`)<br>- ✓ Unfeasible (`GraphinaUnfeasible`)<br>- ✓ No path (`GraphinaNoPath`)<br>- ✓ No cycle (`GraphinaNoCycle`)<br>- ✓ Node not found (`NodeNotFound`)<br>- ✓ Has a cycle (`HasACycle`)<br>- ✓ Unbounded (`GraphinaUnbounded`)<br>- ✓ Not implemented (`GraphinaNotImplemented`)<br>- ✓ Ambiguous solution (`AmbiguousSolution`)<br>- ✓ Exceeded max iterations (`ExceededMaxIterations`)<br>- ✓ Power iteration failed convergence (`PowerIterationFailedConvergence`) | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | Custom error types for Graphina |
31+
| [**IO**](src/graph/io.rs) | - ✓ Edge list<br>- ✓ Adjacency list<br>- ☐ GraphML<br>- ☐ GML<br>- ☐ JSON | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | I/O routines for reading/writing graph data |
32+
| [**Generators**](src/graph/generators.rs) | - ✓ Erdős–Rényi graph<br>- ✓ Watts–Strogatz graph<br>- ✓ Barabási–Albert graph<br>- ✓ Complete graph<br>- ✓ Bipartite graph<br>- ✓ Star graph<br>- ✓ Cycle graph | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | Generators for random and structured graphs |
33+
| [**Traversal**](src/traversal/) | - ✓ Breadth-first search<br>- ✓ Depth-first search<br>- ✓ Iterative deepening DFS<br>- ✓ Bidirectional search | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | Graph traversal algorithms |
34+
| [**Paths**](src/paths/) | - ✓ Dijkstra's algorithm<br>- ✓ Bellman–Ford algorithm<br>- ✓ Floyd–Warshall algorithm<br>- ✓ Johnson's algorithm<br>- ✓ A* search algorithm<br>- ✓ Iterative deepening A* search algorithm | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | Shortest paths algorithms |
35+
| [**Centrality**](src/centrality/algorithms.rs) | - ✓ Degree centrality<br>- ✓ Closeness centrality<br>- ✓ Betweenness centrality<br>- ✓ Eigenvector centrality<br>- ✓ PageRank<br>- ✓ Katz centrality<br>- ✓ Harmonic centrality<br>- ✓ Local/global reaching centrality<br>- ✓ VoteRank<br>- ✓ Laplacian centrality | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | Centrality measures |
36+
| [**Links**](src/links/algorithms.rs) | - ✓ Resource Allocation Index<br>- ✓ Jaccard Coefficient<br>- ✓ Adamic–Adar Index<br>- ✓ Preferential Attachment<br>- ✓ CN Soundarajan–Hopcroft<br>- ✓ RA Index Soundarajan–Hopcroft<br>- ✓ Within–Inter Cluster Ratio<br>- ✓ Common Neighbor Centrality | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | Link prediction algorithms |
37+
| [**MST**](src/mst/algorithms.rs) | - ✓ Borůvka’s algorithm<br>- ✓ Kruskal’s algorithm<br>- ✓ Prim’s algorithm | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | Minimum spanning tree algorithms |
38+
| [**Community**](src/community/algorithms.rs) | - ✓ Label Propagation<br>- ✓ Louvain Method<br>- ✓ Girvan–Newman algorithm<br>- ✓ Spectral Clustering<br>- ✓ Personalized PageRank<br>- ✓ Infomap<br>- ✓ Connected components | <small>- ☐ Tested<br>- ☐ Benchmarked</small> | Community detection and clustering |
39+
| **Remaining Modules** | - ☐ Graph matching<br>- ☐ Graph visualization | <small>Planned</small> | Future work: additional graph algorithms |
5540

5641
## Installation
5742

0 commit comments

Comments
 (0)