Detailed Description
class gcg::RowGraphWeighted< T >
Definition at line 64 of file rowgraph_weighted.h.
#include <rowgraph_weighted.h>
Public Member Functions | |
| RowGraphWeighted (GCG *gcg, 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 (GCG *gcg, Weights w) | |
| virtual | ~RowGraph () |
| virtual SCIP_RETCODE | createDecompFromPartition (GCG_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 (GCG *gcgstruct, 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 > | |
| GCG * | gcg |
| int | nconss |
| int | nvars |
| int | dummynodes |
| Weights | weights |
| GraphInterface * | graphiface |
| int | nnonzeroes |
Constructor & Destructor Documentation
◆ RowGraphWeighted()
| gcg::RowGraphWeighted< T >::RowGraphWeighted | ( | GCG * | gcg, |
| Weights | w ) |
- Parameters
-
gcg GCG data structure w weights for the given graph
Definition at line 58 of file rowgraph_weighted_def.h.
References gcg::MatrixGraph< T >::name, and gcg::RowGraph< T >::RowGraph().
◆ ~RowGraphWeighted()
|
virtual |
Definition at line 69 of file rowgraph_weighted_def.h.
Member Function Documentation
◆ createFromMatrix()
|
virtual |
- Parameters
-
conss constraints for which graph should be created vars variables for which graph should be created nconss_ number of constraints nvars_ number of variables dist Here we define the distance measure between two rows w_type Depending on the algorithm we can build distance or similarity graph
Definition at line 76 of file rowgraph_weighted_def.h.
References assert(), c, calculateSimilarity(), gcg::DIST, GCGgetOrigprob(), GCGisVarRelevant(), gcg::RowGraph< T >::graph, i, gcg::INTERSECTION, j, gcg::MatrixGraph< T >::nconss, gcg::MatrixGraph< T >::nvars, SCIP_CALL(), SCIPfreeBufferArray(), success, and vars.
◆ createFromPartialMatrix()
|
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
-
detprobdata detection process information and data partialdec partial decomposition to use for matrix dist Here we define the distance measure between two rows w_type Depending on the algorithm we can build distance or similarity graph
Definition at line 222 of file rowgraph_weighted_def.h.
References assert(), c, calculateSimilarity(), 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(), gcg::RowGraph< T >::graph, i, gcg::INTERSECTION, j, gcg::MatrixGraph< T >::nconss, gcg::MatrixGraph< T >::nvars, SCIP_CALL(), and var.
Referenced by GCG_DECL_PROPAGATEPARTIALDEC(), and GCG_DECL_PROPAGATEPARTIALDEC().
◆ calculateSimilarity()
|
static |
- Parameters
-
a number of common variables in two rows b number of variables that appear only in the 2nd row c number of variables that appear only in the 1st row dist Here we define the distance measure between two rows w_type Depending on the algorithm we can build distance or similarity graph itself true if we calculate similarity between the row itself
Definition at line 369 of file rowgraph_weighted_def.h.
References assert(), c, gcg::COSINE, gcg::DIST, gcg::INTERSECTION, gcg::JACCARD, gcg::JOHNSON, result, and gcg::SIMPSON.
Referenced by createFromMatrix(), and createFromPartialMatrix().
◆ computePartitionDBSCAN() [1/2]
|
virtual |
return a partition of the nodes with the help of DBSCAN
◆ computePartitionDBSCANForPartialGraph() [1/2]
|
virtual |
return a partition of the nodes with the help of DBSCAN
Referenced by GCG_DECL_PROPAGATEPARTIALDEC().
◆ computePartitionMST() [1/2]
|
virtual |
return a partition of the nodes with the help of MST
◆ computePartitionMSTForPartialGraph() [1/2]
|
virtual |
return a partition of the nodes with the help of MST
Referenced by GCG_DECL_PROPAGATEPARTIALDEC().
◆ computePartitionMCL() [1/2]
|
virtual |
return a partition of the nodes with the help of MST
◆ computePartitionMCLForPartialGraph() [1/2]
|
virtual |
return a partition of the nodes with the help of MST
References getEdgeWeightPercentile(), getNBlocks(), and nonClustered().
◆ getNBlocks()
|
virtual |
return the number of clusters after post-processing
Definition at line 1303 of file rowgraph_weighted_def.h.
Referenced by computePartitionMCLForPartialGraph(), GCG_DECL_PROPAGATEPARTIALDEC(), and GCG_DECL_PROPAGATEPARTIALDEC().
◆ nonClustered()
|
virtual |
Definition at line 1310 of file rowgraph_weighted_def.h.
Referenced by computePartitionMCLForPartialGraph(), GCG_DECL_PROPAGATEPARTIALDEC(), and GCG_DECL_PROPAGATEPARTIALDEC().
◆ getEdgeWeightPercentile()
|
virtual |
Definition at line 1317 of file rowgraph_weighted_def.h.
References gcg::RowGraph< T >::graph.
Referenced by computePartitionMCLForPartialGraph().
◆ computePartitionDBSCAN() [2/2]
| SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionDBSCAN | ( | double | eps, |
| bool | postprocenable ) |
Definition at line 1236 of file rowgraph_weighted_def.h.
References assert(), gcg::GraphAlgorithms< T >::dbscan(), gcg::RowGraph< T >::graph, and SCIP_CALL().
◆ computePartitionDBSCANForPartialGraph() [2/2]
| SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionDBSCANForPartialGraph | ( | gcg::DETPROBDATA * | detprobdata, |
| gcg::PARTIALDECOMP * | partialdec, | ||
| double | eps, | ||
| bool | postprocenable ) |
Definition at line 1247 of file rowgraph_weighted_def.h.
References assert(), gcg::GraphAlgorithms< T >::dbscan(), gcg::RowGraph< T >::graph, and SCIP_CALL().
◆ computePartitionMST() [2/2]
| SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMST | ( | double | eps, |
| bool | postprocenable ) |
Definition at line 1259 of file rowgraph_weighted_def.h.
References assert(), gcg::RowGraph< T >::graph, gcg::GraphAlgorithms< T >::mst(), and SCIP_CALL().
◆ computePartitionMSTForPartialGraph() [2/2]
| SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMSTForPartialGraph | ( | gcg::DETPROBDATA * | detprobdata, |
| gcg::PARTIALDECOMP * | partialdec, | ||
| double | eps, | ||
| bool | postprocenable ) |
Definition at line 1270 of file rowgraph_weighted_def.h.
References assert(), gcg::RowGraph< T >::graph, gcg::GraphAlgorithms< T >::mst(), and SCIP_CALL().
◆ computePartitionMCL() [2/2]
| SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMCL | ( | int & | stoppedAfter, |
| double | inflatefactor, | ||
| bool | postprocenable ) |
Definition at line 1281 of file rowgraph_weighted_def.h.
References assert(), gcg::RowGraph< T >::graph, gcg::GraphAlgorithms< T >::mcl(), and SCIP_CALL().
◆ computePartitionMCLForPartialGraph() [2/2]
| SCIP_RETCODE gcg::RowGraphWeighted< GraphGCG >::computePartitionMCLForPartialGraph | ( | gcg::DETPROBDATA * | detprobdata, |
| gcg::PARTIALDECOMP * | partialdec, | ||
| int & | stoppedAfter, | ||
| double | inflatefactor, | ||
| bool | postprocenable ) |
Definition at line 1292 of file rowgraph_weighted_def.h.
References assert(), gcg::RowGraph< T >::graph, gcg::GraphAlgorithms< T >::mcl(), and SCIP_CALL().