Commit b1fbc39ce677ae82092a1719ee028d89143b7cf0
1 parent
43eddb69
corrected the function nodes_to_str(), since in this scope edge E is a pointer
Showing
1 changed file
with
2 additions
and
5 deletions
Show diff stats
stim/visualization/network.h
... | ... | @@ -117,7 +117,6 @@ class network{ |
117 | 117 | { |
118 | 118 | p = stim::vec<T>(x,y,z); |
119 | 119 | } |
120 | - | |
121 | 120 | ///@param x: x coordinate of the node.. |
122 | 121 | ///@param y: y coordinate of the node.. |
123 | 122 | ///@param z: z coordinate of the node.. |
... | ... | @@ -491,7 +490,6 @@ class network{ |
491 | 490 | void |
492 | 491 | addNode(stim::vec<T> nodes) |
493 | 492 | { |
494 | - node *a = new node(nodes); | |
495 | 493 | V.push_back(nodes); |
496 | 494 | } |
497 | 495 | |
... | ... | @@ -540,7 +538,7 @@ class network{ |
540 | 538 | nodes_to_str(int i) |
541 | 539 | { |
542 | 540 | std::stringstream ss; |
543 | - ss << "[from Node " << E[i].Nodes[1] << " to " << E[i].Nodes[2] << "]"; | |
541 | + ss << "[from Node " << E[i] -> Nodes[1] << " to " << E[i] -> Nodes[2] << "]"; | |
544 | 542 | return ss.str(); |
545 | 543 | } |
546 | 544 | |
... | ... | @@ -588,8 +586,7 @@ class network{ |
588 | 586 | { |
589 | 587 | std::ofstream ofs; |
590 | 588 | ofs.open("Graph.obj", std::ofstream::out | std::ofstream::app); |
591 | - int num; | |
592 | - num = V.size(); | |
589 | + int num = V.size(); | |
593 | 590 | string *strArray = new string[num]; |
594 | 591 | for(int i = 0; i < V.size(); i++) |
595 | 592 | { | ... | ... |