Scippy

SCIP

Solving Constraint Integer Programs

boundstore.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
4/* SCIP --- Solving Constraint Integer Programs */
5/* */
6/* Copyright (c) 2002-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file boundstore.h
26 * @ingroup PARALLEL
27 * @brief the interface of the boundstore structure
28 * @author Leona Gottwald
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#include "scip/def.h"
34#include "scip/type_syncstore.h"
35#include "scip/type_scip.h"
36#include "scip/type_lp.h"
37#include "scip/type_retcode.h"
38
39#ifndef __SCIP_BOUNDSTORE_H__
40#define __SCIP_BOUNDSTORE_H__
41
42/** create bound store data structure */
43SCIP_EXPORT
45 SCIP* scip, /**< scip main datastructure */
46 SCIP_BOUNDSTORE** boundstore, /**< pointer to store the bound store datastructure */
47 int nvars /**< number of variables for which bounds may be stored */
48 );
49
50/** free bound store data structure */
51SCIP_EXPORT
53 SCIP* scip, /**< scip main datastructure */
54 SCIP_BOUNDSTORE** boundstore /**< pointer to the bound store datastructure */
55 );
56
57/** add bound change to bound store data structure */
58SCIP_EXPORT
60 SCIP* scip, /**< scip main datastructure */
61 SCIP_BOUNDSTORE* boundstore, /**< the bound store datastructure */
62 int varidx, /**< variable index of bound change, must be smaller than the
63 * number of variables given during creation of bound store */
64 SCIP_Real newbound, /**< bound value of variable */
65 SCIP_BOUNDTYPE boundtype /**< type of new bound */
66 );
67
68/** add all bound changes of source to target */
69SCIP_EXPORT
71 SCIP* scip, /**< scip main datastructure for target boundstore */
72 SCIP_BOUNDSTORE* target, /**< the bound store datastructure where the bounds get merged in */
73 SCIP_BOUNDSTORE* source /**< the bound store datastructure from which the bounds get merged in */
74 );
75
76/** remove all boundchanges from bound store */
77SCIP_EXPORT
79 SCIP_BOUNDSTORE* boundstore /**< the bound store datastructure */
80 );
81
82/** gets variable index of the i'th stored boundchange */
83SCIP_EXPORT
85 SCIP_BOUNDSTORE* boundstore, /**< the bound store datastructure */
86 int i /**< the index of the bound change */
87 );
88
89/** gets the type of the i'th stored boundchange */
90SCIP_EXPORT
92 SCIP_BOUNDSTORE* boundstore, /**< the bound store datastructure */
93 int i /**< the index of the bound change */
94 );
95
96/** gets the bound value of the i'th stored boundchange */
97SCIP_EXPORT
99 SCIP_BOUNDSTORE* boundstore, /**< the bound store datastructure */
100 int i /**< the index of the bound change */
101 );
102
103/** gets the number of stored bound changes */
104SCIP_EXPORT
106 SCIP_BOUNDSTORE* boundstore /**< the bound store datastructure */
107 );
108
109#endif
SCIP_Real SCIPboundstoreGetChgVal(SCIP_BOUNDSTORE *boundstore, int i)
Definition: boundstore.c:185
SCIP_BOUNDTYPE SCIPboundstoreGetChgType(SCIP_BOUNDSTORE *boundstore, int i)
Definition: boundstore.c:173
SCIP_RETCODE SCIPboundstoreMerge(SCIP *scip, SCIP_BOUNDSTORE *target, SCIP_BOUNDSTORE *source)
Definition: boundstore.c:124
SCIP_RETCODE SCIPboundstoreAdd(SCIP *scip, SCIP_BOUNDSTORE *boundstore, int varidx, SCIP_Real newbound, SCIP_BOUNDTYPE boundtype)
Definition: boundstore.c:75
int SCIPboundstoreGetChgVaridx(SCIP_BOUNDSTORE *boundstore, int i)
Definition: boundstore.c:161
void SCIPboundstoreFree(SCIP *scip, SCIP_BOUNDSTORE **boundstore)
Definition: boundstore.c:60
SCIP_RETCODE SCIPboundstoreCreate(SCIP *scip, SCIP_BOUNDSTORE **boundstore, int nvars)
Definition: boundstore.c:39
void SCIPboundstoreClear(SCIP_BOUNDSTORE *boundstore)
Definition: boundstore.c:146
int SCIPboundstoreGetNChgs(SCIP_BOUNDSTORE *boundstore)
Definition: boundstore.c:197
common defines and data types used in all packages of SCIP
#define SCIP_Real
Definition: def.h:173
type definitions for LP management
enum SCIP_BoundType SCIP_BOUNDTYPE
Definition: type_lp.h:59
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for SCIP's main datastructure
the type definitions for the synchronization store