Detailed Description
file reader for vertex coloring instances
This file implements the reader for vertex coloring problems in DIMACS standard format.
Definition in file reader_col.c.
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include "reader_col.h"
Go to the source code of this file.
Macros | |
#define | READER_NAME "colreader" |
#define | READER_DESC "file reader for a .col-file representing a graph that should be colored" |
#define | READER_EXTENSION "col" |
#define | COL_MAX_LINELEN 1024 |
Functions | |
static long | getNextNumber (char **s) |
static SCIP_RETCODE | readCol (SCIP *scip, const char *filename) |
static | SCIP_DECL_READERCOPY (readerCopyCol) |
static | SCIP_DECL_READERREAD (readerReadCol) |
SCIP_RETCODE | SCIPincludeReaderCol (SCIP *scip) |
Macro Definition Documentation
◆ READER_NAME
#define READER_NAME "colreader" |
Definition at line 42 of file reader_col.c.
Referenced by SCIP_DECL_READERCOPY(), SCIP_DECL_READERREAD(), and SCIPincludeReaderCol().
◆ READER_DESC
Definition at line 43 of file reader_col.c.
Referenced by SCIPincludeReaderCol().
◆ READER_EXTENSION
#define READER_EXTENSION "col" |
Definition at line 44 of file reader_col.c.
Referenced by SCIPincludeReaderCol().
◆ COL_MAX_LINELEN
#define COL_MAX_LINELEN 1024 |
Definition at line 46 of file reader_col.c.
Referenced by readCol().
Function Documentation
◆ getNextNumber()
|
static |
get next number from string s
- Parameters
-
s pointer to the pointer of the current position in the string
Definition at line 56 of file reader_col.c.
Referenced by readCol().
◆ readCol()
|
static |
read LP in "COL File Format"
- Parameters
-
scip SCIP data structure filename name of the input file
Definition at line 74 of file reader_col.c.
References COL_MAX_LINELEN, COLORprobSetUpArrayOfCons(), FALSE, getNextNumber(), nnodes, NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_NOFILE, SCIP_OKAY, SCIP_READERROR, SCIPactivatePricer(), SCIPallocBufferArray, SCIPcreateProbColoring(), SCIPdebugMessage, SCIPerrorMessage, SCIPfclose(), SCIPfeof(), SCIPfgets(), SCIPfindPricer(), SCIPfopen(), SCIPfreeBufferArray, SCIPsetObjIntegral(), and TRUE.
Referenced by SCIP_DECL_READERREAD().
◆ SCIP_DECL_READERCOPY()
|
static |
copy method for reader plugins (called when SCIP copies plugins)
Definition at line 267 of file reader_col.c.
References NULL, READER_NAME, SCIP_OKAY, and SCIPreaderGetName().
◆ SCIP_DECL_READERREAD()
|
static |
problem reading method of reader
Definition at line 278 of file reader_col.c.
References NULL, readCol(), READER_NAME, SCIP_CALL, SCIP_OKAY, SCIP_SUCCESS, and SCIPreaderGetName().
◆ SCIPincludeReaderCol()
SCIP_RETCODE SCIPincludeReaderCol | ( | SCIP * | scip | ) |
includes the col file reader in SCIP
- Parameters
-
scip SCIP data structure
Definition at line 300 of file reader_col.c.
References NULL, READER_DESC, READER_EXTENSION, READER_NAME, SCIP_CALL, SCIP_OKAY, SCIPincludeReaderBasic(), SCIPsetReaderCopy(), and SCIPsetReaderRead().
Referenced by SCIPincludeColoringPlugins().