Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Marking.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_GSPN_MARKING_H_
2#define STORM_STORAGE_GSPN_MARKING_H_
3
4#include <cmath>
5#include <map>
6#include <memory>
8
9namespace storm {
10namespace gspn {
11class Marking {
12 public:
20 Marking(uint_fast64_t const& numberOfPlaces, std::map<uint_fast64_t, uint_fast64_t> const& numberOfBits, uint_fast64_t const& numberOfTotalBits);
21
29 Marking(uint_fast64_t const& numberOfPlaces, std::map<uint_fast64_t, uint_fast64_t> const& numberOfBits, storm::storage::BitVector const& bitvector);
30
36 uint_fast64_t getNumberOfPlaces() const;
37
44 void setNumberOfTokensAt(uint_fast64_t const& place, uint_fast64_t const& numberOfTokens);
45
52 uint_fast64_t getNumberOfTokensAt(uint_fast64_t const& place) const;
53
59 std::shared_ptr<storm::storage::BitVector> getBitVector() const;
60
64 bool operator==(const Marking& other) const;
65
66 private:
67 // the maximal number of places in the gspn
68 uint_fast64_t numberOfPlaces;
69
70 // number of bits for each place
71 std::map<uint_fast64_t, uint_fast64_t> numberOfBits;
72
73 // contains the information of the marking
75};
76} // namespace gspn
77} // namespace storm
78
79#endif // STORM_STORAGE_GSPN_MARKING_H_
std::shared_ptr< storm::storage::BitVector > getBitVector() const
Returns a copy of the bitvector.
Definition Marking.cpp:39
uint_fast64_t getNumberOfPlaces() const
Retrieves the number of places for which the tokens are stored.
Definition Marking.cpp:19
bool operator==(const Marking &other) const
Overload equality operator.
Definition Marking.cpp:45
void setNumberOfTokensAt(uint_fast64_t const &place, uint_fast64_t const &numberOfTokens)
Set the number of tokens for the given place to the given amount.
Definition Marking.cpp:23
uint_fast64_t getNumberOfTokensAt(uint_fast64_t const &place) const
Get the number of tokens for the given place.
Definition Marking.cpp:31
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
LabParser.cpp.
Definition cli.cpp:18