GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches

Detailed Description

Public methods for scores.

Functions

GCG_EXPORT SCIP_RETCODE GCGincludeScore (GCG *gcg, const char *name, const char *shortname, const char *description, GCG_SCOREDATA *scoredata, GCG_DECL_SCOREFREE((*scorefree)),)
 creates a score and includes it in GCG
GCG_EXPORT GCG_SCORE * GCGfindScore (GCG *gcg, const char *name)
 searches for the score with the given name and returns it or NULL if score is not found
GCG_EXPORT GCG_SCORE * GCGfindScoreByShortname (GCG *gcg, const char *shortname)
 searches for the score with the given shortname and returns it or NULL if score is not found
GCG_EXPORT GCG_SCORE ** GCGgetScores (GCG *gcg)
GCG_EXPORT int GCGgetNScores (GCG *gcg)
GCG_EXPORT GCG_SCOREDATA * GCGscoreGetData (GCG_SCORE *score)
GCG_EXPORT void GCGscoreSetData (GCG_SCORE *score, GCG_SCOREDATA *scoredata)
GCG_EXPORT const char * GCGscoreGetName (GCG_SCORE *score)
GCG_EXPORT const char * GCGscoreGetShortname (GCG_SCORE *score)
GCG_EXPORT const char * GCGscoreGetDesc (GCG_SCORE *score)

Function Documentation

◆ GCGincludeScore()

GCG_EXPORT SCIP_RETCODE GCGincludeScore ( GCG * gcg,
const char * name,
const char * shortname,
const char * description,
GCG_SCOREDATA * scoredata,
GCG_DECL_SCOREFREE((*scorefree))  )

creates a score and includes it in GCG

Returns
scip return code
Parameters
gcgGCG data structure
namename of score
shortnameshortname of score
descriptiondescription of score
scoredatascore data
-destructor of score score calculation method of score

Definition at line 50 of file score.c.

References GCG_DECL_SCORECALC, GCG_DECL_SCOREFREE, GCGconshdlrDecompIncludeScore(), GCGfindScore(), GCGfindScoreByShortname(), GCGincludeScore(), and SCIP_CALL().

Referenced by GCGincludeScore(), GCGincludeScoreBender(), GCGincludeScoreBorder(), GCGincludeScoreClassic(), GCGincludeScoreFawh(), GCGincludeScoreForswh(), GCGincludeScoreMaxwhite(), GCGincludeScoreSpfawh(), GCGincludeScoreSpfwh(), and GCGincludeScoreStrongDecomp().

◆ GCGfindScore()

GCG_EXPORT GCG_SCORE * GCGfindScore ( GCG * gcg,
const char * name )

searches for the score with the given name and returns it or NULL if score is not found

Returns
score pointer or NULL if score with given name is not found
Parameters
gcgGCG data structure
namename of score

Definition at line 76 of file score.c.

References assert(), GCGconshdlrDecompFindScore(), and GCGfindScore().

Referenced by GCGfindScore(), and GCGincludeScore().

◆ GCGfindScoreByShortname()

GCG_EXPORT GCG_SCORE * GCGfindScoreByShortname ( GCG * gcg,
const char * shortname )

searches for the score with the given shortname and returns it or NULL if score is not found

Returns
score pointer or NULL if score with given shortname is not found
Parameters
gcgGCG data structure
shortnameshortname of score

Definition at line 91 of file score.c.

References assert(), GCGconshdlrDecompFindScoreByShortname(), and GCGfindScoreByShortname().

Referenced by GCGfindScoreByShortname(), and GCGincludeScore().

◆ GCGgetScores()

GCG_EXPORT GCG_SCORE ** GCGgetScores ( GCG * gcg)

returns the array of currently available scores

Parameters
gcgGCG data structure

Definition at line 103 of file score.c.

References assert(), GCGconshdlrDecompGetScores(), and GCGgetScores().

Referenced by GCGgetScores(), and SCIP_DECL_DIALOGEXEC().

◆ GCGgetNScores()

GCG_EXPORT int GCGgetNScores ( GCG * gcg)

returns the number of currently available scores

Parameters
gcgGCG data structure

Definition at line 113 of file score.c.

References assert(), GCGconshdlrDecompGetNScores(), and GCGgetNScores().

Referenced by GCGgetNScores(), and SCIP_DECL_DIALOGEXEC().

◆ GCGscoreGetData()

GCG_EXPORT GCG_SCOREDATA * GCGscoreGetData ( GCG_SCORE * score)

◆ GCGscoreSetData()

GCG_EXPORT void GCGscoreSetData ( GCG_SCORE * score,
GCG_SCOREDATA * scoredata )

sets user data of score; user has to free old data in advance!

Parameters
scorescore
scoredatanew score user data

Definition at line 133 of file score.c.

References assert(), GCGscoreSetData(), and GCG_Score::scoredata.

Referenced by GCGscoreSetData().

◆ GCGscoreGetName()

GCG_EXPORT const char * GCGscoreGetName ( GCG_SCORE * score)

gets name of score

Parameters
scorescore

Definition at line 145 of file score.c.

References assert(), GCGscoreGetName(), and GCG_Score::name.

Referenced by gcg::PARTIALDECOMP::displayInfo(), GCG_DECL_SCOREFREE(), gcg::GCGdialogChangeScore(), GCGscoreGetName(), and SCIP_DECL_DIALOGEXEC().

◆ GCGscoreGetShortname()

GCG_EXPORT const char * GCGscoreGetShortname ( GCG_SCORE * score)

◆ GCGscoreGetDesc()

GCG_EXPORT const char * GCGscoreGetDesc ( GCG_SCORE * score)

gets description of score

Parameters
scorescore

Definition at line 165 of file score.c.

References assert(), GCG_Score::description, and GCGscoreGetDesc().

Referenced by gcg::GCGdialogShowLegend(), GCGscoreGetDesc(), SCIP_DECL_DIALOGEXEC(), and writeTexTitlepage().