Storm 1.13.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ValuationDescription.cpp
Go to the documentation of this file.
2
3namespace storm::umb {
5 uint64_t totalSize = 0;
6 for (auto const& variable : variables) {
7 if (std::holds_alternative<Padding>(variable)) {
8 totalSize += std::get<Padding>(variable).padding;
9 } else if (std::holds_alternative<Variable>(variable)) {
10 auto const& var = std::get<Variable>(variable);
11 if (var.isOptional.value_or(false)) {
12 ++totalSize;
13 }
14 totalSize += var.type.bitSize();
15 }
16 }
17 return totalSize;
18}
19
20} // namespace storm::umb
std::vector< std::variant< Padding, Variable > > variables
uint64_t sizeInBits() const
Computes the size in bits of a valuation.