|
|
@ -93,6 +93,17 @@ namespace storm { |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ItemLabeling::permuteItems(std::vector<uint64_t> const& inversePermutation) { |
|
|
|
STORM_LOG_THROW(inversePermutation.size() == itemCount, storm::exceptions::InvalidArgumentException, "Permutation does not match number of items"); |
|
|
|
std::vector<storm::storage::BitVector> newLabelings; |
|
|
|
for (storm::storage::BitVector const& source : this->labelings) { |
|
|
|
newLabelings.push_back(source.permute(inversePermutation)); |
|
|
|
} |
|
|
|
|
|
|
|
this->labelings = newLabelings; |
|
|
|
} |
|
|
|
|
|
|
|
void ItemLabeling::addLabel(std::string const& label, storage::BitVector const& labeling) { |
|
|
|
STORM_LOG_THROW(!this->containsLabel(label), storm::exceptions::InvalidArgumentException, "Label '" << label << "' already exists."); |
|
|
|
STORM_LOG_THROW(labeling.size() == itemCount, storm::exceptions::InvalidArgumentException, "Labeling vector has invalid size. Expected: " << itemCount << " Actual: " << labeling.size()); |
|
|
|