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