Loading...
Searching...
No Matches
dialog_graph.cpp
Go to the documentation of this file.
30 * @brief A dialog to write graph representations of the matrix and read partitions as decompositions.
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
97SCIP_RETCODE DialogWriteGraphs<T, G>::scip_exec(SCIP* scip, SCIP_DIALOG* dialog, SCIP_DIALOGHDLR* dialoghdlr, SCIP_DIALOG** nextdialog)
109 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
134 SCIP_CALL( graph->createFromMatrix(SCIPgetConss(scip), SCIPgetVars(scip), SCIPgetNConss(scip), SCIPgetNVars(scip)) );
146): ObjDialog(gcgstruct, G<T>(gcgstruct, Weights()).name.c_str(), "reads graph of given type", FALSE)
148 (void)static_cast<MatrixGraph<T>*>((G<T>*)0); /* assure we only get descendants of type Graph */
152SCIP_RETCODE DialogReadGraphs<T, G>::scip_exec(SCIP* scip, SCIP_DIALOG* dialog, SCIP_DIALOGHDLR* dialoghdlr, SCIP_DIALOG** nextdialog)
164 SCIP_CALL( SCIPdialoghdlrGetWord(dialoghdlr, dialog, "enter filename: ", &filename, &endoffile) );
177 SCIP_CALL( graph->createFromMatrix(SCIPgetConss(scip), SCIPgetVars(scip), SCIPgetNConss(scip), SCIPgetNVars(scip)) );
202 (void)static_cast<gcg::MatrixGraph<T>*>((G<T>*)0); /* assure we only get descendants of type Graph */
virtual SCIP_RETCODE createFromMatrix(SCIP_CONS **conss, SCIP_VAR **vars, int nconss_, int nvars_)
Definition matrixgraph.h:139
virtual SCIP_RETCODE readPartition(const char *filename)
Definition matrixgraph.h:114
virtual SCIP_RETCODE createDecompFromPartition(GCG_DECOMP **decomp)
Definition matrixgraph.h:90
virtual SCIP_RETCODE writeToFile(int fd, SCIP_Bool writeweights)
Definition matrixgraph.h:80
Definition dialog_graph.h:48
Definition dialog_graph.h:79
DialogReadGraphs(GCG *gcgstruct)
Definition dialog_graph.cpp:144
Definition dialog_graph.h:68
DialogReadPartition(GCG *gcg)
Definition dialog_graph.cpp:74
Definition dialog_graph.h:58
DialogWriteGraph(GCG *gcgstruct)
Definition dialog_graph.cpp:51
Definition dialog_graph.h:92
DialogWriteGraphs(GCG *gcgstruct)
Definition dialog_graph.cpp:88
Definition matrixgraph.h:55
ObjDialog(GCG *gcgstruct, const char *name, const char *desc, SCIP_Bool issubmenu)
Definition objdialog.h:74
Definition weights.h:43
A row graph where each column is a node and columns are adjacent if they appear in a row.
SCIP_RETCODE GCGconshdlrDecompAddPreexistingDecomp(GCG *gcg, GCG_DECOMP *decomp)
adds a decomp that exists before the detection is called
Definition cons_decomp.cpp:3112
constraint handler for structure detection
#define SCIP_Bool
A dialog to write graph representations of the matrix and read partitions as decompositions.
#define TRUE
#define FALSE
interface to the SCIP tclique graph library
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
void SCIPdialogMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_DIALOG * SCIPdialoghdlrGetRoot(SCIP_DIALOGHDLR *dialoghdlr)
SCIP_RETCODE SCIPdialoghdlrAddHistory(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *command, SCIP_Bool escapecommand)
SCIP_RETCODE SCIPdialoghdlrGetWord(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *prompt, char **inputword, SCIP_Bool *endoffile)
SCIP_DIALOG * SCIPgetRootDialog(SCIP *scip)
int SCIPdialogFindEntry(SCIP_DIALOG *dialog, const char *entryname, SCIP_DIALOG **subdialog)
static assert(heur !=NULL)
SCIP_CALL(SCIPgetExternBranchCands(origprob, &lpcands, &lpcandssol, NULL, &nlpcands, NULL, NULL, NULL, NULL))
Column hypergraph.
A hypergraph with row and column nodes.
Column hypergraph.
#define NULL
Definition class_conspartition.cpp:44
SCIP_DECL_DIALOGEXEC(DialogWriteGraph::scip_exec)
Definition dialog_graph.cpp:58
SCIP_RETCODE GCGincludeObjDialog(GCG *gcg, SCIP_DIALOG *parentdialog, gcg::ObjDialog *objdialog, SCIP_Bool deleteobject)
Definition objdialog.cpp:126
A row graph where each row is a node and rows are adjacent if they share a variable.
various SCIP helper methods
struct SCIP_Dialog SCIP_DIALOG
struct SCIP_Dialoghdlr SCIP_DIALOGHDLR
SCIP_FILECREATEERROR
enum SCIP_Retcode SCIP_RETCODE
struct Scip SCIP
SCIP_STAGE_PROBLEM