Class model::BinaryWithCounter
Constructors
BinaryWithCounter()
Declaration
model::BinaryWithCounter<T>::BinaryWithCounter()
BinaryWithCounter()
Declaration
model::BinaryWithCounter<T>::BinaryWithCounter(size_t N, size_t M)
Methods
copy_state_only()
Declaration
void model::BinaryWithCounter<T>::copy_state_only(const BinaryWithCounter&other)
render()
render the object in structured form
Return a structured representation of the object. This is intended for output purposes. For instance, the solution your solver finds should have a render method which allows it to be returned as part of the result. Example:
{c++}
MySolution : public Component {
public:
// Represent the internal bool vector as +-1 output.
utils::Structure render() const override {
utils::Structure rendered;
for (bool item : solution_) rendered.push_back(item ? 1 : -1);
return rendered;
}
private:
std::vector<bool> solution_;
}
MySolution solution;
std::cout << solution.render().to_string() << std::endl;
Declaration
utils::Structure model::BinaryWithCounter<T>::render() const override
render()
Declaration
utils::Structure model::BinaryWithCounter<T>::render(const std::map<int, int>&ids_map) const
memory_estimate()
Declaration
static size_t model::BinaryWithCounter<T>::memory_estimate(size_t N, size_t M)
state_only_memory_estimate()
Declaration
static size_t model::BinaryWithCounter<T>::state_only_memory_estimate(size_t N)