Scippy

SCIP

Solving Constraint Integer Programs

pub_history.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-2019 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file pub_history.h
17  * @ingroup PUBLICCOREAPI
18  * @brief public methods for branching and inference history structure
19  * @author Stefan Heinz
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_HISTORY_H__
25 #define __SCIP_PUB_HISTORY_H__
26 
27 #include "scip/def.h"
28 #include "scip/type_history.h"
29 
30 #ifdef NDEBUG
31 #include "scip/struct_history.h"
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /** gets the conflict score of the history entry */
41  SCIP_HISTORY* history, /**< branching and inference history */
42  SCIP_BRANCHDIR dir /**< branching direction */
43  );
44 
45 /** get number of cutoffs counter */
48  SCIP_HISTORY* history, /**< branching and inference history */
49  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
50  );
51 
52 /** return the number of (domain) values for which a history exists */
55  SCIP_VALUEHISTORY* valuehistory /**< value based history */
56  );
57 
58 /** return the array containing the histories for the individual (domain) values */
61  SCIP_VALUEHISTORY* valuehistory /**< value based history */
62  );
63 
64 /** return the array containing the (domain) values for which a history exists */
67  SCIP_VALUEHISTORY* valuehistory /**< value based history */
68  );
69 
70 #ifdef NDEBUG
71 
72 /* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
73  * speed up the algorithms.
74  */
75 
76 #define SCIPhistoryGetVSIDS(history,dir) ((history)->vsids[dir])
77 #define SCIPhistoryGetCutoffSum(history,dir) ((history)->cutoffsum[dir])
78 #define SCIPvaluehistoryGetNValues(valuehistory) (valuehistory)->nvalues
79 #define SCIPvaluehistoryGetHistories(valuehistory) (valuehistory)->histories
80 #define SCIPvaluehistoryGetValues(valuehistory) (valuehistory)->values
81 
82 #endif
83 
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif
#define SCIP_EXPORT
Definition: def.h:98
SCIP_EXPORT SCIP_Real SCIPhistoryGetVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition: history.c:512
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:39
SCIP_EXPORT SCIP_HISTORY ** SCIPvaluehistoryGetHistories(SCIP_VALUEHISTORY *valuehistory)
Definition: history.c:357
SCIP_EXPORT int SCIPvaluehistoryGetNValues(SCIP_VALUEHISTORY *valuehistory)
Definition: history.c:347
SCIP_EXPORT SCIP_Real SCIPhistoryGetCutoffSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition: history.c:654
datastructures for branching and inference history
SCIP_EXPORT SCIP_Real * SCIPvaluehistoryGetValues(SCIP_VALUEHISTORY *valuehistory)
Definition: history.c:367
#define SCIP_Real
Definition: def.h:164
type definitions for branching and inference history
common defines and data types used in all packages of SCIP