GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
gcg::GraphInterface Class Referenceabstract

Detailed Description

Definition at line 51 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 (GCG_DECOMP **decomp)
virtual SCIP_RETCODE flush ()=0

Protected Attributes

std::vector< int > partition

Constructor & Destructor Documentation

◆ GraphInterface()

gcg::GraphInterface::GraphInterface ( )
inline

Definition at line 56 of file graph_interface.h.

◆ ~GraphInterface()

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

Definition at line 58 of file graph_interface.h.

Member Function Documentation

◆ getPartition()

virtual std::vector< int > gcg::GraphInterface::getPartition ( ) const
inlinevirtual

◆ setPartition()

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

References i.

◆ writeToFile()

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 gcg::MatrixGraph< T >::writeToFile().

◆ readPartition()

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 gcg::MatrixGraph< T >::readPartition().

◆ createDecompFromPartition()

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

create decomposition based on the read in partition

Parameters
decompdecomposition structure to generate

Definition at line 85 of file graph_interface.h.

◆ flush()

virtual SCIP_RETCODE gcg::GraphInterface::flush ( )
pure virtual

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

Field Documentation

◆ partition