Browse Source

Fixed type comparision for BEs

tempestpy_adaptions
Matthias Volk 5 years ago
parent
commit
e9dfcb8e45
No known key found for this signature in database GPG Key ID: 83A57678F739FCD3
  1. 2
      src/storm-dft/storage/dft/elements/BEConst.h
  2. 2
      src/storm-dft/storage/dft/elements/BEExponential.h
  3. 8
      src/storm-dft/storage/dft/elements/DFTBE.h

2
src/storm-dft/storage/dft/elements/BEConst.h

@ -42,7 +42,7 @@ namespace storm {
ValueType getUnreliability(ValueType time) const override;
bool isTypeEqualTo(DFTElement<ValueType> const& other) const override {
if (!DFTElement<ValueType>::isTypeEqualTo(other)) {
if (!DFTBE<ValueType>::isTypeEqualTo(other)) {
return false;
}
auto& otherBE = static_cast<BEConst<ValueType> const&>(other);

2
src/storm-dft/storage/dft/elements/BEExponential.h

@ -78,7 +78,7 @@ namespace storm {
}
bool isTypeEqualTo(DFTElement<ValueType> const& other) const override {
if (!DFTElement<ValueType>::isTypeEqualTo(other)) {
if (!DFTBE<ValueType>::isTypeEqualTo(other)) {
return false;
}
auto& otherBE = static_cast<BEExponential<ValueType> const&>(other);

8
src/storm-dft/storage/dft/elements/DFTBE.h

@ -92,6 +92,14 @@ namespace storm {
return false;
}
bool isTypeEqualTo(DFTElement<ValueType> const& other) const override {
if (!DFTElement<ValueType>::isTypeEqualTo(other)) {
return false;
}
auto& otherBE = static_cast<DFTBE<ValueType> const&>(other);
return this->beType() == otherBE.beType();
}
private:
std::vector<std::shared_ptr<DFTDependency<ValueType>>> mIngoingDependencies;

Loading…
Cancel
Save