Browse Source

Small templating

Former-commit-id: 4cc3c301ee
tempestpy_adaptions
Mavo 9 years ago
parent
commit
7a0207637a
  1. 13
      src/storage/dft/DFTElements.cpp
  2. 5
      src/storage/dft/DFTElements.h

13
src/storage/dft/DFTElements.cpp

@ -38,15 +38,22 @@ namespace storm {
void DFTElement::checkForSymmetricChildren() const {
}
template<>
bool DFTBE<double>::checkDontCareAnymore(storm::storage::DFTState& state, DFTStateSpaceGenerationQueues& queues) const {
template<typename ValueType>
bool DFTBE<ValueType>::checkDontCareAnymore(storm::storage::DFTState& state, DFTStateSpaceGenerationQueues& queues) const {
if(DFTElement::checkDontCareAnymore(state, queues)) {
state.beNoLongerFailable(mId);
return true;
}
return false;
}
// Explicitly instantiate the class.
template class DFTBE<double>;
#ifdef STORM_HAVE_CARL
template class DFTBE<RationalFunction>;
#endif
}
}

5
src/storage/dft/DFTElements.h

@ -308,8 +308,9 @@ namespace storm {
}
virtual bool checkDontCareAnymore(storm::storage::DFTState& state, DFTStateSpaceGenerationQueues& queues) const;
};
inline std::ostream& operator<<(std::ostream& os, DFTBE<double> const& be) {
template<typename ValueType>
inline std::ostream& operator<<(std::ostream& os, DFTBE<ValueType> const& be) {
return os << "{" << be.name() << "} BE(" << be.activeFailureRate() << ", " << be.passiveFailureRate() << ")";
}

Loading…
Cancel
Save