Detailed Description
classifies constraints according to levenshtein distance graph of their names
Definition in file clscons_consnamelevenshtein.cpp.
#include "gcg/clscons_consnamelevenshtein.h"#include "gcg/cons_decomp.h"#include "gcg/cons_decomp.hpp"#include <vector>#include <stdio.h>#include <sstream>#include <queue>#include "gcg/class_detprobdata.h"#include "gcg/class_conspartition.h"#include "gcg/scip_misc.h"Go to the source code of this file.
Data Structures | |
| struct | GCG_ClassifierData |
Macros | |
| #define | CLSCONS_NAME "consnamelevenshtein" |
| #define | CLSCONS_DESC "constraint names (according to levenshtein distance graph)" |
| #define | CLSCONS_PRIORITY 0 |
| #define | CLSCONS_ENABLED FALSE |
| #define | classifierFree NULL |
Functions | |
| int | calcLevenshteinDistance (std::string s, std::string t) |
| static | GCG_DECL_CONSCLASSIFY (classifierClassify) |
| SCIP_RETCODE | GCGincludeConsClassifierConsnameLevenshtein (GCG *gcg) |
Macro Definition Documentation
◆ CLSCONS_NAME
| #define CLSCONS_NAME "consnamelevenshtein" |
name of classifier
Definition at line 50 of file clscons_consnamelevenshtein.cpp.
Referenced by GCG_DECL_CONSCLASSIFY(), GCG_DECL_CONSCLASSIFY(), GCG_DECL_FREECONSCLASSIFIER(), GCG_DECL_FREECONSCLASSIFIER(), GCGincludeConsClassifierConsnameLevenshtein(), GCGincludeConsClassifierForConsnamesDigitFreeIdentical(), GCGincludeConsClassifierGamsdomain(), GCGincludeConsClassifierGamssymbol(), GCGincludeConsClassifierMiplibConstypes(), GCGincludeConsClassifierNNonzeros(), and GCGincludeConsClassifierScipConstypes().
◆ CLSCONS_DESC
| #define CLSCONS_DESC "constraint names (according to levenshtein distance graph)" |
short description of classification
Definition at line 51 of file clscons_consnamelevenshtein.cpp.
Referenced by GCGincludeConsClassifierConsnameLevenshtein(), GCGincludeConsClassifierForConsnamesDigitFreeIdentical(), GCGincludeConsClassifierGamsdomain(), GCGincludeConsClassifierGamssymbol(), GCGincludeConsClassifierMiplibConstypes(), GCGincludeConsClassifierNNonzeros(), and GCGincludeConsClassifierScipConstypes().
◆ CLSCONS_PRIORITY
| #define CLSCONS_PRIORITY 0 |
Definition at line 52 of file clscons_consnamelevenshtein.cpp.
Referenced by GCGincludeConsClassifierConsnameLevenshtein(), GCGincludeConsClassifierForConsnamesDigitFreeIdentical(), GCGincludeConsClassifierGamsdomain(), GCGincludeConsClassifierGamssymbol(), GCGincludeConsClassifierMiplibConstypes(), GCGincludeConsClassifierNNonzeros(), and GCGincludeConsClassifierScipConstypes().
◆ CLSCONS_ENABLED
| #define CLSCONS_ENABLED FALSE |
Definition at line 54 of file clscons_consnamelevenshtein.cpp.
Referenced by GCGincludeConsClassifierConsnameLevenshtein(), GCGincludeConsClassifierForConsnamesDigitFreeIdentical(), GCGincludeConsClassifierGamsdomain(), GCGincludeConsClassifierGamssymbol(), GCGincludeConsClassifierMiplibConstypes(), GCGincludeConsClassifierNNonzeros(), and GCGincludeConsClassifierScipConstypes().
◆ classifierFree
| #define classifierFree NULL |
destructor of classifier to free user data (called when GCG is exiting)
Definition at line 79 of file clscons_consnamelevenshtein.cpp.
Referenced by GCG_DECL_FREECONSCLASSIFIER(), GCG_DECL_FREECONSCLASSIFIER(), GCG_DECL_FREEVARCLASSIFIER(), GCG_DECL_FREEVARCLASSIFIER(), GCGincludeConsClassifierConsnameLevenshtein(), GCGincludeConsClassifierForConsnamesDigitFreeIdentical(), GCGincludeConsClassifierGamsdomain(), GCGincludeConsClassifierGamssymbol(), GCGincludeConsClassifierMiplibConstypes(), GCGincludeConsClassifierNNonzeros(), GCGincludeConsClassifierScipConstypes(), GCGincludeVarClassifierGamsdomain(), GCGincludeVarClassifierGamssymbol(), GCGincludeVarClassifierObjValues(), GCGincludeVarClassifierObjValueSigns(), and GCGincludeVarClassifierScipVartypes().
Function Documentation
◆ calcLevenshteinDistance()
| int calcLevenshteinDistance | ( | std::string | s, |
| std::string | t ) |
returns levenshtein distance between two strings
Definition at line 82 of file clscons_consnamelevenshtein.cpp.
References calcLevenshteinDistance(), i, and j.
Referenced by calcLevenshteinDistance(), and GCG_DECL_CONSCLASSIFY().
◆ GCG_DECL_CONSCLASSIFY()
|
static |
Definition at line 128 of file clscons_consnamelevenshtein.cpp.
References gcg::ConsPartition::addClass(), gcg::DETPROBDATA::addConsPartition(), assert(), gcg::ConsPartition::assignConsToClass(), gcg::BOTH, calcLevenshteinDistance(), GCG_DECL_CONSCLASSIFY, GCGconshdlrDecompGetDetprobdataOrig(), GCGconshdlrDecompGetDetprobdataPresolved(), GCGgetOrigprob(), gcg::DETPROBDATA::getCons(), gcg::DETPROBDATA::getNConss(), i, j, and origprob.
◆ GCGincludeConsClassifierConsnameLevenshtein()
| SCIP_RETCODE GCGincludeConsClassifierConsnameLevenshtein | ( | GCG * | gcg | ) |
creates the scip consnames no numbers classifier and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 247 of file clscons_consnamelevenshtein.cpp.
References classifierFree, CLSCONS_DESC, CLSCONS_ENABLED, CLSCONS_NAME, CLSCONS_PRIORITY, GCGincludeConsClassifier(), GCGincludeConsClassifierConsnameLevenshtein(), and SCIP_CALL().
Referenced by GCGincludeConsClassifierConsnameLevenshtein(), and GCGincludeGcgPlugins().