Quaternity
|
This file defines the graph type and a creation function header. More...
Go to the source code of this file.
Typedefs | |
typedef std::vector< std::vector< bool > > | Graph |
A bipartite graph where true booleans represent edges between a left node denoted as the row and a right node denoted as the column in the grid. More... | |
Functions | |
bool | graph_possible (const Settings &settings, const State &state) |
Check if it is possible to create a graph. More... | |
Graph | graph_copy (const Graph graph) |
Create a copy of the given graph. More... | |
Graph | graph_create (const Settings &settings, const State &state) |
Create a biparite graph which has a matching if the state is valid. More... | |
This file defines the graph type and a creation function header.
Definition in file graph.h.
typedef std::vector<std::vector<bool> > Graph |
Create a copy of the given graph.
Definition at line 19 of file graph.cpp.
Create a biparite graph which has a matching if the state is valid.
The graph is represented as a 2d array where every cell is an edge between the left node (row number) and the right node (column number). We go through all the players and add the constraints corresponding to that player's possible hands.
Definition at line 101 of file graph.cpp.
Check if it is possible to create a graph.
More specifically, check that no player's total number of set constraints is bigger than the number of cards that player has.
Definition at line 36 of file graph.cpp.