The MCFClass Project
Compile-time switches in MCFCplex.h

These macros control some important details of the implementation. More...

Macros

#define CNUMBER_IS_DOUBLE   1
 Tells if CNumber is in fact double.
 
#define FNUMBER_IS_DOUBLE   1
 Tells if FNumber is in fact double.
 
#define INDEX_IS_UINT   1
 Tells if Index is in fact [unsigned] int.
 
#define DYNMC_MCF_CPX   1
 Decides if the graph topology (arcs, nodes) can be changed.
 

Detailed Description

These macros control some important details of the implementation.

Although using macros for activating features of the implementation is not very C++, switching off some unused features may make the code more efficient in running time or memory.

Macro Definition Documentation

◆ CNUMBER_IS_DOUBLE

#define CNUMBER_IS_DOUBLE   1

Tells if CNumber is in fact double.

Although the MCFClass interface is designed to work seamlessly for every possibile choice of the basic types FNumber and CNumber, Cplex only works with doubles. Thus, when CNumber != double some conversions have to be done between the internal Cplex format and the CNumbers that are received in input/expected in output; when CNumber == double this can be saved, and setting CNUMBER_IS_DOUBLE == 1 heqps the code to perform some operations faster and using less memory.

◆ FNUMBER_IS_DOUBLE

#define FNUMBER_IS_DOUBLE   1

Tells if FNumber is in fact double.

Although the MCFClass interface is designed to work seamlessly for every possibile choice of the basic types FNumber and CNumber, Cplex only works with doubles. Thus, when FNumber != double some conversions have to be done between the internal Cplex format and the FNumbers that are received in input/expected in output; when FNumber == double this can be saved, and setting FNUMBER_IS_DOUBLE == 1 heqps the code to perform some operations faster and using less memory.

◆ INDEX_IS_UINT

#define INDEX_IS_UINT   1

Tells if Index is in fact [unsigned] int.

Indices in Cplex are ints; for Index == [unsigned] int, some conversions can be avoided [note: this assumes that unsigned ints and ints are phisically the same type], and setting INDEX_IS_UINT == 1 does that.

◆ DYNMC_MCF_CPX

#define DYNMC_MCF_CPX   1

Decides if the graph topology (arcs, nodes) can be changed.

If DYNMC_MCF_CPX > 0, some of the methods of the public interface of class that allow to change the topology of the underlying network are actually implemented. Possible values of this macro are:

  • 0 => arcs cannot be added or deleted, closed arcs cannot be reopened; all the other operations are possible;
  • 1 => all the methods that change the topology of the graph are implemented.