Browse Source

experimented with custom style checker, fixed a few minor issues

main
gereon 13 years ago
parent
commit
facec2b040
  1. 18
      src/models/AbstractModel.cpp
  2. 8
      src/storage/BitVector.h
  3. 11
      src/storage/SparseMatrix.h
  4. 4
      src/utility/Settings.h

18
src/models/AbstractModel.cpp

@ -13,13 +13,13 @@
* @return Output stream os. * @return Output stream os.
*/ */
std::ostream& storm::models::operator<<(std::ostream& os, storm::models::ModelType const type) { std::ostream& storm::models::operator<<(std::ostream& os, storm::models::ModelType const type) {
switch (type) { switch (type) {
case storm::models::Unknown: os << "Unknown"; break; case storm::models::Unknown: os << "Unknown"; break;
case storm::models::DTMC: os << "DTMC"; break; case storm::models::DTMC: os << "DTMC"; break;
case storm::models::CTMC: os << "CTMC"; break; case storm::models::CTMC: os << "CTMC"; break;
case storm::models::MDP: os << "MDP"; break; case storm::models::MDP: os << "MDP"; break;
case storm::models::CTMDP: os << "CTMDP"; break; case storm::models::CTMDP: os << "CTMDP"; break;
default: os << "Invalid ModelType"; break; default: os << "Invalid ModelType"; break;
} }
return os; return os;
} }

8
src/storage/BitVector.h

@ -69,13 +69,17 @@ public:
* Returns the index of the current bit that is set to true. * Returns the index of the current bit that is set to true.
* @return The index of the current bit that is set to true. * @return The index of the current bit that is set to true.
*/ */
uint_fast64_t operator*() const { return currentIndex; } uint_fast64_t operator*() const {
return currentIndex;
}
/*! /*!
* Compares the iterator with another iterator to determine whether * Compares the iterator with another iterator to determine whether
* the iteration process has reached the end. * the iteration process has reached the end.
*/ */
bool operator!=(const constIndexIterator& rhs) const { return currentIndex != rhs.currentIndex; } bool operator!=(const constIndexIterator& rhs) const {
return currentIndex != rhs.currentIndex;
}
private: private:
/*! The bit vector to search for set bits. */ /*! The bit vector to search for set bits. */

11
src/storage/SparseMatrix.h

@ -25,10 +25,13 @@
extern log4cplus::Logger logger; extern log4cplus::Logger logger;
// Forward declaration for adapter classes. // Forward declaration for adapter classes.
namespace storm { namespace adapters{ class GmmxxAdapter; } }
namespace storm { namespace storm {
namespace adapters{
class GmmxxAdapter;
}
}
namespace storm {
namespace storage { namespace storage {
/*! /*!
@ -91,7 +94,8 @@ public:
* Constructs a square sparse matrix object with the given number rows * Constructs a square sparse matrix object with the given number rows
* @param size The number of rows and cols in the matrix * @param size The number of rows and cols in the matrix
*/ */
SparseMatrix(uint_fast64_t size) : rowCount(size), colCount(size), nonZeroEntryCount(0), SparseMatrix(uint_fast64_t size)
: rowCount(size), colCount(size), nonZeroEntryCount(0),
internalStatus(MatrixStatus::UnInitialized), currentSize(0), lastRow(0) { } internalStatus(MatrixStatus::UnInitialized), currentSize(0), lastRow(0) { }
//! Copy Constructor //! Copy Constructor
@ -318,7 +322,6 @@ public:
throw storm::exceptions::OutOfRangeException("Trying to add a value at illegal position."); throw storm::exceptions::OutOfRangeException("Trying to add a value at illegal position.");
} }
// If we switched to another row, we have to adjust the missing // If we switched to another row, we have to adjust the missing
// entries in the row_indications array. // entries in the row_indications array.
if (row != lastRow) { if (row != lastRow) {

4
src/utility/Settings.h

@ -57,14 +57,14 @@ namespace settings {
} }
/*! /*!
* @brief Get value of string option * @brief Get value of string option.
*/ */
inline const std::string& getString(std::string const & name) const { inline const std::string& getString(std::string const & name) const {
return this->get<std::string>(name); return this->get<std::string>(name);
} }
/*! /*!
* @brief Check if an option is set * @brief Check if an option is set.
*/ */
inline const bool isSet(std::string const & name) const { inline const bool isSet(std::string const & name) const {
return this->vm.count(name) > 0; return this->vm.count(name) > 0;

|||||||
100:0
Loading…
Cancel
Save