Clingo
Loading...
Searching...
No Matches
CppClingo::Ground::AtomAssignAggr Class Reference

Extensible ground representation of assignment aggregates. More...

#include <assignment_aggregate.hh>

Public Types

using Values = std::variant< Util::small_vector< Number >, Util::small_vector< Symbol > >
 The possible values an assignment aggregate can take.
 

Public Member Functions

 AtomAssignAggr (AggregateFunction fun)
 Initialize for the given aggregate function.
 
void accumulate (AggregateFunction fun, SymbolSpan tup, bool fact)
 Accumulate a tuple.
 
auto is_fact () const
 Check if the aggregate in its current state is a fact.
 
auto todo_values () -> std::variant< NumberSpan, SymbolSpan >
 Get the values to propagate.
 
void add_elem (size_t idx)
 Add a new element.
 
auto elems () const -> std::span< size_t const >
 Get the aggregate elements.
 
auto enqueue () -> bool
 Enqueue aggregate to propagate its elements.
 
void dequeue ()
 Dequeue an aggregate whose elements have been propagated.
 
auto todo () -> std::span< size_t const >
 Get the elements that have to be propagated.
 

Detailed Description

Extensible ground representation of assignment aggregates.

Member Typedef Documentation

◆ Values

The possible values an assignment aggregate can take.

Aggregates operating on numbers do not use symbols to avoid storing unnecessary intermediate symbols.


The documentation for this class was generated from the following file: