Skip to content

CinderPeak is a fast and efficient, open-source C++ graph library designed to handle directed, undirected, and mixed graphs with customizable vertex and edge types.

License

Notifications You must be signed in to change notification settings

SharonIV0x86/CinderPeak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

CinderPeak: A Modern C++ Graph Library

A fast and efficient, open-source C++ graph library built to handle a wide range of graph types. It provides a flexible, templated API for graph manipulation, analysis, and visualization.

License C++ Dependencies


πŸ“‘ Table of Contents

  • πŸš€ Key Features
  • πŸ—“οΈ Development Notice
  • πŸ“‚ Project Structure
  • βš™οΈ Getting Started
  • πŸ› οΈ Technology Stack
  • ❓ Why CinderPeak?
  • πŸ§‘β€πŸ’» Community & Contributions
  • πŸ“„ License

πŸš€ Key Features

  • Flexible Graph Representations - Supports adjacency lists, adjacency matrices, and hybrid CSR/COO formats for efficient storage.
  • Customizable & Templated - Fully templated design allows you to define custom vertex and edge types.
  • Integrated Visualization - An integrated SFML-based engine for real-time graph rendering, making it easy to visualize your data.
  • Thread Safety - Designed to work seamlessly in multi-threaded applications.
  • High Performance - Leverages modern C++ features like smart pointers and STL containers for optimized execution.
  • Comprehensive Testing - Built with Google Test (GTest) to ensure reliability and robustness.
  • Extensive Documentation - Detailed usage guides, examples, and API references are hosted with Docusaurus.

Example

#include <iostream>
#include "CinderPeak.hpp"

using namespace CinderPeak::PeakStore;
using namespace CinderPeak;

// Custom vertex & edge
class CustomVertex : public CinderVertex {
public:
    int data;
    CustomVertex(int d = 0) : data(d) {}
};
class CustomEdge : public CinderEdge {
public:
    int weight;
    CustomEdge(int w = 0) : weight(w) {}
};

int main() {
    GraphCreationOptions opts({
        GraphCreationOptions::Undirected,
        GraphCreationOptions::Weighted
    });

    // --- Custom Types ---
    GraphMatrix<CustomVertex, CustomEdge> customGraph(opts);
    CustomVertex A(1), B(2);
    customGraph.addVertex(A);
    customGraph.addVertex(B);
    customGraph[A][B] = CustomEdge(1290);
    std::cout << "CustomGraph Edge Weight: "
              << customGraph.getEdge(A, B).weight << "\n";

    // --- Primitive Types ---
    GraphMatrix<int, int> intGraph(opts);
    intGraph.addVertex(1);
    intGraph.addVertex(2);
    intGraph.addEdge(1, 2, 10);
    std::cout << "IntGraph Edge Weight: " << intGraph[1][2] << "\n";

    return 0;
}

πŸ—“οΈ Development Notice

CinderPeak is currently under active development. We are committed to delivering a polished and comprehensive release. The stable version, with refined functionalities and complete documentation, is scheduled to be available soon.


πŸ“‚Project Structure

/CinderPeak
β”œβ”€β”€ CMakeLists.txt              # Build system configuration
β”œβ”€β”€ docs                        # Docusaurus documentation
β”‚   β”œβ”€β”€ examples
β”‚   β”‚   └── GraphMatrixExample.md  # Example usage for GraphMatrix
β”‚   β”œβ”€β”€ GraphList.md            # Adjacency List documentation
β”‚   β”œβ”€β”€ GraphMatrix.md          # Adjacency Matrix documentation
β”‚   β”œβ”€β”€ index.md                # Main documentation page
β”‚   β”œβ”€β”€ installation.md         # Installation guide
β”‚   └── usage.md                # Usage guide
β”œβ”€β”€ examples                    # Sample code demonstrating usage
β”‚   β”œβ”€β”€ CMakeLists.txt          # Build config for examples
β”‚   β”œβ”€β”€ extras
β”‚   β”‚   β”œβ”€β”€ COOExample.cpp      # Coordinate List example
β”‚   β”‚   β”œβ”€β”€ CSRExample.cpp      # Compressed Sparse Row example
β”‚   β”‚   β”œβ”€β”€ LogExample.cpp      # Logging utility example
β”‚   β”‚   └── PeakExample.cpp     # General CinderPeak usage example
β”‚   β”œβ”€β”€ ListExample1.cpp        # Adjacency List example
β”‚   β”œβ”€β”€ MatrixExample.cpp       # Adjacency Matrix example
β”‚   └── PrimitiveGraph.cpp      # Basic graph example
β”œβ”€β”€ src                         # Source files
β”‚   β”œβ”€β”€ ArialFontDataEmbed.hpp  # Embedded font data for visualization
β”‚   β”œβ”€β”€ CinderExceptions.hpp    # Custom exception handling
β”‚   β”œβ”€β”€ CinderPeak.hpp          # Main API entry point
β”‚   β”œβ”€β”€ GraphList.hpp           # Adjacency List implementation
β”‚   β”œβ”€β”€ GraphMatrix.hpp         # Adjacency Matrix implementation
β”‚   β”œβ”€β”€ PeakLogger.hpp          # Logging utility
β”‚   β”œβ”€β”€ PeakStore.hpp           # Core storage engine
β”‚   β”œβ”€β”€ StorageEngine
β”‚   β”‚   β”œβ”€β”€ AdjacencyList.hpp   # Adjacency List storage
β”‚   β”‚   β”œβ”€β”€ CoordinateList.hpp  # Coordinate List storage
β”‚   β”‚   β”œβ”€β”€ ErrorCodes.hpp      # Error handling codes
β”‚   β”‚   β”œβ”€β”€ GraphContext.hpp    # Graph context management
β”‚   β”‚   β”œβ”€β”€ HybridCSR_COO.hpp   # Hybrid CSR/COO storage
β”‚   β”‚   └── Utils.hpp           # Utility functions
β”‚   β”œβ”€β”€ StorageInterface.hpp    # Storage interface definition
β”‚   └── Visualizer.hpp          # SFML-based visualization engine
β”œβ”€β”€ tests                       # Unit tests
β”‚   β”œβ”€β”€ AdjacencyShard.cpp      # Tests for adjacency list
β”‚   β”œβ”€β”€ CoordinateShard.cpp     # Tests for coordinate list
β”‚   β”œβ”€β”€ HybridShard.cpp         # Tests for hybrid CSR/COO
β”‚   └── tests.cpp               # Main test suite
β”œβ”€β”€ README.md                   # Project overview and setup
└── LICENSE                     # License file

βš™οΈ Getting Started

  1. Installation: Follow the installation guide to set up CinderPeak with CMake.
  2. Usage: Check the usage guide for API details and the examples directory for sample code.
  3. Documentation: Explore the full documentation hosted with Docusaurus in the docs directory.

πŸ› οΈ Technology Stack

  • C++17/C++20: Leverages modern C++ features for performance and flexibility.
  • SFML: Powers the integrated visualization engine.
  • Google Test: Provides the framework for robust unit testing.
  • Docusaurus: Hosts comprehensive documentation with examples and API references.
  • CMake: Used for the cross-platform build system.

❓ Why CinderPeak?

CinderPeak strikes a balance between performance, flexibility, and ease of use. Whether you're building complex network models, analyzing graph-based data, or visualizing relationships, CinderPeak provides a robust and intuitive solution. Its open-source nature encourages community contributions, and its modular design makes it easy to extend for specialized use cases.


πŸ§‘β€πŸ’» Community & Contributions

We welcome contributions! See the CONTRIBUTING.md file for guidelines on how to get involved. Join the CinderPeak community on GitHub to report issues, suggest features, or contribute code.


🌟 Contributors


πŸ“„ License

This project is licensed under the MIT License.

About

CinderPeak is a fast and efficient, open-source C++ graph library designed to handle directed, undirected, and mixed graphs with customizable vertex and edge types.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages