fix a bug that causing heap priority to be inconsistent after updating vertex quality [using windows runtime this would cause an assertion to fail]
This commit is contained in:
parent
2cb784264e
commit
7e6c7c71b3
|
|
@ -176,13 +176,14 @@ public:
|
||||||
|
|
||||||
|
|
||||||
struct DIJKDist{
|
struct DIJKDist{
|
||||||
DIJKDist(VertexPointer _v):v(_v){}
|
DIJKDist(VertexPointer _v):v(_v), q(_v->Q()){}
|
||||||
VertexPointer v;
|
VertexPointer v;
|
||||||
|
ScalarType q;
|
||||||
|
|
||||||
bool operator < (const DIJKDist &o) const
|
bool operator < (const DIJKDist &o) const
|
||||||
{
|
{
|
||||||
if( v->Q() != o.v->Q())
|
if( q != o.q)
|
||||||
return v->Q() > o.v->Q();
|
return q > o.q;
|
||||||
return v<o.v;
|
return v<o.v;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -600,6 +601,7 @@ It is just a simple wrapper of the basic Compute()
|
||||||
|
|
||||||
std::vector<DIJKDist> Heap;
|
std::vector<DIJKDist> Heap;
|
||||||
tri::UnMarkAll(m);
|
tri::UnMarkAll(m);
|
||||||
|
tri::UnMarkAll(m);
|
||||||
|
|
||||||
for(size_t i=0;i<seedVec.size();++i)
|
for(size_t i=0;i<seedVec.size();++i)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue