Skip to content

Commit

Permalink
Merge pull request #16 from sankepallyrohithreddy/ch/newclasses
Browse files Browse the repository at this point in the history
Ch/newclasses
  • Loading branch information
cvvergara committed Jun 13, 2016
2 parents 93368c5 + a64a5eb commit 8b07324
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 188 deletions.
30 changes: 0 additions & 30 deletions proof_of_concept.sh

This file was deleted.

63 changes: 0 additions & 63 deletions rohith_run.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/contraction/src/contractGraph_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ do_pgr_contractGraph(
}
}

int is_valid_contraction(int number) {
int is_valid_contraction(int64_t number) {
switch (number) {
case -2:
return -1;
Expand Down
2 changes: 1 addition & 1 deletion src/contraction/src/contractGraph_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern "C" {
pgr_contracted_blob **return_tuples,
size_t *return_count,
char ** err_msg);
int is_valid_contraction(int number);
int is_valid_contraction(int64_t number);

#ifdef __cplusplus
}
Expand Down
3 changes: 1 addition & 2 deletions src/contraction/src/pgr_contract.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@ void perform_deadEnd(G &graph,

template < class G >
void perform_linear(G &graph,
Identifiers<int64_t> forbidden_vertices,
Identifiers<int64_t>& forbidden_vertices,
std::ostringstream& debug)
{
pgRouting::Pgr_linearContraction<G> linearContractor;
debug << "Setting forbidden_vertices";
linearContractor.setForbiddenVertices(graph, forbidden_vertices
, debug);

linearContractor.calculateVertices(graph, debug);
try
{
Expand Down
10 changes: 6 additions & 4 deletions src/contraction/src/pgr_contractionGraph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,11 @@ class Pgr_contractionGraph : public Pgr_base_graph<G, T_V, T_E> {
e = *in_i;
log << this->graph[e].id << std::endl;
if (this->graph[e].id == id) {
return this->graph[e];
break;
//return this->graph[e];
}
}
//return minEdge;
return this->graph[e];
}

T_E& get_outgoing_edge(int64_t id, V vertex, std::ostringstream& log)
Expand All @@ -341,10 +342,11 @@ class Pgr_contractionGraph : public Pgr_base_graph<G, T_V, T_E> {
e = *out_i;
log << this->graph[e].id << std::endl;
if (this->graph[e].id == id) {
return this->graph[e];
break;
//return this->graph[e];
}
}
//return minEdge;
return this->graph[e];
}

void get_shortcuts(std::vector<T_E>& shortcuts, std::ostringstream& log)
Expand Down
5 changes: 3 additions & 2 deletions src/contraction/src/pgr_linearContraction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ namespace pgRouting {
typedef typename G::EO_i EO_i;
typedef typename G::EI_i EI_i;
typedef typename G::degree_size_type degree_size_type;
Pgr_linearContraction():last_edge_id(0){}
void setForbiddenVertices(G &graph,
Identifiers<int64_t> forbidden_vertices,
std::ostringstream& debug);
Expand All @@ -67,7 +68,7 @@ namespace pgRouting {
Identifiers<V> linearVertices;
Identifiers<V> forbiddenVertices;
std::map<V, std::pair<int64_t, int64_t> > edgePairsMap;
int64_t last_edge_id = 0;
int64_t last_edge_id;
bool is_linear(G &graph, V v,
std::ostringstream& debug);
void add_if_linear(G &graph, V v,
Expand Down Expand Up @@ -139,7 +140,7 @@ template < class G >
int64_t incoming_eids[2] = {-1, -1};
int64_t outgoing_eids[2] = {-1, -1};

int incoming_count, outgoing_count;
int64_t incoming_count, outgoing_count;
incoming_count = outgoing_count = 0;
EO_i out, out_end;
EI_i in, in_end;
Expand Down
12 changes: 12 additions & 0 deletions src/contraction/test/development.result
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,15 @@ ERROR: Expected less than two dimension
9|-3|e| {10, 13, }
10|-2|e| {4, }
11|-4|e| {12, }
--q12 Checking linear contraction, dead end for sample data
1|2|v| {1, }
2|3|v| {}
3|5|v| {7, }
4|6|v| {}
5|9|v| {}
6|10|v| {13, }
7|11|v| {}
8|15|v| {14, }
9|17|v| {16, }
10|-1|e| {4, }
11|-3|e| {12, }
85 changes: 0 additions & 85 deletions vicky_run.sh

This file was deleted.

0 comments on commit 8b07324

Please sign in to comment.