Skip to content

Commit 64f3c55

Browse files
author
Marc Geilen
committed
fixes
1 parent bcf5b17 commit 64f3c55

File tree

9 files changed

+86
-371
lines changed

9 files changed

+86
-371
lines changed

documentation/Doxyfile.doc

Lines changed: 0 additions & 280 deletions
This file was deleted.

include/maxplus/base/analysis/mcm/mcmgraph.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ class MCMedge {
6262
};
6363

6464
using MCMedges = list<std::shared_ptr<MCMedge>>;
65-
using MCMedgesIter = MCMedges::iterator;
66-
using MCMedgesCIter = MCMedges::const_iterator;
6765

6866
class MCMnode {
6967
public:
@@ -80,8 +78,6 @@ struct MCMNodeLess {
8078
};
8179

8280
using MCMnodes = list<std::shared_ptr<MCMnode>>;
83-
using MCMnodesIter = MCMnodes::iterator;
84-
using MCMnodesCIter = MCMnodes::const_iterator;
8581

8682
class MCMgraph {
8783
public:

include/maxplus/base/analysis/mcm/mcmyto.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ CDouble maxCycleMeanYoungTarjanOrlin(std::shared_ptr<MCMgraph> mcmGraph);
113113
* in due time.
114114
*/
115115
CDouble
116-
maxCycleMeanAndCriticalCycleYoungTarjanOrlin(std::shared_ptr<MCMgraph> mcmGraph, std::shared_ptr<MCMedge> **cycle, uint *len);
116+
maxCycleMeanAndCriticalCycleYoungTarjanOrlin(const MCMgraph& mcmGraph, std::shared_ptr<MCMedge> **cycle, uint *len);
117117

118118
/**
119119
* maxCycleRatioYoungTarjanOrlin ()
@@ -153,7 +153,7 @@ CDouble minCycleRatioYoungTarjanOrlin(std::shared_ptr<MCMgraph> mcmGraph);
153153
* in due time.
154154
*/
155155
CDouble
156-
minCycleRatioAndCriticalCycleYoungTarjanOrlin(std::shared_ptr<MCMgraph> mcmGraph, std::shared_ptr<MCMedge> **cycle, uint *len);
156+
minCycleRatioAndCriticalCycleYoungTarjanOrlin(const MCMgraph& mcmGraph, std::shared_ptr<MCMedge> **cycle, uint *len);
157157

158158
/**
159159
* getDelay ()
@@ -173,7 +173,7 @@ double getWeight(std::shared_ptr<MCMedge> e);
173173
* to graph input for Young-Tarjan-Orlin's algorithm.
174174
* It assumes that the id's of the nodes are 0 <= id < number of nodes
175175
*/
176-
void convertMCMgraphToYTOgraph(std::shared_ptr<MCMgraph> g,
176+
void convertMCMgraphToYTOgraph(const MCMgraph& g,
177177
graph *gr,
178178
double (*costFunction)(std::shared_ptr<MCMedge> e),
179179
double (*transit_timeFunction)(std::shared_ptr<MCMedge> e));

src/algebra/mpmatrix.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,10 +1102,10 @@ Matrix::mp_generalized_eigenvectors() const {
11021102
std::map<uint, std::shared_ptr<MCMgraph>> sccMapInv;
11031103

11041104
// map from node of precGraph to its SCC
1105-
std::map<std::weak_ptr<MCMnode>, uint> sccMap;
1105+
std::map<std::shared_ptr<MCMnode>, uint> sccMap;
11061106

11071107
// map from nodes of precGraph to the cycle mean of its SCC
1108-
std::map<std::weak_ptr<MCMnode>, MPTime> cycleMeansMap;
1108+
std::map<std::shared_ptr<MCMnode>, MPTime> cycleMeansMap;
11091109

11101110
// vector such that element k is a node from precGraph in the critical path of SCC k
11111111
std::vector<std::shared_ptr<MCMnode>> criticalNodes;

src/algebra/mpsparsematrix.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,6 @@ SparseMatrix::mpGeneralizedEigenvectors() {
10031003
Vector lambda = evev.second;
10041004
gevl.push_back(std::make_pair(SparseVector(ev, sizes), SparseVector(lambda, sizes)));
10051005
}
1006-
10071006
return std::make_pair(evl, gevl);
10081007
}
10091008

src/base/analysis/mcm/mcmdg.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ CDouble mcmDG(MCMgraph *mcmGraph) {
8888
u = Q_u.front();
8989
Q_u.pop_front();
9090
do {
91-
for (MCMedgesIter iter = u->out.begin(); iter != u->out.end(); iter++) {
91+
for (auto iter = u->out.begin(); iter != u->out.end(); iter++) {
9292
std::shared_ptr<MCMedge> e = *iter;
9393
std::shared_ptr<MCMnode> v = e->dst;
9494

@@ -109,7 +109,7 @@ CDouble mcmDG(MCMgraph *mcmGraph) {
109109

110110
// Compute lambda using Karp's theorem
111111
l = -INT_MAX;
112-
for (MCMnodesCIter iter = mcmGraph->getNodes().begin(); iter != mcmGraph->getNodes().end();
112+
for (auto iter = mcmGraph->getNodes().begin(); iter != mcmGraph->getNodes().end();
113113
iter++) {
114114
u = *iter;
115115

0 commit comments

Comments
 (0)