summaryrefslogtreecommitdiff
path: root/src/linkgraph
diff options
context:
space:
mode:
Diffstat (limited to 'src/linkgraph')
-rw-r--r--src/linkgraph/linkgraph.h2
-rw-r--r--src/linkgraph/linkgraphjob.cpp2
-rw-r--r--src/linkgraph/mcf.cpp8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/linkgraph/linkgraph.h b/src/linkgraph/linkgraph.h
index 99348daa1..4f44db827 100644
--- a/src/linkgraph/linkgraph.h
+++ b/src/linkgraph/linkgraph.h
@@ -495,7 +495,7 @@ public:
* Get the current size of the component.
* @return Size.
*/
- inline uint Size() const { return (uint)this->nodes.size(); }
+ inline uint16 Size() const { return (uint16)this->nodes.size(); }
/**
* Get date of last compression.
diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp
index 5e69dbeba..6a70e9fb6 100644
--- a/src/linkgraph/linkgraphjob.cpp
+++ b/src/linkgraph/linkgraphjob.cpp
@@ -101,7 +101,7 @@ LinkGraphJob::~LinkGraphJob()
/* Link graph has been merged into another one. */
if (!LinkGraph::IsValidID(this->link_graph.index)) return;
- uint size = this->Size();
+ uint16 size = this->Size();
for (NodeID node_id = 0; node_id < size; ++node_id) {
Node from = (*this)[node_id];
diff --git a/src/linkgraph/mcf.cpp b/src/linkgraph/mcf.cpp
index 003412850..f24a8e028 100644
--- a/src/linkgraph/mcf.cpp
+++ b/src/linkgraph/mcf.cpp
@@ -260,7 +260,7 @@ void MultiCommodityFlow::Dijkstra(NodeID source_node, PathVector &paths)
{
typedef std::set<Tannotation *, typename Tannotation::Comparator> AnnoSet;
Tedge_iterator iter(this->job);
- uint size = this->job.Size();
+ uint16 size = this->job.Size();
AnnoSet annos;
paths.resize(size, nullptr);
for (NodeID node = 0; node < size; ++node) {
@@ -473,7 +473,7 @@ bool MCF1stPass::EliminateCycles(PathVector &path, NodeID origin_id, NodeID next
bool MCF1stPass::EliminateCycles()
{
bool cycles_found = false;
- uint size = this->job.Size();
+ uint16 size = this->job.Size();
PathVector path(size, nullptr);
for (NodeID node = 0; node < size; ++node) {
/* Starting at each node in the graph find all cycles involving this
@@ -491,7 +491,7 @@ bool MCF1stPass::EliminateCycles()
MCF1stPass::MCF1stPass(LinkGraphJob &job) : MultiCommodityFlow(job)
{
PathVector paths;
- uint size = job.Size();
+ uint16 size = job.Size();
uint accuracy = job.Settings().accuracy;
bool more_loops;
std::vector<bool> finished_sources(size);
@@ -540,7 +540,7 @@ MCF2ndPass::MCF2ndPass(LinkGraphJob &job) : MultiCommodityFlow(job)
{
this->max_saturation = UINT_MAX; // disable artificial cap on saturation
PathVector paths;
- uint size = job.Size();
+ uint16 size = job.Size();
uint accuracy = job.Settings().accuracy;
bool demand_left = true;
std::vector<bool> finished_sources(size);