Giter Site home page Giter Site logo

zigrazor / cxxgraph Goto Github PK

View Code? Open in Web Editor NEW
395.0 395.0 95.0 69.16 MB

Header-Only C++ Library for Graph Representation and Algorithms

Home Page: https://zigrazor.github.io/CXXGraph/

License: GNU Affero General Public License v3.0

CMake 0.75% C++ 97.77% Shell 0.18% C 1.30%
algorithm algorithms bfs-algorithm cpp cpp-library cpp17 cycle-detection dfs-algorithm dijkstra-algorithm graph graph-algorithms graph-analysis graph-theory-algorithms hacktoberfest hacktoberfest-accepted header-only machine-learning partitioning partitioning-algorithms search-algorithm

cxxgraph's Introduction

Hi 👋, I'm Zig Razor

I'm a Software Engineer. I love programming, and low level problems. I'm interested in CyberSecurity, Machine Learning, Advanced Algorithms.

ZigRazor StackOverflow

HackerRank

zigrazor

DEV.to Blog Post

StackOverflow Post

⚡ Recent Activity

  1. ❗ Opened issue #417 in ZigRazor/CXXGraph
  2. 🗣 Commented on #415 in ZigRazor/CXXGraph
  3. 🎉 Merged PR #23 in ZigRazor/JTaskFlow
  4. 🗣 Commented on #416 in ZigRazor/CXXGraph
  5. 🔒 Closed issue #415 in ZigRazor/CXXGraph

Connect with me:

Languages and Tools:

android bash c cplusplus firebase git gtk hadoop java kotlin linux mysql photoshop postman python pytorch qt rabbitMQ rails ruby scala scikit_learn sqlite tensorflow

zigrazor

 zigrazor

zigrazor

cxxgraph's People

Contributors

alfredcp avatar aryangithub avatar badumbatish avatar code-factor avatar daniepin avatar dependabot[bot] avatar dishantdhillon avatar edogawashinichi avatar erikdervishi03 avatar gitter-badger avatar gonzalo-mier avatar grufoony avatar guru2396 avatar joechai93 avatar kamari-a avatar mrdragon1 avatar nolankramer avatar nrkramer avatar oliviacarino avatar pavan-pan avatar perhapsmaple avatar pradkrish avatar salonithete avatar sandeep-blackhat avatar sarthak17jain avatar sbaldu avatar sidml avatar suncanghuai avatar thesmartdeveloperr avatar zigrazor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cxxgraph's Issues

Add Test on Node Class

There is the necessity to write more test on Node class.
Specialy on limit case.
Any contribution is appreciated.

Compilation Error on Graph_TS.hpp

After merge the #73, it not compile anymore.

The error is the following:

In file included from /home/runner/work/CXXGraph/CXXGraph/include/CXXGraph.hpp:12,
                 from /home/runner/work/CXXGraph/CXXGraph/test/GraphTest.cpp:2:
/home/runner/work/CXXGraph/CXXGraph/include/Graph/Graph_TS.hpp: In instantiation of ‘const BellmanFordResult CXXGRAPH::Graph_TS<T>::bellmanford(const CXXGRAPH::Node<T>&, const CXXGRAPH::Node<T>&) const [with T = int; CXXGRAPH::BellmanFordResult = CXXGRAPH::BellmanFordResult_struct]’:
/home/runner/work/CXXGraph/CXXGraph/include/Graph/Graph_TS.hpp:323:29:   required from here
/home/runner/work/CXXGraph/CXXGraph/include/Graph/Graph_TS.hpp:326:46: error: ‘bellmanFord’ is not a member of ‘CXXGRAPH::Graph<int>’
  326 |         auto bellford = Graph<T>::bellmanFord(source, target);
      |                         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

Implement statistic results of the partition

Request of implementation of statistic results of the partition.
For example Vertex/Node Replication, Replication Factor, Max and Min load of partitions(balance), and other scores.

Add FP-GraphMiner algorithm

FP-GraphMiner - A Fast Frequent Pattern Mining Algorithm for Network Graphs

A novel Frequent Pattern Graph Mining algorithm, FP-GraphMiner, that compactly
represents a set of network graphs as a Frequent Pattern Graph (or FP-Graph).
This graph can be used to efficiently mine frequent subgraphs including maximal
frequent subgraphs and maximum common subgraphs.

URL: https://www.researchgate.net/publication/235255851

You can take inspiration from this :
https://github.com/TheAlgorithms/Python/blob/master/graphs/frequent_pattern_graph_miner.py

Add Tests on BFS Algorithm

There is the necessity to write more test on BFS Algorithm.
Specialy on limit case.
Any contribution is appreciated.

Graph Slicing based on connectivity

Add graph slicing based on connectivity.
E.g. given
A -> B -> C <- D
A -> E -> C -> F
and the starting node A: A, B, and E can be sliced off.
Mathematical definition of the problem:
Let G be the set of nodes in a graph and n be a given node in that set. Let C be the non-strict subset of G containing both n and all nodes reachable from n, and let C' be its complement. There's a third set M, which is the non-strict subset of C containing all nodes that are reachable from any node in C'.
The problem consists of finding all nodes that belong to C but not to M.

The reason why this problem is relevant is because it's used in garbage collection systems to decide which other objects need to be released, given that one object is about to be released.

Add Tests on DFS Algorithms

There is the necessity to write more test on DFS Algorithm.
Specialy on limit case.
Any contribution is appreciated.

Add Tarjan's algorithm

Tarjan's algorithm for finding strongly connected components in a directed graph
Uses two main attributes of each node to track reachability, the index of that node
within a component(index), and the lowest index reachable from that node(lowlink).
We then perform a dfs of the each component making sure to update these parameters
for each node and saving the nodes we visit on the way.
If ever we find that the lowest reachable node from a current node is equal to the
index of the current node then it must be the root of a strongly connected
component and so we save it and it's equireachable vertices as a strongly
connected component.

Readme for Bellman-Ford Algorithm

It's needed to add the section for Bellman-Ford Algorithm in the Readme.
With an accurate description and useful links to understand it.

Add Tests to Djikstra Algorithm

There is the necessity to write more test on Djikstra Algorithm.
Specialy on limit case.
Any contribution is appreciated.

Prim's algorithm for finding minimum spanning tree

Applications of Prim's algorithm

  • Traveling Salesman Problem
  • If you want to connect several cities using highways or rail networks, you can use these algos to find the minimum length of roads/railtracks connecting all these cities.
  • You want to apply a set of houses with - Electric Power, Telephone Lines, Sewage Lines.

Useful links:

Possible deadlock in thread safe algorithms

When I try replacing CXXGRAPH::Graph with CXXGRAPH::Graph_TS in the dijkstra/bellman-ford tests, the algorithm seems to freeze. It could be because of possible deadlock while calling thread safe functions like getNodeSet. The algorithm has already acquired the lock, so when getNodeSet again tries to acquire lock, it results in a dead-lock.
It will be great if someone can investigate and correct the issue.

Add tests on Dial Algorithm

There is the necessity to write more test on Dial Algorithm.
Specialy on limit case.
Any contribution is appreciated.

Add Eulerian Path algorithm

Eulerian Path is a path in graph that visits every edge exactly once.
Eulerian Circuit is an Eulerian Path which starts and ends on the same vertex.
time complexity is O(V+E)
space complexity is O(VE)

Add Borůvka's algorithm

Borůvka's algorithm.

Determines the minimum spanning tree (MST) of a graph using the Borůvka's algorithm.
Borůvka's algorithm is a greedy algorithm for finding a minimum spanning tree in a
connected graph, or a minimum spanning forest if a graph that is not connected.
The time complexity of this algorithm is O(ELogV), where E represents the number
of edges, while V represents the number of nodes.
O(number_of_edges Log number_of_nodes)
The space complexity of this algorithm is O(V + E), since we have to keep a couple
of lists whose sizes are equal to the number of nodes, as well as keep all the
edges of a graph inside of the data structure itself.
Borůvka's algorithm gives us pretty much the same result as other MST Algorithms -
they all find the minimum spanning tree, and the time complexity is approximately
the same.
One advantage that Borůvka's algorithm has compared to the alternatives is that it
doesn't need to presort the edges or maintain a priority queue in order to find the
minimum spanning tree.
Even though that doesn't help its complexity, since it still passes the edges logE
times, it is a bit simpler to code.
Details: [Wikipedia](https://en.wikipedia.org/wiki/Bor%C5%AFvka%27s_algorithm)

Add Tests On Graphs

There is the necessity to write more test on Graph class.
Specialy on limit case.
Any contribution is appreciated.

Thread Safety

Add Thread Safety to the graph critical operations

Add Tests on Edge Class

There is the necessity to write more test on Edge class.
Specialy on limit case.
Any contribution is appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.