@@ -122,31 +122,6 @@ MPTime getMaxOfColUntilRow(Matrix &M, uint colNumber, uint rowNumber) {
122122 return largestEl;
123123}
124124
125- /*
126- * Loads an entity from its starting '{' to the corresponding '}'
127- */
128- std::string loadEntity (std::ifstream &stream, std::string line) {
129- std::string out = line;
130- size_t openBracketCount = 0 ;
131- size_t closeBracketCount = 0 ;
132- openBracketCount += std::count (line.begin (), line.end (), ' {' );
133- closeBracketCount += std::count (line.begin (), line.end (), ' }' );
134-
135- // get the whole activity {} into a string
136- while (getline (stream, line)) {
137-
138- openBracketCount += std::count (line.begin (), line.end (), ' {' );
139- closeBracketCount += std::count (line.begin (), line.end (), ' }' );
140- out += line;
141-
142- if (openBracketCount == closeBracketCount) {
143- openBracketCount = 0 ;
144- closeBracketCount = 0 ;
145- break ;
146- }
147- }
148- return out;
149- }
150125std::shared_ptr<MaxPlusAutomaton> SMPLS::convertToMaxPlusAutomaton () const {
151126 auto mpa = std::make_shared<MaxPlusAutomaton>();
152127 // transposeMatrices();
@@ -163,14 +138,14 @@ std::shared_ptr<MaxPlusAutomaton> SMPLS::convertToMaxPlusAutomaton() const {
163138 if (!e.empty ()) {
164139 MPString label = (dynamic_cast <ELSEdgeRef>(*e.begin ()))->getLabel ();
165140
166- for (const auto &smIt : this ->sm ) {
141+ for (const auto &smIt : this ->mm ) {
167142 if ((smIt).first == label) {
168143 nrTokens = (smIt).second ->getCols ();
169144 break ;
170145 }
171146 }
172147 } else {
173- nrTokens = (*this ->sm .begin ()).second ->getCols ();
148+ nrTokens = (*this ->mm .begin ()).second ->getCols ();
174149 }
175150 // create a state for (q, k)
176151 const CId qId = (dynamic_cast <ELSState &>(qq)).getLabel ();
@@ -222,7 +197,7 @@ std::shared_ptr<MaxPlusAutomaton> SMPLS::convertToMaxPlusAutomaton() const {
222197 const auto *tr = dynamic_cast <ELSEdgeRef>(e);
223198 CId q2Id = dynamic_cast <ELSStateRef>(tr->getDestination ())->getLabel ();
224199 MPString sc = tr->getLabel ();
225- std::shared_ptr<Matrix> Ms = this ->sm .at (sc);
200+ std::shared_ptr<Matrix> Ms = this ->mm .at (sc);
226201 size_t r = Ms->getRows ();
227202 size_t c = Ms->getCols ();
228203
@@ -347,7 +322,7 @@ std::shared_ptr<MaxPlusAutomaton> SMPLSwithEvents::convertToMaxPlusAutomaton() {
347322 * all square (to the size of the biggest matrix) by adding rows and cols of -infty
348323 */
349324void SMPLSwithEvents::makeMatricesSquare () {
350- for (const auto &it : this ->sm ) {
325+ for (const auto &it : this ->mm ) {
351326 std::shared_ptr<Matrix> m = it.second ;
352327 m->addCols (biggestMatrixSize - m->getCols ());
353328 m->addRows (biggestMatrixSize - m->getRows ());
@@ -356,7 +331,7 @@ void SMPLSwithEvents::makeMatricesSquare() {
356331
357332// transposes all matrices of the SMPLS
358333void SMPLS::transposeMatrices () {
359- for (auto &it : this ->sm ) {
334+ for (auto &it : this ->mm ) {
360335 it.second = it.second ->getTransposedCopy ();
361336 }
362337}
@@ -548,7 +523,7 @@ void SMPLSwithEvents::prepareMatrices(const IOAState &s,
548523 eList.insert (outputActionEventName);
549524 }
550525
551- this ->sm [modeName] = sMatrix ;
526+ this ->mm [modeName] = sMatrix ;
552527 visitedEdges.insert (e);
553528
554529 // we need this later to make all matrices square
@@ -762,7 +737,7 @@ bool SMPLSwithEvents::compareEventLists(EventList &l1, EventList &l2) {
762737
763738void SMPLSwithEvents::dissectModeMatrices () {
764739 ModeMatrices::iterator s;
765- for (const auto &s : this ->sm ) {
740+ for (const auto &s : this ->mm ) {
766741 numberOfResources = 0 ;
767742 std::shared_ptr<DissectedModeMatrix> dis = std::make_shared<DissectedModeMatrix>();
768743 dis->core .insert (s);
0 commit comments