27 return std::distance(it, ite);
47 return std::distance(it, ite);
54 std::map<std::shared_ptr<TemplateEdge>, std::shared_ptr<TemplateEdge>> map;
55 for (
auto const& te : other.templates) {
56 auto newTe = std::make_shared<TemplateEdge>(*te);
57 this->templates.insert(newTe);
61 for (
auto& e : edges) {
62 if (map.count(e.getTemplateEdge()) == 0) {
63 e.setTemplateEdge(std::make_shared<TemplateEdge>(*(e.getTemplateEdge())));
65 e.setTemplateEdge(map[e.getTemplateEdge()]);
72 this->templates = std::move(otherCpy.templates);
73 this->edges = std::move(otherCpy.edges);
79 for (
auto& edge : edges) {
80 templates.insert(edge.getTemplateEdge());
82 for (
auto& templateEdge : templates) {
83 templateEdge->finalize(containingModel);
92 for (
auto& templateEdge : templates) {
93 templateEdge->liftTransientDestinationAssignments(maxLevel);
98 bool const substituteTranscendentalNumbers) {
99 for (
auto& templateEdge : templates) {
100 templateEdge->substitute(substitution, substituteTranscendentalNumbers);
102 for (
auto& edge : edges) {
103 edge.substitute(substitution, substituteTranscendentalNumbers);
108 for (
auto const& templateEdge : templates) {
109 if (!templateEdge->isLinear()) {
117 for (
auto const& edge : edges) {
118 if (edge.usesAssignmentLevels(onlyTransient)) {
138 std::set<uint64_t> result;
139 for (
auto const& edge : edges) {
140 result.insert(edge.getActionIndex());
152 assert(locStart <= locEnd);
154 auto posIt = edges.begin();
155 std::advance(posIt, locEnd);
156 edges.insert(posIt, e);
159 auto it = edges.begin();
160 std::advance(it, locStart);
161 auto ite = edges.begin();
162 std::advance(ite, locEnd + 1);
167 templates.insert(te);
171 for (
auto& templateEdge : templates) {
172 templateEdge->pushAssignmentsToDestinations();
177 for (
auto& templateEdge : templates) {
178 templateEdge->changeAssignmentVariables(remapping);
187 return edges.begin();
193 return edges.begin();
void clearConcreteEdges()
EdgeContainer & operator=(EdgeContainer const &other)
void changeAssignmentVariables(std::map< Variable const *, std::reference_wrapper< Variable const > > const &remapping)
void pushAssignmentsToDestinations()
std::set< uint64_t > getActionIndices() const
TemplateEdgeContainer const & getTemplateEdges() const
void insertEdge(Edge const &e, uint64_t locStart, uint64_t locEnd)
Insert an edge, then sort the range between locstart and locend according to the action index.
void finalize(Model const &containingModel)
std::vector< Edge >::iterator iterator
std::vector< Edge > const & getConcreteEdges() const
void insertTemplateEdge(std::shared_ptr< TemplateEdge > const &te)
std::vector< Edge >::const_iterator const_iterator
bool usesAssignmentLevels(bool onlyTransient=false) const
void liftTransientDestinationAssignments(int64_t maxLevel=0)
void substitute(std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution, bool const substituteTranscendentalNumbers)
uint64_t getActionIndex() const
Retrieves the id of the action with which this edge is labeled.
bool empty() const
Determines whether this set of edges is empty.
const_iterator end() const
Retrieves an end iterator to the edges.
std::vector< Edge >::const_iterator const_iterator
ConstEdges(const_iterator it, const_iterator ite)
const_iterator begin() const
Retrieves an iterator to the edges.
std::size_t size() const
Retrieves the number of edges.
Edges(iterator it, iterator ite)
iterator begin() const
Retrieves an iterator to the edges.
std::vector< Edge >::iterator iterator
bool empty() const
Determines whether this set of edges is empty.
iterator end() const
Retrieves an end iterator to the edges.
std::size_t size() const
Retrieves the number of edges.