Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::gspn::Marking Class Reference

#include <Marking.h>

Public Member Functions

 Marking (uint_fast64_t const &numberOfPlaces, std::map< uint_fast64_t, uint_fast64_t > const &numberOfBits, uint_fast64_t const &numberOfTotalBits)
 Creates an empty marking (at all places contain 0 tokens).
 
 Marking (uint_fast64_t const &numberOfPlaces, std::map< uint_fast64_t, uint_fast64_t > const &numberOfBits, storm::storage::BitVector const &bitvector)
 Create the marking described by the bitvector.
 
uint_fast64_t getNumberOfPlaces () const
 Retrieves the number of places for which the tokens are stored.
 
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.
 
uint_fast64_t getNumberOfTokensAt (uint_fast64_t const &place) const
 Get the number of tokens for the given place.
 
std::shared_ptr< storm::storage::BitVectorgetBitVector () const
 Returns a copy of the bitvector.
 
bool operator== (const Marking &other) const
 Overload equality operator.
 

Detailed Description

Definition at line 11 of file Marking.h.

Constructor & Destructor Documentation

◆ Marking() [1/2]

storm::gspn::Marking::Marking ( uint_fast64_t const &  numberOfPlaces,
std::map< uint_fast64_t, uint_fast64_t > const &  numberOfBits,
uint_fast64_t const &  numberOfTotalBits 
)

Creates an empty marking (at all places contain 0 tokens).

Parameters
numberOfPlacesThe number of places of the gspn.
numberOfBitsThe number of bits used to store the number of tokens for each place
numberOfTotalBitsThe length of the internal bitvector

Definition at line 7 of file Marking.cpp.

◆ Marking() [2/2]

storm::gspn::Marking::Marking ( uint_fast64_t const &  numberOfPlaces,
std::map< uint_fast64_t, uint_fast64_t > const &  numberOfBits,
storm::storage::BitVector const &  bitvector 
)

Create the marking described by the bitvector.

Parameters
numberOfPlacesThe number of places of the gspn.
numberOfBitsThe number of bits used to store the number of tokens for each place
bitvectorThe bitvector encoding the marking.

Definition at line 13 of file Marking.cpp.

Member Function Documentation

◆ getBitVector()

std::shared_ptr< storm::storage::BitVector > storm::gspn::Marking::getBitVector ( ) const

Returns a copy of the bitvector.

Returns
The bitvector which encodes the marking

Definition at line 39 of file Marking.cpp.

◆ getNumberOfPlaces()

uint_fast64_t storm::gspn::Marking::getNumberOfPlaces ( ) const

Retrieves the number of places for which the tokens are stored.

Returns
The number of places.

Definition at line 19 of file Marking.cpp.

◆ getNumberOfTokensAt()

uint_fast64_t storm::gspn::Marking::getNumberOfTokensAt ( uint_fast64_t const &  place) const

Get the number of tokens for the given place.

Parameters
placeThe place from which the tokens are counted.
Returns
The number of tokens at the place.

Definition at line 31 of file Marking.cpp.

◆ operator==()

bool storm::gspn::Marking::operator== ( const Marking other) const

Overload equality operator.

Definition at line 45 of file Marking.cpp.

◆ setNumberOfTokensAt()

void storm::gspn::Marking::setNumberOfTokensAt ( uint_fast64_t const &  place,
uint_fast64_t const &  numberOfTokens 
)

Set the number of tokens for the given place to the given amount.

Parameters
placePlace must be a valid place for which the number of tokens is changed.
numberOfTokensThe new number of tokens at the place.

Definition at line 23 of file Marking.cpp.


The documentation for this class was generated from the following files: