7template<
typename Model>
10 typedef std::shared_ptr<Product<Model>>
ptr;
19 : productModel(productModel),
20 productStateOfInterestLabel(productStateOfInterestLabel),
21 productStateToProductIndex(productStateToProductIndex),
22 productIndexToProductState(productIndexToProductState) {}
32 return productIndexToProductState.at(productStateIndex).first;
36 return productIndexToProductState.at(productStateIndex).second;
44 return (productStateToProductIndex.count(
product_state_type(modelState, automatonState)) > 0);
48 state_type n = productModel.getNumberOfStates();
59 state_type n = productModel.getNumberOfStates();
69 template<
typename ValueType>
70 std::vector<ValueType>
projectToOriginalModel(
const Model& originalModel,
const std::vector<ValueType>& prodValues) {
74 template<
typename ValueType>
75 std::vector<ValueType>
projectToOriginalModel(std::size_t numberOfStates,
const std::vector<ValueType>& prodValues) {
76 std::vector<ValueType> origValues(numberOfStates);
77 for (
state_type productState : productModel.getStateLabeling().getStates(productStateOfInterestLabel)) {
79 origValues.at(originalState) = prodValues.at(productState);
85 return productModel.getStates(productStateOfInterestLabel);
89 out <<
"Mapping index -> product state\n";
90 for (std::size_t i = 0; i < productIndexToProductState.size(); i++) {
91 out <<
" " << i <<
": " << productIndexToProductState.at(i).first <<
"," << productIndexToProductState.at(i).second <<
"\n";
97 std::string productStateOfInterestLabel;
A bit vector that is internally represented as a vector of 64-bit values.
void set(uint_fast64_t index, bool value=true)
Sets the given truth value at the given index.
bool get(uint_fast64_t index) const
Retrieves the truth value of the bit at the given index and performs a bound check.