CNDSM
1.00
|
These macros control some important details of the implementation. More...
Macros | |
#define | SPT_ALGRTM 0 |
This macro decides which SPT algorithm has to be used. More... | |
#define | LABEL_SETTING 0 |
this is a label-correcting SPT algorithm | |
#define | ORDRD_NMS 1 |
Decides if arc names in MCFGetX() are ordered. More... | |
#define | SAME_GRPH_SPT 0 |
Decides if all MCFClass instances share the same graph. More... | |
#define | DYNMC_MCF_SPT 0 |
Decides if the graph topology (arcs, nodes) can be changed. More... | |
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.
#define SPT_ALGRTM 0 |
This macro decides which SPT algorithm has to be used.
Possible values are:
For algorithms based on priority lists, the macro LABEL_SETTING [see below] can be set to 1 to say that the algorithm is of the "label-setting" (nodes only exit from Q once) orather than of the "label-correcting" (nodes may exit from Q more than once) type.
#define ORDRD_NMS 1 |
Decides if arc names in MCFGetX() are ordered.
If ORDRD_NMS > 0, and MCFGetX() [see below] is asked for a "sparse" flow solution (i.e., nms != 0), then the set of indices returned at the end of the method is ordered in increasing sense. If ORDRD_NMS == 0 instead, the set of indices may not be ordered.
ORDRD_NMS > 0 may be useful for some applications, but it is more costly (basically, it requires either to compute the "dense" flow solution or to sort a vector). Also, "sparse" flow solutions in this class are guaranteed to contain no more than n - 1 nonzeroes, hence if ORDRD_NMS == 0 then the parameter `F' in MCFGetX( F , nms ) can actually point to a (n - 1)-vector, while if ORDRD_NMS > 0 it must point to a m-vector anyway.
#define SAME_GRPH_SPT 0 |
Decides if all MCFClass instances share the same graph.
If SAME_GRPH_SPT > 0, then all the instances of the class will work on the same "topological" network, while the costs, capacities and supplies can change from one instance to another. This allows implementations to share some data structures describing the graph, e.g. by declaring them "static", saving memory when multiple instances of the solver are active at the same time.
#define DYNMC_MCF_SPT 0 |
Decides if the graph topology (arcs, nodes) can be changed.
If DYNMC_MCF_SPT > 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: