diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2017-01-05 13:38:51 -0500 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2017-01-05 13:38:51 -0500 |
commit | d29479e93370b577adeeb133116ced99dc4f81ff (patch) | |
tree | 985376882e1e3b08af24972156c49d740d70a022 /src/graph.h | |
parent | c88e16d8be7457fd7211c31a5d91aa521fa829a1 (diff) |
Refactor
- Reorder includes
- Unify reference style
- Improve whitespace
Diffstat (limited to 'src/graph.h')
-rw-r--r-- | src/graph.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/graph.h b/src/graph.h index 47dce16..317024e 100644 --- a/src/graph.h +++ b/src/graph.h @@ -29,16 +29,16 @@ public: std::sort(orderable_vertices_.begin(), orderable_vertices_.end()); } - const std::vector<int> & get_vertices() const { + const std::vector<int>& get_vertices() const { return orderable_vertices_; } - const std::vector<int> & get_neighbors(int vertex) const { + const std::vector<int>& get_neighbors(int vertex) const { return graph_.find(vertex)->second; } bool has_out_edges(int vertex) const { - return has_out_edges_.count(vertex) > 0; + return has_out_edges_.find(vertex) == has_out_edges_.end(); } private: |