Scippy

SCIP

Solving Constraint Integer Programs

expr_product.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-2022 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 expr_product.h
17  * @ingroup EXPRHDLRS
18  * @brief product expression handler
19  * @author Stefan Vigerske
20  * @author Benjamin Mueller
21  */
22 
23 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
24 
25 #ifndef __SCIP_EXPR_PROD_H__
26 #define __SCIP_EXPR_PROD_H__
27 
28 
29 #include "scip/scip.h"
30 #include "scip/type_expr.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /** creates the handler for product expressions and includes it into SCIP
37  *
38  * @ingroup ExprhdlrIncludes
39  */
40 SCIP_EXPORT
42  SCIP* scip /**< SCIP data structure */
43  );
44 
45 /**@addtogroup EXPRHDLRS
46  *
47  * @{
48  *
49  * @name Product expression
50  *
51  * This expression handler provides the product function, that is,
52  * \f[
53  * x \mapsto c\,\prod_{i=1}^n x_i
54  * \f]
55  * for some constant coefficient c.
56  * @{
57  */
58 
59 /** creates a product expression */
60 SCIP_EXPORT
62  SCIP* scip, /**< SCIP data structure */
63  SCIP_EXPR** expr, /**< pointer where to store expression */
64  int nchildren, /**< number of children */
65  SCIP_EXPR** children, /**< children */
66  SCIP_Real coefficient, /**< constant coefficient of product */
67  SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), /**< function to call to create ownerdata */
68  void* ownercreatedata /**< data to pass to ownercreate */
69  );
70 
71 /** @}
72  * @}
73  */
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* __SCIP_EXPR_PROD_H__ */
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPcreateExprProduct(SCIP *scip, SCIP_EXPR **expr, int nchildren, SCIP_EXPR **children, SCIP_Real coefficient, SCIP_DECL_EXPR_OWNERCREATE((*ownercreate)), void *ownercreatedata)
#define SCIP_DECL_EXPR_OWNERCREATE(x)
Definition: type_expr.h:131
SCIP_EXPR * expr
Definition: expr_product.c:77
type and macro definitions related to algebraic expressions
SCIP_RETCODE SCIPincludeExprhdlrProduct(SCIP *scip)
#define SCIP_Real
Definition: def.h:177
SCIP callable library.