Detailed Description
Definition at line 50 of file graph_interface.h.
#include <graph_interface.h>
Public Member Functions | |
GraphInterface () | |
virtual | ~GraphInterface () |
virtual std::vector< int > | getPartition () const |
virtual void | setPartition (int i, int nodeid)=0 |
virtual SCIP_RETCODE | writeToFile (int fd, SCIP_Bool writeweights)=0 |
virtual SCIP_RETCODE | readPartition (const char *filename)=0 |
virtual SCIP_RETCODE | createDecompFromPartition (DEC_DECOMP **decomp) |
virtual SCIP_RETCODE | flush ()=0 |
Protected Attributes | |
std::vector< int > | partition |
Constructor & Destructor Documentation
◆ GraphInterface()
|
inline |
Definition at line 55 of file graph_interface.h.
◆ ~GraphInterface()
|
inlinevirtual |
Definition at line 57 of file graph_interface.h.
Member Function Documentation
◆ getPartition()
|
inlinevirtual |
return a partition of the nodes
Definition at line 60 of file graph_interface.h.
References partition.
Referenced by gcg::GraphAlgorithms< T >::computekMetric(), gcg::GraphAlgorithms< T >::computeMincut(), gcg::GraphAlgorithms< T >::computeSoed(), gcg::HyperrowGraph< T >::getPartition(), and gcg::MatrixGraph< T >::getPartition().
◆ setPartition()
|
pure virtual |
assigns partition to a given node
Implemented in gcg::Graph< T >, and gcg::Hypergraph< T >.
◆ writeToFile()
|
pure virtual |
writes the graph to the given file. The format is graph dependent
- Parameters
-
fd filename where the graph should be written to writeweights whether to write weights
Implemented in gcg::Graph< T >, and gcg::Hypergraph< T >.
Referenced by gcg::MatrixGraph< T >::writeToFile().
◆ readPartition()
|
pure virtual |
reads the partition from the given file. The format is graph dependent. The default is a file with one line for each node a
- Parameters
-
filename filename where the partition is stored
Implemented in gcg::Graph< T >, and gcg::Hypergraph< T >.
Referenced by gcg::MatrixGraph< T >::readPartition().
◆ createDecompFromPartition()
|
inlinevirtual |
create decomposition based on the read in partition
- Parameters
-
decomp decomposition structure to generate
Definition at line 84 of file graph_interface.h.
◆ flush()
|
pure virtual |
Implemented in gcg::Graph< T >, and gcg::Hypergraph< T >.
Field Documentation
◆ partition
|
protected |
Definition at line 52 of file graph_interface.h.
Referenced by getPartition(), gcg::Graph< T >::swap(), and gcg::Hypergraph< T >::swap().