We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dfdd492 + 5e7a2df commit 35a3d91Copy full SHA for 35a3d91
include/maxplus/base/fsm/fsm.h
@@ -458,7 +458,13 @@ class FiniteStateMachine : public Abstract::FiniteStateMachine {
458
return &e;
459
};
460
461
- void removeEdge(const Edge<StateLabelType, EdgeLabelType> &e) { this->edges.remove(e); }
+ void removeEdge(const Edge<StateLabelType, EdgeLabelType> &e) {
462
+ auto csrc = dynamic_cast<State<StateLabelType, EdgeLabelType> &>(e.getSource());
463
+ // get a non-const version of the state
464
+ auto src = this->getStateLabeled(csrc.getLabel());
465
+ src.removeOutgoingEdge(e);
466
+ this->edges.remove(e);
467
+ }
468
469
void removeState(const State<StateLabelType, EdgeLabelType> &s) {
470
// remove related edges
0 commit comments