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-2017 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 email to 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 #ifdef NDEBUG
28 #include "scip/struct_history.h"
29 #endif
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #ifndef NDEBUG
36 
37 /** gets the conflict score of the history entry */
38 extern
40  SCIP_HISTORY* history, /**< branching and inference history */
41  SCIP_BRANCHDIR dir /**< branching direction */
42  );
43 
44 /** get number of cutoffs counter */
45 extern
47  SCIP_HISTORY* history, /**< branching and inference history */
48  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
49  );
50 
51 /** return the number of (domain) values for which a history exists */
52 extern
54  SCIP_VALUEHISTORY* valuehistory /**< value based history */
55  );
56 
57 /** return the array containing the histories for the individual (domain) values */
58 extern
60  SCIP_VALUEHISTORY* valuehistory /**< value based history */
61  );
62 
63 /** return the array containing the (domain) values for which a history exists */
64 extern
66  SCIP_VALUEHISTORY* valuehistory /**< value based history */
67  );
68 
69 #else
70 
71 /* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
72  * speed up the algorithms.
73  */
74 
75 #define SCIPhistoryGetVSIDS(history,dir) ((history)->vsids[dir])
76 
77 #define SCIPvaluehistoryGetNValues(valuehistory) (valuehistory)->nvalues
78 #define SCIPvaluehistoryGetHistories(valuehistory) (valuehistory)->histories
79 #define SCIPvaluehistoryGetValues(valuehistory) (valuehistory)->values
80 
81 #endif
82 
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif
int SCIPvaluehistoryGetNValues(SCIP_VALUEHISTORY *valuehistory)
Definition: history.c:348
SCIP_HISTORY ** SCIPvaluehistoryGetHistories(SCIP_VALUEHISTORY *valuehistory)
Definition: history.c:358
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:39
SCIP_Real SCIPhistoryGetVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition: history.c:513
datastructures for branching and inference history
SCIP_Real * SCIPvaluehistoryGetValues(SCIP_VALUEHISTORY *valuehistory)
Definition: history.c:368
#define SCIP_Real
Definition: def.h:135
SCIP_Real SCIPhistoryGetCutoffSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
Definition: history.c:655