Scippy

GCG

Branch-and-Price & Column Generation for Everyone

gcg::RowGraphWeighted< T > Class Template Reference

Detailed Description

template<class T>
class gcg::RowGraphWeighted< T >

Definition at line 63 of file rowgraph_weighted.h.

#include <rowgraph_weighted.h>

Public Member Functions

 RowGraphWeighted (SCIP *scip, Weights w)
 
virtual ~RowGraphWeighted ()
 
virtual SCIP_RETCODE createFromMatrix (SCIP_CONS **conss, SCIP_VAR **vars, int nconss_, int nvars_, DISTANCE_MEASURE dist, WEIGHT_TYPE w_type)
 
virtual SCIP_RETCODE createFromPartialMatrix (DETPROBDATA *detprobdata, PARTIALDECOMP *partialdec, DISTANCE_MEASURE dist, WEIGHT_TYPE w_type)
 
virtual SCIP_RETCODE computePartitionDBSCAN (double eps, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionDBSCANForPartialGraph (gcg::DETPROBDATA *detprobdata, gcg::PARTIALDECOMP *partialdec, double eps, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionMST (double eps, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionMSTForPartialGraph (gcg::DETPROBDATA *detprobdata, gcg::PARTIALDECOMP *partialdec, double eps, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionMCL (int &stoppedAfter, double inflatefactor, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionMCLForPartialGraph (gcg::DETPROBDATA *detprobdata, gcg::PARTIALDECOMP *partialdec, int &stoppedAfter, double inflatefactor, bool postprocenable)
 
virtual SCIP_RETCODE getNBlocks (int &_n_blocks)
 
virtual SCIP_RETCODE nonClustered (int &_non_cl)
 
virtual double getEdgeWeightPercentile (double q)
 
SCIP_RETCODE computePartitionDBSCAN (double eps, bool postprocenable)
 
SCIP_RETCODE computePartitionDBSCANForPartialGraph (gcg::DETPROBDATA *detprobdata, gcg::PARTIALDECOMP *partialdec, double eps, bool postprocenable)
 
SCIP_RETCODE computePartitionMST (double eps, bool postprocenable)
 
SCIP_RETCODE computePartitionMSTForPartialGraph (gcg::DETPROBDATA *detprobdata, gcg::PARTIALDECOMP *partialdec, double eps, bool postprocenable)
 
SCIP_RETCODE computePartitionMCL (int &stoppedAfter, double inflatefactor, bool postprocenable)
 
SCIP_RETCODE computePartitionMCLForPartialGraph (gcg::DETPROBDATA *detprobdata, gcg::PARTIALDECOMP *partialdec, int &stoppedAfter, double inflatefactor, bool postprocenable)
 
- Public Member Functions inherited from gcg::RowGraph< T >
 RowGraph (SCIP *scip, Weights w)
 
virtual ~RowGraph ()
 
virtual SCIP_RETCODE createDecompFromPartition (DEC_DECOMP **decomp)
 
virtual SCIP_RETCODE createPartialdecFromPartition (PARTIALDECOMP *oldpartialdec, PARTIALDECOMP **firstpartialdec, PARTIALDECOMP **secondpartialdec, DETPROBDATA *detprobdata)
 
virtual SCIP_RETCODE createFromMatrix (SCIP_CONS **conss, SCIP_VAR **vars, int nconss_, int nvars_)
 
- Public Member Functions inherited from gcg::MatrixGraph< T >
 MatrixGraph (SCIP *scip, Weights w)
 
virtual ~MatrixGraph ()
 
virtual SCIP_RETCODE writeToFile (int fd, SCIP_Bool writeweights)
 
virtual SCIP_RETCODE readPartition (const char *filename)
 
void setDummynodes (int dummynodes_)
 
int getDummynodes () const
 
virtual std::vector< int > getPartition ()
 
virtual SCIP_RETCODE createFromPartialMatrix (DETPROBDATA *detprobdata, PARTIALDECOMP *partialdec)
 
virtual int getNNonzeroes () const
 

Static Public Member Functions

static double calculateSimilarity (int a, int b, int c, DISTANCE_MEASURE dist, WEIGHT_TYPE w_type, bool itself)
 

Additional Inherited Members

- Data Fields inherited from gcg::MatrixGraph< T >
std::string name
 
- Protected Attributes inherited from gcg::RowGraph< T >
gcg::Graph< T > graph
 
- Protected Attributes inherited from gcg::MatrixGraph< T >
SCIP * scip_
 
int nconss
 
int nvars
 
int dummynodes
 
Weights weights
 
GraphInterfacegraphiface
 
int nnonzeroes
 

Constructor & Destructor Documentation

◆ RowGraphWeighted()

template<class T >
gcg::RowGraphWeighted< T >::RowGraphWeighted ( SCIP *  scip,
Weights  w 
)
Parameters
scipSCIP data structure
wweights for the given graph

Definition at line 57 of file rowgraph_weighted_def.h.

References gcg::MatrixGraph< T >::name.

◆ ~RowGraphWeighted()

template<class T >
gcg::RowGraphWeighted< T >::~RowGraphWeighted
virtual

Definition at line 68 of file rowgraph_weighted_def.h.

Member Function Documentation

◆ createFromMatrix()

template<class T >
SCIP_RETCODE gcg::RowGraphWeighted< T >::createFromMatrix ( SCIP_CONS **  conss,
SCIP_VAR **  vars,
int  nconss_,
int  nvars_,
DISTANCE_MEASURE  dist,
WEIGHT_TYPE  w_type 
)
virtual
Parameters
conssconstraints for which graph should be created
varsvariables for which graph should be created
nconss_number of constraints
nvars_number of variables
distHere we define the distance measure between two rows
w_typeDepending on the algorithm we can build distance or similarity graph

Definition at line 75 of file rowgraph_weighted_def.h.

References gcg::DIST, GCGisVarRelevant(), and gcg::INTERSECTION.

◆ createFromPartialMatrix()

template<class T >
SCIP_RETCODE gcg::RowGraphWeighted< T >::createFromPartialMatrix ( DETPROBDATA detprobdata,
PARTIALDECOMP partialdec,
DISTANCE_MEASURE  dist,
WEIGHT_TYPE  w_type 
)
virtual

creates a graph with open constraints and open variables of the partialdec

stores the conss included by the graph

stores the vars included by the graph

< true, if the var will be part of the graph

< true, if the cons will be part of the graph

stores new index of the conss

stores new index of the vars

Parameters
detprobdatadetection process information and data
partialdecpartial decomposition to use for matrix
distHere we define the distance measure between two rows
w_typeDepending on the algorithm we can build distance or similarity graph

Definition at line 220 of file rowgraph_weighted_def.h.

References gcg::DIST, gcg::PARTIALDECOMP::getNConss(), gcg::PARTIALDECOMP::getNOpenconss(), gcg::PARTIALDECOMP::getNOpenvars(), gcg::PARTIALDECOMP::getNVars(), gcg::DETPROBDATA::getNVarsForCons(), gcg::PARTIALDECOMP::getOpenconss(), gcg::PARTIALDECOMP::getOpenvars(), gcg::DETPROBDATA::getVarsForCons(), and gcg::INTERSECTION.

Referenced by DEC_DECL_PROPAGATEPARTIALDEC().

◆ calculateSimilarity()

template<class T >
double gcg::RowGraphWeighted< T >::calculateSimilarity ( int  a,
int  b,
int  c,
DISTANCE_MEASURE  dist,
WEIGHT_TYPE  w_type,
bool  itself 
)
static
Parameters
anumber of common variables in two rows
bnumber of variables that appear only in the 2nd row
cnumber of variables that appear only in the 1st row
distHere we define the distance measure between two rows
w_typeDepending on the algorithm we can build distance or similarity graph
itselftrue if we calculate similarity between the row itself

Definition at line 367 of file rowgraph_weighted_def.h.

References gcg::COSINE, gcg::DIST, gcg::INTERSECTION, gcg::JACCARD, gcg::JOHNSON, and gcg::SIMPSON.

◆ computePartitionDBSCAN() [1/2]

template<class T >
virtual SCIP_RETCODE gcg::RowGraphWeighted< T >::computePartitionDBSCAN ( double  eps,
bool  postprocenable 
)
virtual

return a partition of the nodes with the help of DBSCAN

◆ computePartitionDBSCANForPartialGraph() [1/2]

template<class T >
virtual SCIP_RETCODE gcg::RowGraphWeighted< T >::computePartitionDBSCANForPartialGraph ( gcg::DETPROBDATA detprobdata,
gcg::PARTIALDECOMP partialdec,
double  eps,
bool  postprocenable 
)
virtual

return a partition of the nodes with the help of DBSCAN

Referenced by DEC_DECL_PROPAGATEPARTIALDEC().

◆ computePartitionMST() [1/2]

template<class T >
virtual SCIP_RETCODE gcg::RowGraphWeighted< T >::computePartitionMST ( double  eps,
bool  postprocenable 
)
virtual

return a partition of the nodes with the help of MST

◆ computePartitionMSTForPartialGraph() [1/2]

template<class T >
virtual SCIP_RETCODE gcg::RowGraphWeighted< T >::computePartitionMSTForPartialGraph ( gcg::DETPROBDATA detprobdata,
gcg::PARTIALDECOMP partialdec,
double  eps,
bool  postprocenable 
)
virtual

return a partition of the nodes with the help of MST

Referenced by DEC_DECL_PROPAGATEPARTIALDEC().

◆ computePartitionMCL() [1/2]

template<class T >
virtual SCIP_RETCODE gcg::RowGraphWeighted< T >::computePartitionMCL ( int &  stoppedAfter,
double  inflatefactor,
bool  postprocenable 
)
virtual

return a partition of the nodes with the help of MST

◆ computePartitionMCLForPartialGraph() [1/2]

template<class T >
virtual SCIP_RETCODE gcg::RowGraphWeighted< T >::computePartitionMCLForPartialGraph ( gcg::DETPROBDATA detprobdata,
gcg::PARTIALDECOMP partialdec,
int &  stoppedAfter,
double  inflatefactor,
bool  postprocenable 
)
virtual

return a partition of the nodes with the help of MST

◆ getNBlocks()

template<class T >
SCIP_RETCODE gcg::RowGraphWeighted< T >::getNBlocks ( int &  _n_blocks)
virtual

return the number of clusters after post-processing

Definition at line 1299 of file rowgraph_weighted_def.h.

Referenced by DEC_DECL_PROPAGATEPARTIALDEC().

◆ nonClustered()

template<class T >
SCIP_RETCODE gcg::RowGraphWeighted< T >::nonClustered ( int &  _non_cl)
virtual

Definition at line 1306 of file rowgraph_weighted_def.h.

Referenced by DEC_DECL_PROPAGATEPARTIALDEC().

◆ getEdgeWeightPercentile()

template<class T >
double gcg::RowGraphWeighted< T >::getEdgeWeightPercentile ( double  q)
virtual

Definition at line 1313 of file rowgraph_weighted_def.h.

◆ computePartitionDBSCAN() [2/2]

SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionDBSCAN ( double  eps,
bool  postprocenable 
)

Definition at line 1232 of file rowgraph_weighted_def.h.

References gcg::GraphAlgorithms< T >::dbscan().

◆ computePartitionDBSCANForPartialGraph() [2/2]

SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionDBSCANForPartialGraph ( gcg::DETPROBDATA detprobdata,
gcg::PARTIALDECOMP partialdec,
double  eps,
bool  postprocenable 
)

Definition at line 1243 of file rowgraph_weighted_def.h.

References gcg::GraphAlgorithms< T >::dbscan().

◆ computePartitionMST() [2/2]

SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMST ( double  eps,
bool  postprocenable 
)

Definition at line 1255 of file rowgraph_weighted_def.h.

References gcg::GraphAlgorithms< T >::mst().

◆ computePartitionMSTForPartialGraph() [2/2]

SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMSTForPartialGraph ( gcg::DETPROBDATA detprobdata,
gcg::PARTIALDECOMP partialdec,
double  eps,
bool  postprocenable 
)

Definition at line 1266 of file rowgraph_weighted_def.h.

References gcg::GraphAlgorithms< T >::mst().

◆ computePartitionMCL() [2/2]

SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMCL ( int &  stoppedAfter,
double  inflatefactor,
bool  postprocenable 
)

Definition at line 1277 of file rowgraph_weighted_def.h.

References gcg::GraphAlgorithms< T >::mcl().

◆ computePartitionMCLForPartialGraph() [2/2]

SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMCLForPartialGraph ( gcg::DETPROBDATA detprobdata,
gcg::PARTIALDECOMP partialdec,
int &  stoppedAfter,
double  inflatefactor,
bool  postprocenable 
)

Definition at line 1288 of file rowgraph_weighted_def.h.

References gcg::GraphAlgorithms< T >::mcl().