PandA-2024.02
Public Member Functions | Static Public Member Functions
clique_covering< VertexType > Class Template Referenceabstract

#include <clique_covering.hpp>

Inheritance diagram for clique_covering< VertexType >:
Inheritance graph
[legend]

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...
 

Detailed Description

template<typename VertexType>
class clique_covering< VertexType >

Definition at line 159 of file clique_covering.hpp.

Constructor & Destructor Documentation

◆ clique_covering()

template<typename VertexType>
clique_covering< VertexType >::clique_covering ( )
default

Default constructor.

◆ ~clique_covering()

template<typename VertexType>
virtual clique_covering< VertexType >::~clique_covering ( )
virtualdefault

Destructor.

Member Function Documentation

◆ add_edge()

template<typename VertexType>
virtual void clique_covering< VertexType >::add_edge ( const VertexType &  src,
const VertexType &  dest,
int  _weight 
)
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

Parameters
srcis the index of first vertex
destis the index of second vertex
weightis 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 >.

◆ add_subpartitions()

template<typename VertexType>
virtual void clique_covering< VertexType >::add_subpartitions ( size_t  id,
VertexType  v 
)
pure virtual

add subpartitions over which bipartite matching can start on

Parameters
idis the subpartition id
vertexis the vertex of the given subpartition

Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.

◆ add_vertex()

template<typename VertexType>
virtual C_vertex clique_covering< VertexType >::add_vertex ( const VertexType &  element,
const std::string &  name 
)
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

Parameters
VertexType&is the reference to element that deals with compatibility
Returns
the new vertex index

Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.

◆ create_solver()

template<typename VertexType >
refcount< clique_covering< VertexType > > clique_covering< VertexType >::create_solver ( CliqueCovering_Algorithm  solver,
unsigned int  nvert 
)
static

Creates a reference to desired solver.

Parameters
solveris the solver which you want to perform clique covering with
graph_typeis the kind of graph you are going to create
Returns
a reference to the desired solver

Definition at line 1886 of file clique_covering.hpp.

Referenced by cdfc_module_binding::InternalExec(), and weighted_clique_register::RegisterBinding().

Here is the caller graph for this function:

◆ exec()

template<typename VertexType>
virtual void clique_covering< VertexType >::exec ( const filter_clique< VertexType > &  fc,
check_clique< VertexType > &  cq 
)
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.

Parameters
fcis 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 >.

◆ get_clique()

template<typename VertexType>
virtual CustomOrderedSet<VertexType> clique_covering< VertexType >::get_clique ( unsigned int  i)
pure virtual

Returns a clique.

Parameters
iis the i-th clique into graph
Returns
set of elements into clique

Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.

◆ max_resources()

template<typename VertexType>
virtual void clique_covering< VertexType >::max_resources ( size_t  n_resources)
pure virtual

specify the maximum number of resources

Parameters
n_resourcesis the number of resources

Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.

◆ min_resources()

template<typename VertexType>
virtual void clique_covering< VertexType >::min_resources ( size_t  n_resources)
pure virtual

specify the minimum number of resources

Parameters
n_resourcesis the number of resources

Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.

◆ num_vertices()

template<typename VertexType>
virtual size_t clique_covering< VertexType >::num_vertices ( )
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 >.

◆ suggest_max_resources()

template<typename VertexType>
virtual void clique_covering< VertexType >::suggest_max_resources ( size_t  n_resources)
pure virtual

suggest that the problem have at worst no more than the given number of resources

Parameters
n_resourcesis the number of resources

Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.

◆ suggest_min_resources()

template<typename VertexType>
virtual void clique_covering< VertexType >::suggest_min_resources ( size_t  n_resources)
pure virtual

suggest that the problem have at least a given number of resources

Parameters
n_resourcesis the number of resources available

Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.

◆ writeDot()

template<typename VertexType>
virtual void clique_covering< VertexType >::writeDot ( const std::string &  filename) const
pure virtual

Writes a dotty representation of the actual graph.

Parameters
filenameis the output filename

Implemented in bipartite_matching_clique_covering< vertex_type >, and coloring_based_clique_covering< vertex_type >.


The documentation for this class was generated from the following file:

Generated on Mon Feb 12 2024 13:03:47 for PandA-2024.02 by doxygen 1.8.13