ZigRazor / CXXGraph

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

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

Open THIRU-1074 opened 3 months ago

THIRU-1074 commented 3 months 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 3 months ago

@ZigRazor please assign this to me !

ZigRazor commented 3 months ago

yes

THIRU-1074 commented 3 months 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 3 months ago

it's ok to define in the same header file