Scippy

SCIP

Solving Constraint Integer Programs

portab.h File Reference

Detailed Description

Portable defintions.

Method to validate Steiner problem solutions.

Author
Thorsten Koch
Thorsten Koch
Gerald Gamrath
Daniel Rehfeldt

Definition in file portab.h.

#include <limits.h>
#include <math.h>
#include <float.h>

Go to the source code of this file.

Macros

#define EPSILON   1e-06
 
#define TRUE   1
 
#define FALSE   0
 
#define SUCCESS   0
 
#define FAILURE   (-1)
 
#define Max(a, b)    (((a) >= (b)) ? (a) : (b))
 
#define Min(a, b)    (((a) <= (b)) ? (a) : (b))
 
#define EPS_ZERO   (DBL_EPSILON * 1e4)
 
#define Fsgn(x)    ((((x) > -EPS_ZERO) && ((x) < EPS_ZERO)) ? 0 : (((x) < 0.0) ? -1 : 1))
 
#define EQ(a, b)    (fabs((a) - (b)) <= EPS_ZERO)
 
#define NE(a, b)    (fabs((a) - (b)) > EPS_ZERO)
 
#define LT(a, b)    (((a) - (b)) < -EPS_ZERO)
 
#define LE(a, b)    (((a) - (b)) < EPS_ZERO)
 
#define GT(a, b)    (((a) - (b)) > EPS_ZERO)
 
#define GE(a, b)    (((a) - (b)) > -EPS_ZERO)
 
#define does_not_return
 
#define inline
 
#define DIRSEP   "/"
 

Macro Definition Documentation

#define DIRSEP   "/"

Definition at line 79 of file portab.h.

Referenced by graph_load().

#define does_not_return

Definition at line 72 of file portab.h.

#define EPS_ZERO   (DBL_EPSILON * 1e4)

Definition at line 54 of file portab.h.

#define EPSILON   1e-06

Definition at line 31 of file portab.h.

Referenced by nail(), SCIPvalidateStpSol(), and trail().

#define EQ (   a,
 
)    (fabs((a) - (b)) <= EPS_ZERO)
#define FAILURE   (-1)

Definition at line 44 of file portab.h.

Referenced by get_arguments(), graph_load(), open_file(), and start_section().

#define FALSE   0

Definition at line 37 of file portab.h.

Referenced by ansadv2Reduction(), ansadvReduction(), ansReduction(), bd3_reduction(), bdr_reduction(), bound_reduce(), buildsolgraph(), chain2Reduction(), cnsAdvReduction(), compEdgesObst(), computeDegConsTree(), computeSteinerTree(), computeSteinerTreeVnoi(), createConstraints(), createDegreeConstraints(), createHopConstraint(), createPrizeConstraints(), createVariables(), cut_add(), da_reduce(), daPc_reduce(), degree_test(), degree_test_hc(), degree_test_mw(), degree_test_pc(), degree_test_sap(), deleteterm(), extendSteinerTreePcMw(), get_arguments(), graph_edge_redirect(), graph_knot_contract(), graph_load(), graph_mincut_exec(), graph_obstgrid_create(), graph_pack(), graph_path_st(), graph_save(), graph_sol_valid(), graph_valid(), graph_valid2(), lca(), ledge_reduction(), level0(), nail(), nnpReduction(), nodeIsCrucial(), npvReduction(), nv_reductionAdv(), nvsl_reduction(), pcgraphorg(), pcgraphtrans(), pricing(), probdataCreate(), probdataPrintGraph(), reduce(), reduceHc(), reduceMwcs(), reducePc(), reduceSap(), reduceStp(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_PRICERREDCOST(), SCIPcreateConsStp(), SCIPdualAscentAddCutsStp(), SCIPdualAscentPcStp(), SCIPdualAscentStp(), SCIPheurComputeSteinerTree(), SCIPheurImproveSteinerTree(), SCIPheurPruneDegConsSteinerTree(), SCIPheurPrunePCSteinerTree(), SCIPheurPruneSteinerTree(), SCIPincludeConshdlrStp(), SCIPincludeDialogStp(), SCIPincludeHeurLocal(), SCIPincludeHeurRec(), SCIPincludeHeurTM(), SCIPincludeReaderStp(), SCIPprobdataAddNewSol(), SCIPprobdataCreate(), SCIPprobdataPrintGraph(), SCIPprobdataPrintGraph2(), SCIPprobdataWriteSolution(), SCIPvalidateStpSol(), sd2_reduction(), sd_red(), sd_reduction(), sddeltable(), sdpaths(), selectdiffsols(), selectsols(), sep_2cut(), sep_flow(), sl_reduction(), voronoi_dist(), voronoi_extend(), and voronoi_extend2().

#define Fsgn (   x)    ((((x) > -EPS_ZERO) && ((x) < EPS_ZERO)) ? 0 : (((x) < 0.0) ? -1 : 1))

Definition at line 57 of file portab.h.

#define GE (   a,
 
)    (((a) - (b)) > -EPS_ZERO)

Definition at line 67 of file portab.h.

Referenced by bd3_reduction(), and nvsl_reduction().

#define GT (   a,
 
)    (((a) - (b)) > EPS_ZERO)
#define inline

Definition at line 73 of file portab.h.

#define LE (   a,
 
)    (((a) - (b)) < EPS_ZERO)

Definition at line 65 of file portab.h.

Referenced by bd3_reduction(), and nvsl_reduction().

#define LT (   a,
 
)    (((a) - (b)) < -EPS_ZERO)
#define Max (   a,
 
)    (((a) >= (b)) ? (a) : (b))

Definition at line 48 of file portab.h.

Referenced by nvsl_reduction().

#define Min (   a,
 
)    (((a) <= (b)) ? (a) : (b))

Definition at line 51 of file portab.h.

Referenced by graph_mincut_exec().

#define NE (   a,
 
)    (fabs((a) - (b)) > EPS_ZERO)

Definition at line 63 of file portab.h.

#define SUCCESS   0

Definition at line 41 of file portab.h.

Referenced by get_arguments(), graph_load(), open_file(), and start_section().

#define TRUE   1

Definition at line 34 of file portab.h.

Referenced by ansadv2Reduction(), ansadvReduction(), ansReduction(), bd3_reduction(), bdr_reduction(), bound_reduce(), buildsolgraph(), central_terminal(), chain2Reduction(), cnsAdvReduction(), compEdgesObst(), computeDegConsTree(), computeSteinerTree(), computeSteinerTreeVnoi(), createConstraints(), createDegreeConstraints(), createHopConstraint(), createPrizeConstraints(), createVariables(), cut_add(), da_reduce(), daPc_reduce(), degree_test(), degree_test_hc(), degree_test_mw(), degree_test_pc(), degree_test_sap(), deleteterm(), extendSteinerTreePcMw(), get_arguments(), graph_knot_add(), graph_knot_contract(), graph_knot_contractpc(), graph_load(), graph_mincut_exec(), graph_obstgrid_create(), graph_path_st(), graph_sol_valid(), graph_trail(), graph_valid(), graph_valid2(), hcrbound_reduce(), hcrcbound_reduce(), hopbound_reduce(), lca(), ledge_reduction(), level0(), nail(), nnpReduction(), nodeIsCrucial(), npvReduction(), nv_reductionAdv(), nvsl_reduction(), pcgraphorg(), pricing(), reduce(), reduceHc(), reduceMwcs(), reducePc(), reduceSap(), reduceStp(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_CONSINITLP(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_PARAMCHGD(), SCIP_DECL_PRICERFARKAS(), SCIP_DECL_PROBCOPY(), SCIP_DECL_PROBDELORIG(), SCIP_DECL_READERREAD(), SCIPcreateConsStp(), SCIPdualAscentAddCutsStp(), SCIPdualAscentPcStp(), SCIPdualAscentStp(), SCIPheurComputeSteinerTree(), SCIPheurImproveSteinerTree(), SCIPheurPruneDegConsSteinerTree(), SCIPheurPrunePCSteinerTree(), SCIPincludeConshdlrStp(), SCIPincludeHeurTM(), SCIPprobdataAddNewSol(), SCIPprobdataCreate(), SCIPprobdataPrintGraph(), SCIPprobdataPrintGraph2(), SCIPprobdataSetDualBound(), SCIPprobdataWriteSolution(), SCIPvalidateStpSol(), sd2_reduction(), sd_red(), sd_reduction(), sddeltable(), sdpaths(), sdpc_reduction(), sdsp_reduction(), sdsp_sap_reduction(), selectdiffsols(), selectsols(), sep_2cut(), sep_flow(), setTrue(), sl_reduction(), traverseChain(), trydg1edgepc(), voronoi_dist(), voronoi_extend(), voronoi_extend2(), and voronoi_radius().