16template<
typename Model>
19 typedef std::shared_ptr<Product<Model>>
ptr;
28 : productModel(productModel),
29 productStateOfInterestLabel(productStateOfInterestLabel),
30 productStateToProductIndex(productStateToProductIndex),
31 productIndexToProductState(productIndexToProductState) {}
41 return productIndexToProductState.at(productStateIndex).first;
45 return productIndexToProductState.at(productStateIndex).second;
53 return (productStateToProductIndex.count(
product_state_type(modelState, automatonState)) > 0);
57 state_type n = productModel.getNumberOfStates();
68 state_type n = productModel.getNumberOfStates();
78 template<
typename ValueType>
79 std::vector<ValueType>
projectToOriginalModel(
const Model& originalModel,
const std::vector<ValueType>& prodValues) {
83 template<
typename ValueType>
84 std::vector<ValueType>
projectToOriginalModel(std::size_t numberOfStates,
const std::vector<ValueType>& prodValues) {
85 std::vector<ValueType> origValues(numberOfStates);
86 for (
state_type productState : productModel.getStateLabeling().getStates(productStateOfInterestLabel)) {
88 origValues.at(originalState) = prodValues.at(productState);
94 return productModel.getStates(productStateOfInterestLabel);
98 out <<
"Mapping index -> product state\n";
99 for (std::size_t i = 0; i < productIndexToProductState.size(); i++) {
100 out <<
" " << i <<
": " << productIndexToProductState.at(i).first <<
"," << productIndexToProductState.at(i).second <<
"\n";
106 std::string productStateOfInterestLabel;
A bit vector that is internally represented as a vector of 64-bit values.
void set(uint64_t index, bool value=true)
Sets the given truth value at the given index.
bool get(uint64_t index) const
Retrieves the truth value of the bit at the given index and performs a bound check.