Skip to content

Graft is a graph analysis framework written in Rust, designed for high performance and safe concurrency. It provides implementations of classic graph algorithms with modern optimizations.

License

Notifications You must be signed in to change notification settings

SazumiVicky/graft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Graft - High-Performance Graph Analysis Framework

Graft is a graph analysis framework written in Rust, designed for high performance and safe concurrency. It provides implementations of classic graph algorithms with modern optimizations.

🌟 Key Features

  • 🚀 High Performance with built-in concurrency
  • 🔒 Thread-safe using concurrent data structures
  • 📊 Classic Graph Algorithms:
    • Minimum Spanning Tree (Prim's Algorithm)
    • Maximum Flow (Ford-Fulkerson Algorithm)
  • 🧮 Powerful mathematical expression parser
  • 💾 Efficient caching system
  • 🔄 Event-driven architecture

🛠️ Project Structure

src/
├── core/
│   ├── mod.rs       # Core system functionality
│   └── parser.rs    # Mathematical expression parser
└── algorithms/
    └── graph.rs     # Graph algorithms implementation

🚀 Technologies Used

  • Concurrency: parking_lot, crossbeam, rayon
  • Data Structures: petgraph, dashmap
  • Numerics: num-complex
  • Error Handling: thiserror

📥 Installation

Add Graft to your Rust project with:

cargo add graft

💡 Basic Usage Example

use graft::algorithms::Grf;

fn main() {
    // Initialize a new graph
    let mut graph = Grf::new();
    
    // Add nodes
    graph.add_nd(1, 1.0, 0.0, 0.0);
    graph.add_nd(2, 2.0, 1.0, 1.0);
    
    // Add an edge
    graph.add_ed(1, 2, 5.0);
    
    // Calculate Minimum Spanning Tree (MST)
    let mst = graph.mst();
    println!("MST edges: {:?}", mst);
}

⚙️ Concurrency Example

use graft::core::Core;

fn main() {
    let core = Core::new(4); // Initialize with 4 worker threads
    core.start();
    
    // Perform concurrent operations here
    
    core.stop();
}

⚡ Performance

Graft is optimized for:

  • Efficient memory usage
  • Safe, parallel concurrency
  • High throughput for graph operations

🤝 Contribution

We welcome contributions! Follow these steps to contribute:

  1. Fork the repository.
  2. Create a new feature branch (git checkout -b feature/new-feature).
  3. Commit your changes (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature/new-feature).
  5. Open a Pull Request.

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

📧 Contact

Sazumi Viki - @moe.sazumiviki

🔗 Project Link: https://github.com/sazumivicky/graft

🙌 Acknowledgements

Special thanks to these amazing projects:

About

Graft is a graph analysis framework written in Rust, designed for high performance and safe concurrency. It provides implementations of classic graph algorithms with modern optimizations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages