6#include <unordered_map>
56 void addLabel(std::string
const& label);
140 void permuteItems(std::vector<uint64_t>
const& inversePermutation);
142 virtual std::size_t
hash()
const;
183 virtual bool getItemHasLabel(std::string
const& label, uint64_t item)
const;
215 virtual void addLabelToItem(std::string
const& label, uint64_t item);
This class manages the labeling of the choice space with a number of (atomic) labels.
A base class managing the labeling of items with a number of (atomic) labels.
virtual std::size_t hash() const
virtual std::set< std::string > getLabelsOfItem(uint64_t item) const
Retrieves the set of labels attached to the given item.
virtual void setItems(std::string const &label, storage::BitVector const &labeling)
Sets the labeling of items associated with the given label.
std::string addUniqueLabel(std::string const &prefix, storage::BitVector const &labeling)
Creates a new label with a unique name, derived from the prefix, and attaches it to the given items.
std::set< std::string > getLabels() const
Retrieves the set of labels contained in this labeling.
ItemLabeling(uint64_t itemCount=0)
Constructs an empty labeling for the given number of items.
virtual bool isChoiceLabeling() const
virtual bool getItemHasLabel(std::string const &label, uint64_t item) const
Checks whether a given item is labeled with the given label.
void addLabel(std::string const &label)
Adds a new label to the labelings.
void permuteItems(std::vector< uint64_t > const &inversePermutation)
ChoiceLabeling const & asChoiceLabeling() const
ItemLabeling getSubLabeling(storm::storage::BitVector const &items) const
Retrieves the sub labeling that represents the same labeling as the current one for all selected item...
void join(ItemLabeling const &other)
Adds all labels from the other labeling to this labeling.
bool containsLabel(std::string const &label) const
Checks whether a label is registered within this labeling.
std::size_t getNumberOfItems() const
Returns the number of items managed by this object.
void removeLabel(std::string const &label)
Removes a label from the labelings.
void printCompleteLabelingInformationToStream(std::ostream &out=std::cout) const
Prints the complete labeling to the specified stream.
virtual bool isStateLabeling() const
virtual ~ItemLabeling()=default
std::unordered_map< std::string, uint64_t > nameToLabelingIndexMap
StateLabeling const & asStateLabeling() const
ItemLabeling & operator=(ItemLabeling const &other)=default
virtual storm::storage::BitVector const & getItems(std::string const &label) const
Returns the labeling of items associated with the given label.
virtual void addLabelToItem(std::string const &label, uint64_t item)
Adds a label to a given item.
bool operator==(ItemLabeling const &other) const
Checks whether the two labelings are equal.
void printLabelingInformationToStream(std::ostream &out=std::cout) const
Prints information about the labeling to the specified stream.
std::vector< storm::storage::BitVector > labelings
virtual void removeLabelFromItem(std::string const &label, uint64_t item)
Removes a label from a given item.
std::size_t getNumberOfLabels() const
Returns the number of labels managed by this object.
std::string generateUniqueLabel(const std::string &prefix) const
Generate a unique, previously unused label from the given prefix string.
friend std::ostream & operator<<(std::ostream &out, ItemLabeling const &labeling)
ItemLabeling(ItemLabeling const &other)=default
This class manages the labeling of the state space with a number of (atomic) labels.
A bit vector that is internally represented as a vector of 64-bit values.