template <class Functor> bool templatedPropertyHolds(const TimeType&t, const Functor &f)const{ DurationType timeSinceUpdate=t-lastUpdateTime(); if (timeSinceUpdate<mFadeTime) { return f(mValuePast.value())&&f(mValuePresent.value()); }else { return f(mValuePresent.value()); } }
Value extrapolate(const TimeType&t) const { DurationType timeSinceUpdate=t-lastUpdateTime(); if (mFadeTime<timeSinceUpdate) { return mValuePresent.extrapolate(t); }else{ return mValuePast.extrapolate(t) .blend(mValuePresent.extrapolate(t), timeSinceUpdate/mFadeTime); } }
Value extrapolate(const TimeType&t) const { DurationType timeSinceUpdate = std::max(DurationType::zero(),t-lastUpdateTime()); if (mFadeTime<=timeSinceUpdate) { return mValuePresent.extrapolate(t); }else{ return mValuePast.extrapolate(t) .blend(mValuePresent.extrapolate(t), (float32)(timeSinceUpdate/mFadeTime)); } }
std::string FeltFile::information() const { std::ostringstream cont; cont << "File type\t\t" << block1_[0] << "\n"; cont << "Time a\t\t\t" << lastUpdateTime() << "\n"; cont << "Time b\t\t\t" << referenceTime() << "\n"; cont << "M\t\t\t" << block1_[7] << "\n"; cont << "N\t\t\t" << block1_[8] << "\n"; cont << "K\t\t\t" << block1_[9] << "\n"; cont << "L\t\t\t" << block1_[10] << "\n"; cont << "MX\t\t\t" << block1_[11] << "\n"; cont << "Last word last block\t" << block1_[12] << "\n"; cont << "storage type\t\t" << block1_[13] << "\n"; cont << "Update status\t\t" << block1_[14] << "\n"; cont << "Arch time a\t\t" << firstTime() << "\n"; cont << "Arch time b\t\t" << lastTime() << "\n"; cont << "Termins\t\t\t" << block1_[25] << "\n"; cont << "Indexes/term\t\t" << block1_[26] << "\n"; cont << "Producer\t\t" << block1_[27] << "\n"; cont << "Time unit\t\t" << block1_[28] << "\n"; cont << "Time resolution\t\t" << block1_[29] << "\n"; return cont.str(); }