m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/parse.h
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-01-04 14:31:20 -0500
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-01-04 14:31:20 -0500
commita6528cc50bb2ebc509cd4ede4deda1a112c45d57 (patch)
tree5ae865537334d88438fba8a9ea8cce54ed5625a4 /src/parse.h
parent308c1fe093a3277ec74a7c0c4bf8934b7e22002b (diff)
Store vertices in Graph
Diffstat (limited to 'src/parse.h')
-rw-r--r--src/parse.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/parse.h b/src/parse.h
index ec86302..52b8520 100644
--- a/src/parse.h
+++ b/src/parse.h
@@ -22,7 +22,6 @@ private:
Graph graph_;
std::ifstream input_file_;
int number_edges_;
- std::set<int> vertices_;
void parse_number_edges_() {
input_file_ >> number_edges_;
@@ -33,16 +32,6 @@ private:
input_file_ >> from >> to;
- if (vertices_.find(from) == vertices_.end()) {
- graph_.add_vertex(from);
- vertices_.insert(from);
- }
-
- if (vertices_.find(to) == vertices_.end()) {
- graph_.add_vertex(to);
- vertices_.insert(to);
- }
-
graph_.add_edge(from, to);
}
};