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 #ifndef NDEBUG
39 
40 /** gets the conflict score of the history entry */
41 extern
43  SCIP_HISTORY* history, /**< branching and inference history */
44  SCIP_BRANCHDIR dir /**< branching direction */
45  );
46 
47 /** get number of cutoffs counter */
48 extern
50  SCIP_HISTORY* history, /**< branching and inference history */
51  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
52  );
53 
54 /** return the number of (domain) values for which a history exists */
55 extern
57  SCIP_VALUEHISTORY* valuehistory /**< value based history */
58  );
59 
60 /** return the array containing the histories for the individual (domain) values */
61 extern
63  SCIP_VALUEHISTORY* valuehistory /**< value based history */
64  );
65 
66 /** return the array containing the (domain) values for which a history exists */
67 extern
69  SCIP_VALUEHISTORY* valuehistory /**< value based history */
70  );
71 
72 #else
73 
74 /* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
75  * speed up the algorithms.
76  */
77 
78 #define SCIPhistoryGetVSIDS(history,dir) ((history)->vsids[dir])
79 
80 #define SCIPvaluehistoryGetNValues(valuehistory) (valuehistory)->nvalues
81 #define SCIPvaluehistoryGetHistories(valuehistory) (valuehistory)->histories
82 #define SCIPvaluehistoryGetValues(valuehistory) (valuehistory)->values
83 
84 #endif
85 
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif
int SCIPvaluehistoryGetNValues(SCIP_VALUEHISTORY *valuehistory)
Definition: history.c:347
SCIP_HISTORY ** SCIPvaluehistoryGetHistories(SCIP_VALUEHISTORY *valuehistory)
Definition: history.c:357
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:39
SCIP_Real SCIPhistoryGetVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition: history.c:512
datastructures for branching and inference history
SCIP_Real * SCIPvaluehistoryGetValues(SCIP_VALUEHISTORY *valuehistory)
Definition: history.c:367
#define SCIP_Real
Definition: def.h:157
SCIP_Real SCIPhistoryGetCutoffSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition: history.c:654
type definitions for branching and inference history
common defines and data types used in all packages of SCIP