dejavu
Fast probabilistic symmetry detection.
|
Vertex coloring for a graph. More...
#include <coloring.h>
Public Member Functions | |
~coloring () | |
void | copy_ptn (coloring *c) const |
void | copy_from_ir_ancestor (coloring *c) |
void | copy_any (coloring *c) |
void | initialize (int new_domain_size) |
void | check () const |
Public Attributes | |
int * | lab = nullptr |
int * | ptn = nullptr |
int * | vertex_to_col = nullptr |
int * | vertex_to_lab = nullptr |
int | cells = 1 |
int | domain_size = 0 |
Vertex coloring for a graph.
Stores a vertex coloring for a graph with domain_size many vertices. Has mappings to and from colorings. The datastructure mostly follows the design used by Traces, with some slight adjustments. The class mainly exposes raw arrays, to be used by the solver internally.
Definition at line 23 of file coloring.h.
|
inline |
Definition at line 71 of file coloring.h.
|
inline |
Definition at line 153 of file coloring.h.
|
inline |
Copies the given coloring into this coloring.
c | The coloring to copy from. |
Definition at line 125 of file coloring.h.
|
inline |
Copies the given coloring into this coloring, but is only guaranteed to produce a correct coloring if c
stems from an ancestor in the IR tree of the currently stored coloring.
Essentially, this function only copies the vertex_to_col
array.
c | The coloring to copy from. |
Definition at line 98 of file coloring.h.
|
inline |
This function only copies the ptn
array from c
to this coloring. Assumes c
and this coloring have the same domain_size and are both allocated.
c | The coloring to copy from. |
Definition at line 83 of file coloring.h.
|
inline |
Initialize this coloring with a given domain size. Allocates memory for the coloring. Does not initialize any content and runs in O(1).
new_domain_size | domain size of the coloring |
Definition at line 149 of file coloring.h.
int dejavu::ds::coloring::cells = 1 |
number of colors (i.e., cells) in the coloring
Definition at line 31 of file coloring.h.
int dejavu::ds::coloring::domain_size = 0 |
domain size of the coloring (i.e., number of vertices of the graph)
Definition at line 32 of file coloring.h.
int* dejavu::ds::coloring::lab = nullptr |
vertices of color i
are listed in lab[i]...lab[ptn[i]]
Definition at line 25 of file coloring.h.
int* dejavu::ds::coloring::ptn = nullptr |
color i
has size ptn[i] + 1
Definition at line 26 of file coloring.h.
int* dejavu::ds::coloring::vertex_to_col = nullptr |
vertex v
has color vertex_to_col[v]
Definition at line 27 of file coloring.h.
int* dejavu::ds::coloring::vertex_to_lab = nullptr |
vertex v
is stored in lab at position vertex_to_lab[v]
, i.e., lab[vertex_to_lab[v]] = v
Definition at line 28 of file coloring.h.