From e27ba914ecd9c3abe7834e789676bfd13007ad6c Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 6 Mar 2020 16:20:13 +0800 Subject: [PATCH 1/2] docs: correct comment --- src/extractor/graph_compressor.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/extractor/graph_compressor.cpp b/src/extractor/graph_compressor.cpp index 73700600644..945dbdf4f02 100644 --- a/src/extractor/graph_compressor.cpp +++ b/src/extractor/graph_compressor.cpp @@ -206,12 +206,7 @@ void GraphCompressor::Compress( graph.GetEdgeData(reverse_e2).annotation_data = selectAnnotation( rev_edge_data2.annotation_data, rev_edge_data1.annotation_data); - /* - // Do not compress edge if it crosses a traffic signal. - // This can't be done in CanCombineWith, becase we only store the - // traffic signals in the `traffic signal` list, which EdgeData - // doesn't have access to. - */ + // add node penalty when compress edge if it crosses a traffic signal. const bool has_node_penalty = traffic_signals.find(node_v) != traffic_signals.end(); EdgeDuration node_duration_penalty = MAXIMAL_EDGE_DURATION; EdgeWeight node_weight_penalty = INVALID_EDGE_WEIGHT; From 6acc523e9826c176a0174122bfd65338bcdfe45d Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 11 Mar 2020 19:53:26 +0800 Subject: [PATCH 2/2] docs: improve comment --- src/extractor/graph_compressor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extractor/graph_compressor.cpp b/src/extractor/graph_compressor.cpp index 945dbdf4f02..9371aeb9ce1 100644 --- a/src/extractor/graph_compressor.cpp +++ b/src/extractor/graph_compressor.cpp @@ -206,7 +206,7 @@ void GraphCompressor::Compress( graph.GetEdgeData(reverse_e2).annotation_data = selectAnnotation( rev_edge_data2.annotation_data, rev_edge_data1.annotation_data); - // add node penalty when compress edge if it crosses a traffic signal. + // Add node penalty when compress edge crosses a traffic signal const bool has_node_penalty = traffic_signals.find(node_v) != traffic_signals.end(); EdgeDuration node_duration_penalty = MAXIMAL_EDGE_DURATION; EdgeWeight node_weight_penalty = INVALID_EDGE_WEIGHT;