template<class DstArrayT, class SrcArrayT>
Do we have a next phase after this one?
Definition at line 183 of file WeibullNgbPnLoop.h. References Impala::Core::Feature::WeibullNgbPnLoop< DstArrayT, SrcArrayT >::mGamma, Impala::Core::Feature::WeibullNgbPnLoop< DstArrayT, SrcArrayT >::mGammaNext, Impala::Core::Feature::WeibullNgbPnLoop< DstArrayT, SrcArrayT >::mIter, Impala::Core::Feature::WeibullNgbPnLoop< DstArrayT, SrcArrayT >::mLast, Impala::Core::Feature::WeibullNgbPnLoop< DstArrayT, SrcArrayT >::mMaxGamma, Impala::Core::Feature::WeibullNgbPnLoop< DstArrayT, SrcArrayT >::mMaxNumIters, Impala::Core::Feature::WeibullNgbPnLoop< DstArrayT, SrcArrayT >::mPrecision, and Impala::Core::Feature::WeibullNgbPnLoop< DstArrayT, SrcArrayT >::mVerbose. 00184 { 00185 if(mLast) 00186 { 00187 mLast = false; 00188 return false; 00189 } 00190 int ph = lastPhase%2; 00191 if (mVerbose) 00192 std::cout << " WeibullNgbPnLoop::hasNext(" << lastPhase << ") " 00193 << std::endl; 00194 00195 if (ph) 00196 return true; 00197 00198 else 00199 { 00200 if (fabs(mGamma - mGammaNext) < mPrecision || mIter > mMaxNumIters || 00201 mGammaNext > mMaxGamma || isnan(mGammaNext) || isinf(mGammaNext) || mGammaNext < 0) 00202 { 00203 if (mVerbose) 00204 { 00205 std::cout << "no next phase! " << "fabs(mGamma - mGammaNext) = " << fabs(mGamma - mGammaNext) << std::endl; 00206 std::cout << "mIter = " << mIter << " maxIter = " << mMaxNumIters << std::endl; 00207 std::cout << "maxGamma = " << mMaxGamma << std::endl; 00208 std::cout << "mGamma = " << mGamma << " mGammaNext = " << mGammaNext << std::endl; 00209 } 00210 // std::cout << "mIter = " << mIter << std::endl; 00211 mIter = 1; 00212 mLast = true; 00213 return true; 00214 } 00215 else 00216 { 00217 if (mVerbose) 00218 std::cout << "there is next phase: iteration = " << mIter << std::endl; 00219 mGamma = mGammaNext; 00220 mIter++; 00221 return true; 00222 } 00223 } 00224 }
|