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-2014 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  * @brief public methods for branching and inference history structure
18  * @author Stefan Heinz
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_PUB_HISTORY_H__
24 #define __SCIP_PUB_HISTORY_H__
25 
26 #ifdef NDEBUG
27 #include "scip/struct_history.h"
28 #endif
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #ifndef NDEBUG
35 
36 /** gets the conflict score of the history entry */
37 extern
39  SCIP_HISTORY* history, /**< branching and inference history */
40  SCIP_BRANCHDIR dir /**< branching direction */
41  );
42 
43 /** get number of cutoffs counter */
44 extern
46  SCIP_HISTORY* history, /**< branching and inference history */
47  SCIP_BRANCHDIR dir /**< branching direction (downwards, or upwards) */
48  );
49 
50 /** return the number of (domain) values for which a history exists */
51 extern
53  SCIP_VALUEHISTORY* valuehistory /**< value based history */
54  );
55 
56 /** return the array containing the histories for the individual (domain) values */
57 extern
59  SCIP_VALUEHISTORY* valuehistory /**< value based history */
60  );
61 
62 /** return the array containing the (domain) values for which a history exists */
63 extern
65  SCIP_VALUEHISTORY* valuehistory /**< value based history */
66  );
67 
68 #else
69 
70 /* In optimized mode, the methods are implemented as defines to reduce the number of function calls and
71  * speed up the algorithms.
72  */
73 
74 #define SCIPhistoryGetVSIDS(history,dir) ((history)->vsids[dir])
75 
76 #define SCIPvaluehistoryGetNValues(valuehistory) (valuehistory)->nvalues
77 #define SCIPvaluehistoryGetHistories(valuehistory) (valuehistory)->histories
78 #define SCIPvaluehistoryGetValues(valuehistory) (valuehistory)->values
79 
80 #endif
81 
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif
int SCIPvaluehistoryGetNValues(SCIP_VALUEHISTORY *valuehistory)
SCIP_HISTORY ** SCIPvaluehistoryGetHistories(SCIP_VALUEHISTORY *valuehistory)
enum SCIP_BranchDir SCIP_BRANCHDIR
Definition: type_history.h:39
struct SCIP_History SCIP_HISTORY
Definition: type_history.h:41
struct SCIP_ValueHistory SCIP_VALUEHISTORY
Definition: type_history.h:49
SCIP_Real SCIPhistoryGetVSIDS(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)
SCIP_Real * SCIPvaluehistoryGetValues(SCIP_VALUEHISTORY *valuehistory)
#define SCIP_Real
Definition: def.h:123
SCIP_Real SCIPhistoryGetCutoffSum(SCIP_HISTORY *history, SCIP_BRANCHDIR dir)