Scippy

SCIP

Solving Constraint Integer Programs

pub_disp.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 pub_disp.h
26  * @ingroup PUBLICCOREAPI
27  * @brief public methods for displaying runtime statistics
28  * @author Tobias Achterberg
29  */
30 
31 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32 
33 #ifndef __SCIP_PUB_DISP_H__
34 #define __SCIP_PUB_DISP_H__
35 
36 
37 #include <stdio.h>
38 
39 #include "scip/def.h"
40 #include "scip/type_retcode.h"
41 #include "scip/type_disp.h"
42 #include "scip/type_message.h"
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 /**@addtogroup PublicDisplayMethods
49  *
50  * @{
51  */
52 
53 /** gets user data of display column */
54 SCIP_EXPORT
56  SCIP_DISP* disp /**< display column */
57  );
58 
59 /** sets user data of display column; user has to free old data in advance! */
60 SCIP_EXPORT
61 void SCIPdispSetData(
62  SCIP_DISP* disp, /**< display column */
63  SCIP_DISPDATA* dispdata /**< new display column user data */
64  );
65 
66 /** gets name of display column */
67 SCIP_EXPORT
68 const char* SCIPdispGetName(
69  SCIP_DISP* disp /**< display column */
70  );
71 
72 /** gets description of display column */
73 SCIP_EXPORT
74 const char* SCIPdispGetDesc(
75  SCIP_DISP* disp /**< display column */
76  );
77 
78 /** gets head line of display column */
79 SCIP_EXPORT
80 const char* SCIPdispGetHeader(
81  SCIP_DISP* disp /**< display column */
82  );
83 
84 /** gets width of display column */
85 SCIP_EXPORT
87  SCIP_DISP* disp /**< display column */
88  );
89 
90 /** gets priority of display column */
91 SCIP_EXPORT
93  SCIP_DISP* disp /**< display column */
94  );
95 
96 /** gets position of display column */
97 SCIP_EXPORT
99  SCIP_DISP* disp /**< display column */
100  );
101 
102 /** gets status of display column */
103 SCIP_EXPORT
105  SCIP_DISP* disp /**< display column */
106  );
107 
108 /** is display column initialized? */
109 SCIP_EXPORT
111  SCIP_DISP* disp /**< display column */
112  );
113 
114 /** displays a long integer in decimal form fitting in a given width */
115 SCIP_EXPORT
116 void SCIPdispLongint(
117  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
118  FILE* file, /**< output stream */
119  SCIP_Longint val, /**< value to display */
120  int width /**< width to fit into */
121  );
122 
123 /** displays an integer in decimal form fitting in a given width */
124 SCIP_EXPORT
125 void SCIPdispInt(
126  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
127  FILE* file, /**< output stream */
128  int val, /**< value to display */
129  int width /**< width to fit into */
130  );
131 
132 /** displays a time value fitting in a given width */
133 SCIP_EXPORT
134 void SCIPdispTime(
135  SCIP_MESSAGEHDLR* messagehdlr, /**< message handler */
136  FILE* file, /**< output stream */
137  SCIP_Real val, /**< value in seconds to display */
138  int width /**< width to fit into */
139  );
140 
141 /** @} */
142 
143 #ifdef __cplusplus
144 }
145 #endif
146 
147 #endif
struct SCIP_DispData SCIP_DISPDATA
Definition: type_disp.h:76
SCIP_DISPSTATUS SCIPdispGetStatus(SCIP_DISP *disp)
Definition: disp.c:395
void SCIPdispLongint(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, SCIP_Longint val, int width)
Definition: disp.c:581
int SCIPdispGetWidth(SCIP_DISP *disp)
Definition: disp.c:365
int SCIPdispGetPriority(SCIP_DISP *disp)
Definition: disp.c:375
const char * SCIPdispGetDesc(SCIP_DISP *disp)
Definition: disp.c:345
type definitions for return codes for SCIP methods
void SCIPdispInt(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, int val, int width)
Definition: disp.c:627
SCIP_Bool SCIPdispIsInitialized(SCIP_DISP *disp)
Definition: disp.c:405
const char * SCIPdispGetHeader(SCIP_DISP *disp)
Definition: disp.c:355
void SCIPdispTime(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, SCIP_Real val, int width)
Definition: disp.c:643
int SCIPdispGetPosition(SCIP_DISP *disp)
Definition: disp.c:385
#define SCIP_Bool
Definition: def.h:91
void SCIPdispSetData(SCIP_DISP *disp, SCIP_DISPDATA *dispdata)
Definition: disp.c:324
enum SCIP_DispStatus SCIP_DISPSTATUS
Definition: type_disp.h:64
#define SCIP_Real
Definition: def.h:173
#define SCIP_Longint
Definition: def.h:158
type definitions for message output methods
SCIP_DISPDATA * SCIPdispGetData(SCIP_DISP *disp)
Definition: disp.c:314
common defines and data types used in all packages of SCIP
const char * SCIPdispGetName(SCIP_DISP *disp)
Definition: disp.c:335
type definitions for displaying runtime statistics