A
Adam Teasdale Hartshorne
Using the code below I get a very stange result. I assume that I must be
doing something wrong, but I can't figure out what it is.
getTriangleEdges(t[0],t1e) ;
for (int i = 0 ; i < (int)t1e.size() ; i++) {
printf("T1 Edges Index:- %i \n", t1e) ;
}
getTriangleEdges(t[1],t2e) ;
for (int i = 0 ; i < (int)t1e.size() ; i++) {
printf("T2 Edges Index:- %i \n", t2e) ;
}
std::vector<int> edges ;
edges.reserve(6);
//printf("Merging lists \n") ;
std::merge(t1e.begin(), t1e.end(), t2e.begin(), t2e.end(), edges.begin());
printf("Edges Size:- %i \n", (int) edges.size()) ;
for (int i = 0 ; i < 6 ; i++) {
printf("Edges Index:- %i \n", edges) ;
}
The following output is seen in the terminal
T1 Edges Index:- 7
T1 Edges Index:- 8
T1 Edges Index:- 6
T2 Edges Index:- 10
T2 Edges Index:- 8
T2 Edges Index:- 9
Edges Size:- 0
Edges Index:- 7
Edges Index:- 8
Edges Index:- 6
Edges Index:- 10
Edges Index:- 8
Edges Index:- 9
It seems to think the size of edges is 0!!!!!
Any thoughts would be much appreciated,
Adam
doing something wrong, but I can't figure out what it is.
getTriangleEdges(t[0],t1e) ;
for (int i = 0 ; i < (int)t1e.size() ; i++) {
printf("T1 Edges Index:- %i \n", t1e) ;
}
getTriangleEdges(t[1],t2e) ;
for (int i = 0 ; i < (int)t1e.size() ; i++) {
printf("T2 Edges Index:- %i \n", t2e) ;
}
std::vector<int> edges ;
edges.reserve(6);
//printf("Merging lists \n") ;
std::merge(t1e.begin(), t1e.end(), t2e.begin(), t2e.end(), edges.begin());
printf("Edges Size:- %i \n", (int) edges.size()) ;
for (int i = 0 ; i < 6 ; i++) {
printf("Edges Index:- %i \n", edges) ;
}
The following output is seen in the terminal
T1 Edges Index:- 7
T1 Edges Index:- 8
T1 Edges Index:- 6
T2 Edges Index:- 10
T2 Edges Index:- 8
T2 Edges Index:- 9
Edges Size:- 0
Edges Index:- 7
Edges Index:- 8
Edges Index:- 6
Edges Index:- 10
Edges Index:- 8
Edges Index:- 9
It seems to think the size of edges is 0!!!!!
Any thoughts would be much appreciated,
Adam