Browse Source

Small templating

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

11
src/storage/dft/DFTElements.cpp

@ -39,8 +39,8 @@ namespace storm {
}
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;
@ -48,5 +48,12 @@ namespace storm {
return false;
}
// Explicitly instantiate the class.
template class DFTBE<double>;
#ifdef STORM_HAVE_CARL
template class DFTBE<RationalFunction>;
#endif
}
}

3
src/storage/dft/DFTElements.h

@ -309,7 +309,8 @@ 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