43#define READER_NAME "cycreader"
44#define READER_DESC "file reader for a .cyc-file with a transition matrix for a cycle clustering problem"
45#define READER_EXTENSION "cyc"
47#define COL_MAX_LINELEN 10000
68 while( (**s != 0) && (!isspace(**s)) )
107 while( !
SCIPfeof(fp) && (buf[0] !=
'#' || buf[2] !=
'p') )
130 if( ncluster <= 0 || nbins <= ncluster )
132 SCIPerrorMessage(
"Number of cluster must be positive and smaller than number of bins!\n");
138 for(
i = 0;
i < nbins;
i++ )
149 for( col = 0; col < nbins; ++col )
156 SCIPerrorMessage(
"more lines than expected: expected %d many, but got already %d'th (non-duplicate) edge",
170 for(
i = nbins - 1;
i >= 0;
i-- )
236 "factor to scale the cohrence in the target function",
NULL,
FALSE, 0.001, 0.0, 1.0,
NULL,
NULL ) );
SCIP_FILE * SCIPfopen(const char *path, const char *mode)
int SCIPfeof(SCIP_FILE *stream)
int SCIPfclose(SCIP_FILE *fp)
char * SCIPfgets(char *s, int size, SCIP_FILE *stream)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPaddCharParam(SCIP *scip, const char *name, const char *desc, char *valueptr, SCIP_Bool isadvanced, char defaultvalue, const char *allowedvalues, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
#define SCIPallocMemoryArray(scip, ptr, num)
#define SCIPfreeMemoryArray(scip, ptr)
SCIP_RETCODE SCIPsetReaderCopy(SCIP *scip, SCIP_READER *reader,)
SCIP_RETCODE SCIPincludeReaderBasic(SCIP *scip, SCIP_READER **readerptr, const char *name, const char *desc, const char *extension, SCIP_READERDATA *readerdata)
SCIP_RETCODE SCIPsetReaderRead(SCIP *scip, SCIP_READER *reader,)
const char * SCIPreaderGetName(SCIP_READER *reader)
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_RETCODE SCIPcreateProbCyc(SCIP *scip, const char *name, int nbins, int ncluster, SCIP_Real **cmatrix)
problem data for cycle clustering problem
struct SCIP_File SCIP_FILE
SCIP_RETCODE SCIPincludeReaderCyc(SCIP *scip)
static SCIP_Real getNextNumber(char **s)
static SCIP_RETCODE readCyc(SCIP *scip, const char *filename)
file reader for cycle clustering instances
struct SCIP_ReaderData SCIP_READERDATA
struct SCIP_Reader SCIP_READER
#define SCIP_DECL_READERREAD(x)
#define SCIP_DECL_READERCOPY(x)
enum SCIP_Retcode SCIP_RETCODE