Change LinkGraph::EdgeMatrix to a sparse storage format
Use a btree_map instead of a SmallMatrix. This avoids excessive storage requirements for large graphs, and overly expensive edge matrix resize operations. Remove next_edge iteration mechanism.
This commit is contained in:
@@ -114,7 +114,7 @@ Station::~Station()
|
||||
for (NodeID node = 0; node < lg->Size(); ++node) {
|
||||
Station *st = Station::Get((*lg)[node].Station());
|
||||
st->goods[c].flows.erase(this->index);
|
||||
if ((*lg)[node][this->goods[c].node].LastUpdate() != INVALID_DATE) {
|
||||
if (lg->GetConstEdge(node, this->goods[c].node).LastUpdate() != INVALID_DATE) {
|
||||
st->goods[c].flows.DeleteFlows(this->index);
|
||||
RerouteCargo(st, c, this->index, st->index);
|
||||
}
|
||||
|
Reference in New Issue
Block a user