i see they are sorting from the vector<type>, as in their example vector<int>. i want to sort from an attribute of a type Vertex.. so..
vector<Vertex*> heap(G->V, G->V+6) // 6 vertex G is graph, V is array make_heap(heap.begin(), heap.end()); sort_heap(heap.begin(), heap.end()); for(int i = 0; i<heap.size(); i++) cout<<" "<<heap[i]; cout<<endl;
prints out a bunch of gibberish, if i print heap[i]->id then i can see the order but it's not sorting them by the distanceFromSource attritube that I want. Actually I have no idea what order it is sorting them. Anyone know how to sort them by an attribute of that type? should i do a work around or abandon the stl heap_sort altogether?