gcg::GraphInterface Class Referenceabstract

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

gcg::GraphInterface::GraphInterface ( )
inline

Definition at line 55 of file graph_interface.h.

virtual gcg::GraphInterface::~GraphInterface ( )
inlinevirtual

Definition at line 57 of file graph_interface.h.

Member Function Documentation

virtual SCIP_RETCODE gcg::GraphInterface::createDecompFromPartition ( DEC_DECOMP **  decomp)
inlinevirtual

create decomposition based on the read in partition

Parameters
decompdecomposition structure to generate

Definition at line 84 of file graph_interface.h.

References flush().

virtual SCIP_RETCODE gcg::GraphInterface::flush ( )
pure virtual
virtual std::vector<int> gcg::GraphInterface::getPartition ( ) const
inlinevirtual
virtual SCIP_RETCODE gcg::GraphInterface::readPartition ( const char *  filename)
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
filenamefilename where the partition is stored

Implemented in gcg::Graph< T >, and gcg::Hypergraph< T >.

Referenced by getPartition(), and gcg::MatrixGraph< T >::readPartition().

virtual void gcg::GraphInterface::setPartition ( int  i,
int  nodeid 
)
pure virtual

assigns partition to a given node

Implemented in gcg::Graph< T >, and gcg::Hypergraph< T >.

Referenced by getPartition().

virtual SCIP_RETCODE gcg::GraphInterface::writeToFile ( int  fd,
SCIP_Bool  writeweights 
)
pure virtual

writes the graph to the given file. The format is graph dependent

Parameters
fdfilename where the graph should be written to
writeweightswhether to write weights

Implemented in gcg::Graph< T >, and gcg::Hypergraph< T >.

Referenced by getPartition(), and gcg::MatrixGraph< T >::writeToFile().

Member Data Documentation