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:
@@ -427,10 +427,9 @@ DemandCalculator::DemandCalculator(LinkGraphJob &job) :
|
||||
};
|
||||
std::vector<bool> symmetric_edges(se_index(0, size));
|
||||
|
||||
for (NodeID node_id = 0; node_id < size; ++node_id) {
|
||||
Node from = job[node_id];
|
||||
for (EdgeIterator it(from.Begin()); it != from.End(); ++it) {
|
||||
symmetric_edges[se_index(node_id, it->first)] = true;
|
||||
for (auto &it : job.Graph().GetEdges()) {
|
||||
if (it.first.first != it.first.second) {
|
||||
symmetric_edges[se_index(it.first.first, it.first.second)] = true;
|
||||
}
|
||||
}
|
||||
uint first_unseen = 0;
|
||||
|
Reference in New Issue
Block a user