From e9dfcb8e450bbad40c18cd1b804a52d3377b243e Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 12 May 2020 14:30:37 +0200 Subject: [PATCH] Fixed type comparision for BEs --- src/storm-dft/storage/dft/elements/BEConst.h | 2 +- src/storm-dft/storage/dft/elements/BEExponential.h | 2 +- src/storm-dft/storage/dft/elements/DFTBE.h | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/storm-dft/storage/dft/elements/BEConst.h b/src/storm-dft/storage/dft/elements/BEConst.h index 3f0cdd949..6c82f19a4 100644 --- a/src/storm-dft/storage/dft/elements/BEConst.h +++ b/src/storm-dft/storage/dft/elements/BEConst.h @@ -42,7 +42,7 @@ namespace storm { ValueType getUnreliability(ValueType time) const override; bool isTypeEqualTo(DFTElement const& other) const override { - if (!DFTElement::isTypeEqualTo(other)) { + if (!DFTBE::isTypeEqualTo(other)) { return false; } auto& otherBE = static_cast const&>(other); diff --git a/src/storm-dft/storage/dft/elements/BEExponential.h b/src/storm-dft/storage/dft/elements/BEExponential.h index e29d44642..f52d204bd 100644 --- a/src/storm-dft/storage/dft/elements/BEExponential.h +++ b/src/storm-dft/storage/dft/elements/BEExponential.h @@ -78,7 +78,7 @@ namespace storm { } bool isTypeEqualTo(DFTElement const& other) const override { - if (!DFTElement::isTypeEqualTo(other)) { + if (!DFTBE::isTypeEqualTo(other)) { return false; } auto& otherBE = static_cast const&>(other); diff --git a/src/storm-dft/storage/dft/elements/DFTBE.h b/src/storm-dft/storage/dft/elements/DFTBE.h index 1dd2d91d0..80f8d77e3 100644 --- a/src/storm-dft/storage/dft/elements/DFTBE.h +++ b/src/storm-dft/storage/dft/elements/DFTBE.h @@ -92,6 +92,14 @@ namespace storm { return false; } + bool isTypeEqualTo(DFTElement const& other) const override { + if (!DFTElement::isTypeEqualTo(other)) { + return false; + } + auto& otherBE = static_cast const&>(other); + return this->beType() == otherBE.beType(); + } + private: std::vector>> mIngoingDependencies;