4747#include < unordered_set>
4848#include < vector>
4949
50-
5150class CString ;
5251
5352namespace MaxPlus {
@@ -66,7 +65,7 @@ class Vector {
6665 ~Vector ();
6766
6867 Vector (Vector &&) = default ;
69- Vector &operator =(Vector &&) = default ;
68+ Vector &operator =(Vector &&) = delete ;
7069
7170 [[nodiscard]] inline unsigned int getSize () const {
7271 return static_cast <unsigned int >(this ->table .size ());
@@ -76,7 +75,7 @@ class Vector {
7675
7776 void put (unsigned int row, MPTime value);
7877
79- void toString (CString &outString, double scale = 1.0 ) const ;
78+ void toString (CString &outString, CDouble scale = 1.0 ) const ;
8079
8180 Vector (const Vector &);
8281
@@ -125,7 +124,7 @@ class Vector {
125124 MPTime minimalFiniteElement (unsigned int *itsPosition_Ptr = nullptr ) const ;
126125
127126private:
128- vector<MPTime> table;
127+ std:: vector<MPTime> table;
129128};
130129
131130enum class MatrixFill { MinusInfinity, Zero, Identity };
@@ -172,21 +171,21 @@ class Matrix {
172171
173172 [[nodiscard]] Matrix *getTransposedCopy () const ;
174173
175- [[nodiscard]] virtual Matrix *getSubMatrix (const list<unsigned int > &rowIndices,
176- const list<unsigned int > &colIndices) const ;
174+ [[nodiscard]] virtual Matrix *getSubMatrix (const std:: list<unsigned int > &rowIndices,
175+ const std:: list<unsigned int > &colIndices) const ;
177176
178- [[nodiscard]] Matrix *getSubMatrix (const list<unsigned int > &indices) const ;
177+ [[nodiscard]] Matrix *getSubMatrix (const std:: list<unsigned int > &indices) const ;
179178
180- [[nodiscard]] Matrix *getSubMatrixNonSquare (const list<unsigned int > &indices) const ;
179+ [[nodiscard]] Matrix *getSubMatrixNonSquare (const std:: list<unsigned int > &indices) const ;
181180
182181 /* *
183182 * Increases the number of rows of the matrix by n and fills the new elements with -\infty.
184183 */
185184 void addRows (uint n);
186185
187- void toString (CString &outString, double scale = 1.0 ) const ;
188- void toMatlabString (CString &outString, double scale = 1.0 ) const ;
189- void toLaTeXString (CString &outString, double scale = 1.0 ) const ;
186+ void toString (CString &outString, CDouble scale = 1.0 ) const ;
187+ void toMatlabString (CString &outString, CDouble scale = 1.0 ) const ;
188+ void toLaTeXString (CString &outString, CDouble scale = 1.0 ) const ;
190189
191190 // Algebraic operations.
192191 [[nodiscard]] Matrix *add (MPTime increase) const ;
@@ -264,7 +263,7 @@ class Matrix {
264263
265264 Matrix ();
266265
267- vector<MPTime> table;
266+ std:: vector<MPTime> table;
268267 unsigned int szRows;
269268 unsigned int szCols;
270269};
@@ -296,16 +295,16 @@ class ExtendedMatrix : public Matrix {
296295 }
297296
298297 void put (unsigned int row, unsigned int column, MPTime value, std::unordered_set<int > &);
299- [[nodiscard]] Matrix *getSubMatrix (const list<unsigned int > &rowIndices,
300- const list<unsigned int > &colIndices) const override ;
298+ [[nodiscard]] Matrix *getSubMatrix (const std:: list<unsigned int > &rowIndices,
299+ const std:: list<unsigned int > &colIndices) const override ;
301300
302301 // factory methods
303302 [[nodiscard]] Matrix *makeMatrix (unsigned int nr_rows, unsigned int nr_cols) const override ;
304303
305304 [[nodiscard]] std::unordered_set<int > getBufferSet (unsigned int row, unsigned int column) const ;
306305
307306private:
308- vector<std::unordered_set<int >> bufferSets;
307+ std:: vector<std::unordered_set<int >> bufferSets;
309308};
310309
311310/* ***************************************************
@@ -320,11 +319,11 @@ class VectorList : private std::vector<std::unique_ptr<Vector>> {
320319
321320 VectorList (VectorList &&) = default ;
322321 VectorList &operator =(VectorList &&) = delete ;
323-
322+
324323 // Implicit copying is not allowed
325324 // => Intentionally private and not implemented
326- VectorList (const VectorList &)= delete ;
327- VectorList &operator =(const VectorList &)= delete ;
325+ VectorList (const VectorList &) = delete ;
326+ VectorList &operator =(const VectorList &) = delete ;
328327
329328 [[nodiscard]] const Vector &vectorRefAt (unsigned int n) const ; // vector at index 'n'
330329 Vector &vectorRefAt (unsigned int n);
@@ -337,9 +336,9 @@ class VectorList : private std::vector<std::unique_ptr<Vector>> {
337336
338337 void grow (); // append one vector place
339338
340- void toString (CString &outString, double scale = 1.0 ) const ;
339+ void toString (CString &outString, CDouble scale = 1.0 ) const ;
341340
342- // bool findSimilar(const Vector& vec, double threshold) const;
341+ // bool findSimilar(const Vector& vec, CDouble threshold) const;
343342 // similar - differs by a constant within a threshold
344343
345344private:
@@ -358,14 +357,12 @@ inline const Vector &VectorList::lastVectorRef() const { return *this->at(this->
358357
359358inline Vector &VectorList::lastVectorRef () { return *this ->at (this ->size () - 1 ); }
360359
361- inline unsigned int VectorList::getSize () const {
362- return static_cast <unsigned int >(this ->size ());
363- }
360+ inline unsigned int VectorList::getSize () const { return static_cast <unsigned int >(this ->size ()); }
364361
365362inline void VectorList::grow () {
366363 auto last = static_cast <unsigned int >(this ->size ());
367364 this ->resize (last + 1 );
368- this ->insert (this ->begin ()+ last, std::make_unique<Vector>(oneVectorSize, MP_MINUSINFINITY));
365+ this ->insert (this ->begin () + last, std::make_unique<Vector>(oneVectorSize, MP_MINUSINFINITY));
369366}
370367
371368} // namespace MaxPlus
0 commit comments