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 (Seeedpool *seeedpool, Seeed *seeed, DISTANCE_MEASURE dist, WEIGHT_TYPE w_type)
 
virtual SCIP_RETCODE computePartitionDBSCAN (double eps, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionDBSCANForPartialGraph (gcg::Seeedpool *seeedpool, gcg::Seeed *seeed, double eps, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionMST (double eps, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionMSTForPartialGraph (gcg::Seeedpool *seeedpool, gcg::Seeed *seeed, double eps, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionMCL (int &stoppedAfter, double inflatefactor, bool postprocenable)
 
virtual SCIP_RETCODE computePartitionMCLForPartialGraph (gcg::Seeedpool *seeedpool, gcg::Seeed *seeed, 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)
 
template<>
SCIP_RETCODE computePartitionDBSCAN (double eps, bool postprocenable)
 
template<>
SCIP_RETCODE computePartitionDBSCANForPartialGraph (gcg::Seeedpool *seeedpool, gcg::Seeed *seeed, double eps, bool postprocenable)
 
template<>
SCIP_RETCODE computePartitionMST (double eps, bool postprocenable)
 
template<>
SCIP_RETCODE computePartitionMSTForPartialGraph (gcg::Seeedpool *seeedpool, gcg::Seeed *seeed, double eps, bool postprocenable)
 
template<>
SCIP_RETCODE computePartitionMCL (int &stoppedAfter, double inflatefactor, bool postprocenable)
 
template<>
SCIP_RETCODE computePartitionMCLForPartialGraph (gcg::Seeedpool *seeedpool, gcg::Seeed *seeed, 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 createSeeedFromPartition (Seeed *oldSeeed, Seeed **firstSeeed, Seeed **secondSeeed, Seeedpool *seeedpool)
 
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 (Seeedpool *seeedpool, Seeed *seeed)
 
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

- Public Attributes 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

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.

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

Definition at line 68 of file rowgraph_weighted_def.h.

Member Function Documentation

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

Referenced by DEC_DECL_DETECTSTRUCTURE().

template<>
SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionDBSCAN ( double  eps,
bool  postprocenable 
)
template<class T>
virtual SCIP_RETCODE gcg::RowGraphWeighted< T >::computePartitionDBSCANForPartialGraph ( gcg::Seeedpool seeedpool,
gcg::Seeed seeed,
double  eps,
bool  postprocenable 
)
virtual

return a partition of the nodes with the help of DBSCAN

Referenced by DEC_DECL_PROPAGATESEEED().

template<>
SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionDBSCANForPartialGraph ( gcg::Seeedpool seeedpool,
gcg::Seeed seeed,
double  eps,
bool  postprocenable 
)
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

Referenced by DEC_DECL_DETECTSTRUCTURE().

template<>
SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMCL ( int &  stoppedAfter,
double  inflatefactor,
bool  postprocenable 
)
template<class T>
virtual SCIP_RETCODE gcg::RowGraphWeighted< T >::computePartitionMCLForPartialGraph ( gcg::Seeedpool seeedpool,
gcg::Seeed seeed,
int &  stoppedAfter,
double  inflatefactor,
bool  postprocenable 
)
virtual

return a partition of the nodes with the help of MST

template<>
SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMCLForPartialGraph ( gcg::Seeedpool seeedpool,
gcg::Seeed seeed,
int &  stoppedAfter,
double  inflatefactor,
bool  postprocenable 
)
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

Referenced by DEC_DECL_DETECTSTRUCTURE().

template<>
SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMST ( double  eps,
bool  postprocenable 
)
template<class T>
virtual SCIP_RETCODE gcg::RowGraphWeighted< T >::computePartitionMSTForPartialGraph ( gcg::Seeedpool seeedpool,
gcg::Seeed seeed,
double  eps,
bool  postprocenable 
)
virtual

return a partition of the nodes with the help of MST

Referenced by DEC_DECL_PROPAGATESEEED().

template<>
SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMSTForPartialGraph ( gcg::Seeedpool seeedpool,
gcg::Seeed seeed,
double  eps,
bool  postprocenable 
)
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
Todo:
skip all variables that have a zero coeffient or where all coefficients add to zero
Todo:
Do more then one entry per variable actually work?
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::RowGraphWeighted< T >::calculateSimilarity(), gcg::DIST, GCGisVarRelevant(), gcg::RowGraph< T >::graph, gcg::INTERSECTION, gcg::MatrixGraph< T >::nconss, gcg::MatrixGraph< T >::nvars, and gcg::MatrixGraph< T >::scip_.

Referenced by DEC_DECL_DETECTSTRUCTURE().

template<class T >
SCIP_RETCODE gcg::RowGraphWeighted< T >::createFromPartialMatrix ( Seeedpool seeedpool,
Seeed seeed,
DISTANCE_MEASURE  dist,
WEIGHT_TYPE  w_type 
)
virtual

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

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
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::RowGraphWeighted< T >::calculateSimilarity(), gcg::DIST, gcg::Seeed::getNConss(), gcg::Seeed::getNOpenconss(), gcg::Seeed::getNOpenvars(), gcg::Seeed::getNVars(), gcg::Seeedpool::getNVarsForCons(), gcg::Seeed::getOpenconss(), gcg::Seeed::getOpenvars(), gcg::Seeedpool::getVarsForCons(), gcg::RowGraph< T >::graph, gcg::INTERSECTION, gcg::MatrixGraph< T >::nconss, and gcg::MatrixGraph< T >::nvars.

Referenced by DEC_DECL_PROPAGATESEEED().

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

Definition at line 1331 of file rowgraph_weighted_def.h.

References gcg::RowGraph< T >::graph.

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

return the number of clusters after post-processing

Definition at line 1317 of file rowgraph_weighted_def.h.

Referenced by DEC_DECL_DETECTSTRUCTURE(), and DEC_DECL_PROPAGATESEEED().

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

Definition at line 1324 of file rowgraph_weighted_def.h.

Referenced by DEC_DECL_DETECTSTRUCTURE(), and DEC_DECL_PROPAGATESEEED().