PandA-2024.02
|
#include <clique_covering.hpp>
Public Member Functions | |
clique_covering ()=default | |
Default constructor. More... | |
virtual | ~clique_covering ()=default |
Destructor. More... | |
virtual C_vertex | add_vertex (const VertexType &element, const std::string &name)=0 |
Adds a vertex to graph. More... | |
virtual void | add_edge (const VertexType &src, const VertexType &dest, int _weight)=0 |
Adds an edge to graph. More... | |
virtual size_t | num_vertices ()=0 |
Returns number of cliques into graph after performing clique covering. More... | |
virtual void | exec (const filter_clique< VertexType > &fc, check_clique< VertexType > &cq)=0 |
Abstract method that will execute clique covering algorithm. More... | |
virtual CustomOrderedSet< VertexType > | get_clique (unsigned int i)=0 |
Returns a clique. More... | |
virtual void | writeDot (const std::string &filename) const =0 |
Writes a dotty representation of the actual graph. More... | |
virtual void | add_subpartitions (size_t id, VertexType v)=0 |
add subpartitions over which bipartite matching can start on More... | |
virtual void | suggest_min_resources (size_t n_resources)=0 |
suggest that the problem have at least a given number of resources More... | |
virtual void | suggest_max_resources (size_t n_resources)=0 |
suggest that the problem have at worst no more than the given number of resources More... | |
virtual void | max_resources (size_t n_resources)=0 |
specify the maximum number of resources More... | |
virtual void | min_resources (size_t n_resources)=0 |
specify the minimum number of resources More... | |
Static Public Member Functions | |
static refcount< clique_covering< VertexType > > | create_solver (CliqueCovering_Algorithm solver, unsigned int nvert) |
Creates a reference to desired solver. More... | |
Definition at line 159 of file clique_covering.hpp.
|
default |
Default constructor.
|
virtualdefault |
Destructor.
|
pure virtual |
Adds an edge to graph.
It checks if source and vertex are stored into graph. If one of them isn't into graph, the related assertion fails. If both vertices are stored, a (weighted) edge is added
src | is the index of first vertex |
dest | is the index of second vertex |
weight | is the weight associated with edge (optional, set to unitary value as default) |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
pure virtual |
add subpartitions over which bipartite matching can start on
id | is the subpartition id |
vertex | is the vertex of the given subpartition |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
pure virtual |
Adds a vertex to graph.
It checks if element is already into graph. If it is, an assertion fails, otherwise the vertex is added and the new index is saved for future checks
VertexType& | is the reference to element that deals with compatibility |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
static |
Creates a reference to desired solver.
solver | is the solver which you want to perform clique covering with |
graph_type | is the kind of graph you are going to create |
Definition at line 1886 of file clique_covering.hpp.
Referenced by cdfc_module_binding::InternalExec(), and weighted_clique_register::RegisterBinding().
|
pure virtual |
Abstract method that will execute clique covering algorithm.
If you want to specialize the implementation with your favorite algorithm, you have to implement this method.
fc | is the filtering clique functor used to reduce the proposed clique |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
pure virtual |
Returns a clique.
i | is the i-th clique into graph |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
pure virtual |
specify the maximum number of resources
n_resources | is the number of resources |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
pure virtual |
specify the minimum number of resources
n_resources | is the number of resources |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
pure virtual |
Returns number of cliques into graph after performing clique covering.
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
pure virtual |
suggest that the problem have at worst no more than the given number of resources
n_resources | is the number of resources |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
pure virtual |
suggest that the problem have at least a given number of resources
n_resources | is the number of resources available |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.
|
pure virtual |
Writes a dotty representation of the actual graph.
filename | is the output filename |
Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.