GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
pub_score.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
4/* GCG --- Generic Column Generation */
5/* a Dantzig-Wolfe decomposition based extension */
6/* of the branch-cut-and-price framework */
7/* SCIP --- Solving Constraint Integer Programs */
8/* */
9/* Copyright (C) 2010-2026 Operations Research, RWTH Aachen University */
10/* Zuse Institute Berlin (ZIB) */
11/* */
12/* Licensed under the Apache License, Version 2.0 (the "License"); */
13/* you may not use this file except in compliance with the License. */
14/* You may obtain a copy of the License at */
15/* */
16/* http://www.apache.org/licenses/LICENSE-2.0 */
17/* */
18/* Unless required by applicable law or agreed to in writing, software */
19/* distributed under the License is distributed on an "AS IS" BASIS, */
20/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
21/* See the License for the specific language governing permissions and */
22/* limitations under the License. */
23/* */
24/* You should have received a copy of the Apache-2.0 license */
25/* along with GCG; see the file LICENSE. If not visit gcg.or.rwth-aachen.de.*/
26/* */
27/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
28
29/**@file pub_score.h
30 * @ingroup PUBLICCOREAPI
31 * @brief public methods for score
32 * @author Jurgen Lentz
33 */
34
35/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
36
37#ifndef __GCG_PUB_SCORE_H__
38#define __GCG_PUB_SCORE_H__
39
40
41#include "scip/scip.h"
42#include "gcg/def.h"
43#include "gcg/type_score.h"
44#include "gcg/type_gcg.h"
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50/**@addtogroup PublicScoreMethods
51 *
52 * @{
53 */
54
55/**
56 * @brief creates a score and includes it in GCG
57 * @returns scip return code
58 */
61 GCG* gcg, /**< GCG data structure */
62 const char* name, /**< name of score */
63 const char* shortname, /**< shortname of score */
64 const char* description, /**< description of score */
65 GCG_SCOREDATA* scoredata, /**< score data */
66 GCG_DECL_SCOREFREE ((*scorefree)), /**< destructor of score */
67 GCG_DECL_SCORECALC ((*scorecalc)) /**< score calculation method of score */
68 );
69
70/**
71 * @brief searches for the score with the given name and returns it or NULL if score is not found
72 * @returns score pointer or NULL if score with given name is not found
73 */
76 GCG* gcg, /**< GCG data structure */
77 const char* name /**< name of score */
78 );
79
80/**
81 * @brief searches for the score with the given shortname and returns it or NULL if score is not found
82 * @returns score pointer or NULL if score with given shortname is not found
83 */
86 GCG* gcg, /**< GCG data structure */
87 const char* shortname /**< shortname of score */
88 );
89
90/** returns the array of currently available scores */
93 GCG* gcg /**< GCG data structure */
94 );
95
96/** returns the number of currently available scores */
99 GCG* gcg /**< GCG data structure */
100 );
101
102/** gets user data of score */
105 GCG_SCORE* score /**< score */
106 );
107
108/** sets user data of score; user has to free old data in advance! */
110void GCGscoreSetData(
111 GCG_SCORE* score, /**< score */
112 GCG_SCOREDATA* scoredata /**< new score user data */
113 );
114
115/** gets name of score */
117const char* GCGscoreGetName(
118 GCG_SCORE* score /**< score */
119 );
120
121/** gets shortname of score */
123const char* GCGscoreGetShortname(
124 GCG_SCORE* score /**< score */
125 );
126
127/** gets description of score */
129const char* GCGscoreGetDesc(
130 GCG_SCORE* score /**< score */
131 );
132
133/** @} */
134
135#ifdef __cplusplus
136}
137#endif
138
139#endif
common defines and data types used in all packages of GCG
#define GCG_EXPORT
Definition def.h:59
GCG_EXPORT GCG_SCOREDATA * GCGscoreGetData(GCG_SCORE *score)
Definition score.c:123
GCG_EXPORT const char * GCGscoreGetName(GCG_SCORE *score)
Definition score.c:145
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
Definition score.c:50
GCG_EXPORT int GCGgetNScores(GCG *gcg)
Definition score.c:113
GCG_EXPORT void GCGscoreSetData(GCG_SCORE *score, GCG_SCOREDATA *scoredata)
Definition score.c:133
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
Definition score.c:91
GCG_EXPORT GCG_SCORE ** GCGgetScores(GCG *gcg)
Definition score.c:103
GCG_EXPORT const char * GCGscoreGetDesc(GCG_SCORE *score)
Definition score.c:165
GCG_EXPORT const char * GCGscoreGetShortname(GCG_SCORE *score)
Definition score.c:155
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
Definition score.c:76
struct Gcg GCG
Definition type_gcg.h:44
enum SCIP_Retcode SCIP_RETCODE
type definitions for score
#define GCG_DECL_SCOREFREE(x)
Definition type_score.h:55
struct GCG_Score GCG_SCORE
Definition type_score.h:45
struct GCG_ScoreData GCG_SCOREDATA
Definition type_score.h:46
#define GCG_DECL_SCORECALC(x)
Definition type_score.h:66