dehnert
8 years ago
6 changed files with 103 additions and 42 deletions
-
28src/storm/storage/jani/EdgeDestination.cpp
-
34src/storm/storage/jani/EdgeDestination.h
-
3src/storm/storage/jani/TemplateEdge.cpp
-
7src/storm/storage/jani/TemplateEdge.h
-
31src/storm/storage/jani/TemplateEdgeDestination.cpp
-
42src/storm/storage/jani/TemplateEdgeDestination.h
@ -0,0 +1,31 @@ |
|||
#include "storm/storage/jani/TemplateEdgeDestination.h"
|
|||
|
|||
namespace storm { |
|||
namespace jani { |
|||
|
|||
TemplateEdgeDestination::TemplateEdgeDestination(OrderedAssignments const& assignments) : assignments(assignments) { |
|||
// Intentionally left empty.
|
|||
} |
|||
|
|||
TemplateEdgeDestination::TemplateEdgeDestination(Assignment const& assignment) : assignments(assignment) { |
|||
// Intentionally left empty.
|
|||
} |
|||
|
|||
TemplateEdgeDestination::TemplateEdgeDestination(std::vector<Assignment> const& assignments) : assignments(assignments) { |
|||
// Intentionally left empty.
|
|||
} |
|||
|
|||
void TemplateEdgeDestination::substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution) { |
|||
assignments.substitute(substitution); |
|||
} |
|||
|
|||
OrderedAssignments const& TemplateEdgeDestination::getOrderedAssignments() const { |
|||
return assignments; |
|||
} |
|||
|
|||
bool TemplateEdgeDestination::removeAssignment(Assignment const& assignment) { |
|||
return assignments.remove(assignment); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
#pragma once |
|||
|
|||
#include "storm/storage/jani/OrderedAssignments.h" |
|||
|
|||
namespace storm { |
|||
namespace jani { |
|||
|
|||
class TemplateEdgeDestination { |
|||
public: |
|||
TemplateEdgeDestination() = default; |
|||
TemplateEdgeDestination(OrderedAssignments const& assignments); |
|||
TemplateEdgeDestination(Assignment const& assignment); |
|||
TemplateEdgeDestination(std::vector<Assignment> const& assignments = {}); |
|||
|
|||
/*! |
|||
* Substitutes all variables in all expressions according to the given substitution. |
|||
*/ |
|||
void substitute(std::map<storm::expressions::Variable, storm::expressions::Expression> const& substitution); |
|||
|
|||
OrderedAssignments const& getOrderedAssignments() const; |
|||
|
|||
// Convenience methods to access the assignments. |
|||
bool hasAssignment(Assignment const& assignment) const; |
|||
bool removeAssignment(Assignment const& assignment); |
|||
|
|||
/*! |
|||
* Retrieves whether this destination has transient assignments. |
|||
*/ |
|||
bool hasTransientAssignment() const; |
|||
|
|||
/*! |
|||
* Retrieves whether the edge uses an assignment level other than zero. |
|||
*/ |
|||
bool usesAssignmentLevels() const; |
|||
|
|||
private: |
|||
// The (ordered) assignments to make when choosing this destination. |
|||
OrderedAssignments assignments; |
|||
}; |
|||
|
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue