From a8572a8662709eefdd3f723198a038e54aa843df Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Thu, 28 Oct 2021 01:59:14 +0000 Subject: [PATCH] Documentation for a9312b3901fd3237dc2d0dfe6230f026f04b9dc2 --- d5/d88/md__d_i_r_e_c_t_o_r_y.html | 1 + df/dce/namespacegraph.html | 148 +++++++++++++++++ df/dce/namespacegraph.js | 2 + ...4b0551489c613a681cc83b34450da4b_cgraph.map | 4 + ...4b0551489c613a681cc83b34450da4b_cgraph.md5 | 1 + ...4b0551489c613a681cc83b34450da4b_cgraph.svg | 37 +++++ globals_func_i.html | 2 +- globals_i.html | 2 +- namespacemembers.html | 4 +- namespacemembers_func.html | 4 +- navtreedata.js | 2 +- navtreeindex0.js | 60 +++---- navtreeindex1.js | 40 ++--- navtreeindex10.js | 38 ++--- navtreeindex11.js | 24 +-- navtreeindex12.js | 66 ++++---- navtreeindex13.js | 56 +++---- navtreeindex14.js | 150 +++++++++--------- navtreeindex2.js | 48 +++--- navtreeindex3.js | 56 +++---- navtreeindex4.js | 76 ++++----- navtreeindex5.js | 56 +++---- navtreeindex6.js | 54 +++---- navtreeindex7.js | 32 ++-- navtreeindex8.js | 52 +++--- navtreeindex9.js | 58 +++---- search/all_14.js | 4 +- search/all_4.js | 100 ++++++------ search/all_8.js | 4 +- search/all_a.js | 119 +++++++------- search/all_e.js | 8 +- search/functions_13.js | 4 +- search/functions_3.js | 147 ++++++++--------- search/functions_7.js | 4 +- search/functions_9.js | 93 +++++------ 35 files changed, 879 insertions(+), 677 deletions(-) create mode 100644 df/dce/namespacegraph_a84b0551489c613a681cc83b34450da4b_cgraph.map create mode 100644 df/dce/namespacegraph_a84b0551489c613a681cc83b34450da4b_cgraph.md5 create mode 100644 df/dce/namespacegraph_a84b0551489c613a681cc83b34450da4b_cgraph.svg diff --git a/d5/d88/md__d_i_r_e_c_t_o_r_y.html b/d5/d88/md__d_i_r_e_c_t_o_r_y.html index 55756583c..801982ad0 100644 --- a/d5/d88/md__d_i_r_e_c_t_o_r_y.html +++ b/d5/d88/md__d_i_r_e_c_t_o_r_y.html @@ -236,6 +236,7 @@ Graph
Graph Algorithms.
+Check whether a given graph is bipartite or not.
for std::vector
Graph algorithms.
for IO operations for std::set
Graph Algorithms
+A bipartite graph is the one whose nodes can be divided into two disjoint sets in such a way that the nodes in a set are not connected to each other at all, i.e. no intra-set connections. The only connections that exist are that of inter-set, i.e. the nodes from one set are connected to a subset of nodes in the other set. In this implementation, using a graph in the form of adjacency list, check whether the given graph is a bipartite or not.
+References used: GeeksForGeeks
+Graphical algorithms
for std::min for assert for IO operations for limits of integral types for std::vector
| bool graph::checkBipartite | +( | +const std::vector< std::vector< int64_t > > & | +graph, | +
| + | + | int64_t | +index, | +
| + | + | std::vector< int64_t > * | +visited | +
| + | ) | ++ |
function to check whether the passed graph is bipartite or not
+| graph | is a 2D matrix whose rows or the first index signify the node and values in that row signify the nodes it is connected to |
| index | is the valus of the node currently under observation |
| visited | is the vector which stores whether a given node has been traversed or not yet |
< stores the neighbouring node indexes in squence of being reached
+insert the current node into the queue
+mark the current node as travelled
+< stores the neighbour of the current node
+check whether the neighbour node is travelled already or not
+colour the neighbouring node with different colour than the current node
+insert the neighbouring node into the queue
+if both the current node and its neighbour has the same state then it is not a bipartite graph
+return true when all the connected nodes of the current nodes are travelled and satisify all the above conditions
+| bool graph::isBipartite | +( | +const std::vector< std::vector< int64_t > > & | +graph | ) | ++ |
returns true if the given graph is bipartite else returns false
+| graph | is a 2D matrix whose rows or the first index signify the node and values in that row signify the nodes it is connected to |
< stores boolean values which signify whether that node had been visited or not
+if the current node is not visited then check whether the sub-graph of that node is a bipartite or not
+