ZigRazor / CXXGraph

Header-Only C++ Library for Graph Representation and Algorithms
https://zigrazor.github.io/CXXGraph/
Mozilla Public License 2.0
461 stars 113 forks source link

Header file to check if a Graph is Biparatite (Bi-colourable) #464

Open THIRU-1074 opened 1 month ago

THIRU-1074 commented 1 month ago

A graph is bipartite if the nodes can be partitioned into two independent sets A and B such that every edge in the graph connects a node in Set A and a node in Set B.

https://en.wikipedia.org/wiki/Bipartite_graph

THIRU-1074 commented 1 month ago

@ZigRazor please assign this to me !

ZigRazor commented 1 month ago

yes

THIRU-1074 commented 1 month ago

To implement this I need to check for odd nodes cycles in the graph therefore I have made another logic for the detecting those type of cycles. I can't include and use available cycle detection headers for this algorithm is that fine ? Should I make separate header for detecting even or odd nodes cycle and include in bipartite or shall I define in the same header itself.

ZigRazor commented 1 month ago

it's ok to define in the same header file