Browse Source

Merge remote-tracking branch 'refs/remotes/origin/master' into multi-objective-lra

tempestpy_adaptions
Tim Quatmann 4 years ago
parent
commit
f79814bcb4
  1. 9
      src/storm/storage/jani/EdgeContainer.cpp
  2. 1
      src/storm/storage/jani/EdgeContainer.h
  3. 12
      src/storm/storage/jani/TemplateEdgeContainer.cpp
  4. 1
      src/storm/storage/jani/TemplateEdgeContainer.h
  5. 2
      src/storm/utility/shortestPaths.h

9
src/storm/storage/jani/EdgeContainer.cpp

@ -67,9 +67,12 @@ namespace storm {
e.setTemplateEdge(map[e.getTemplateEdge()]); e.setTemplateEdge(map[e.getTemplateEdge()]);
} }
} }
}
EdgeContainer& EdgeContainer::operator=(EdgeContainer const& other) {
EdgeContainer otherCpy(other);
this->templates = std::move(other.templates);
this->edges = std::move(other.edges);
} }
void EdgeContainer::finalize(Model const& containingModel) { void EdgeContainer::finalize(Model const& containingModel) {

1
src/storm/storage/jani/EdgeContainer.h

@ -91,6 +91,7 @@ namespace storm {
EdgeContainer() = default; EdgeContainer() = default;
EdgeContainer(EdgeContainer const& other); EdgeContainer(EdgeContainer const& other);
EdgeContainer& operator=(EdgeContainer const& other);
void clearConcreteEdges(); void clearConcreteEdges();
std::vector<Edge> const& getConcreteEdges() const; std::vector<Edge> const& getConcreteEdges() const;

12
src/storm/storage/jani/TemplateEdgeContainer.cpp

@ -3,10 +3,18 @@
namespace storm { namespace storm {
namespace jani { namespace jani {
TemplateEdgeContainer::TemplateEdgeContainer(TemplateEdgeContainer const &other) {
TemplateEdgeContainer::TemplateEdgeContainer(TemplateEdgeContainer const &other) : std::unordered_set<std::shared_ptr<TemplateEdge>>() {
for (auto const& te : other) { for (auto const& te : other) {
this->insert(std::make_shared<TemplateEdge>(*te)); this->insert(std::make_shared<TemplateEdge>(*te));
} }
} }
TemplateEdgeContainer& TemplateEdgeContainer::operator=(const TemplateEdgeContainer& other) {
this->clear();
for (auto const& te : other) {
this->insert(std::make_shared<TemplateEdge>(*te));
}
return *this;
}
} }
}
}

1
src/storm/storage/jani/TemplateEdgeContainer.h

@ -11,6 +11,7 @@ namespace storm {
struct TemplateEdgeContainer : public std::unordered_set<std::shared_ptr<TemplateEdge>> { struct TemplateEdgeContainer : public std::unordered_set<std::shared_ptr<TemplateEdge>> {
TemplateEdgeContainer() = default; TemplateEdgeContainer() = default;
TemplateEdgeContainer(TemplateEdgeContainer const& other); TemplateEdgeContainer(TemplateEdgeContainer const& other);
TemplateEdgeContainer& operator=(TemplateEdgeContainer const& other);
}; };
} }
} }

2
src/storm/utility/shortestPaths.h

@ -47,7 +47,7 @@ namespace storm {
if (predecessorNode != rhs.predecessorNode) { if (predecessorNode != rhs.predecessorNode) {
return predecessorNode < rhs.predecessorNode; return predecessorNode < rhs.predecessorNode;
} }
return predecessorK < predecessorK;
return predecessorK < rhs.predecessorK;
} }
bool operator==(const Path<T>& rhs) const { bool operator==(const Path<T>& rhs) const {

Loading…
Cancel
Save