20 const DataPoint &attributes)
22 if( Base::addLocalNeighbor(w, localQ, attributes) ) {
26 a.template segment<DataPoint::Dim>(1) = localQ;
27 a(DataPoint::Dim+1) = localQ.squaredNorm();
29 a << 1, localQ, localQ.squaredNorm();
31 m_matA += w * a * a.transpose();
44 if(Base::finalize() !=
STABLE)
45 return Base::m_eCurrentState;
46 if(Base::getNumNeighbors() < DataPoint::Dim)
48 if (Base::algebraicSphere().isValid())
51 Base::m_eCurrentState = Base::getNumNeighbors() < 2*DataPoint::Dim ?
UNSTABLE :
STABLE;
55 matC.template topRightCorner<1,1>() << -2;
56 matC.template bottomLeftCorner<1,1>() << -2;
57 matC.template topLeftCorner<1,1>() << 0;
58 matC.template bottomRightCorner<1,1>() << 0;
61 invCpratt.setIdentity();
62 invCpratt.template topRightCorner<1,1>() << -0.5;
63 invCpratt.template bottomLeftCorner<1,1>() << -0.5;
64 invCpratt.template topLeftCorner<1,1>() << 0;
65 invCpratt.template bottomRightCorner<1,1>() << 0;
74 m_solver.computeDirect(invCpratt * m_matA);
76 m_solver.compute(invCpratt * m_matA);
78 VectorA eivals = m_solver.eigenvalues().real();
80 for(
int i=0 ; i<DataPoint::Dim+2 ; ++i)
83 if((ev>0) && (minId==-1 || ev<eivals(minId)))
88 VectorA vecU = m_solver.eigenvectors().col(minId).real();
89 Base::m_uq = vecU[1+DataPoint::Dim];
90 Base::m_ul = vecU.template segment<DataPoint::Dim>(1);
93 Base::m_isNormalized =
false;
95 return Base::m_eCurrentState;