24 #ifndef PPL_Ask_Tell_defs_hh
25 #define PPL_Ask_Tell_defs_hh
38 void swap(Ask_Tell<D>& x, Ask_Tell<D>& y);
44 operator==(
const Ask_Tell<D>& x,
const Ask_Tell<D>& y);
50 operator!=(
const Ask_Tell<D>& x,
const Ask_Tell<D>& y);
52 namespace IO_Operators {
58 operator<<(std::ostream&, const Ask_Tell<D>&);
79 const D&
tell()
const;
105 template <
typename D>
131 Ask_Tell(
const D& ask,
const D& tell);
250 size_type
size()
const;
268 const_iterator
begin()
const;
271 const_iterator
end()
const;
277 reverse_iterator
rbegin();
280 reverse_iterator
rend();
287 const_reverse_iterator
rbegin()
const;
290 const_reverse_iterator
rend()
const;
305 void drop_pairs(iterator first, iterator last);
368 bool probe(
const D& tellv,
const D& askv)
const;
374 #endif // !defined(PPL_Ask_Tell_defs_hh)
memory_size_type external_memory_in_bytes() const
Returns a lower bound to the size in bytes of the memory managed by *this.
bool probe(const D &tellv, const D &askv) const
void normalize() const
Normalizes the pairs in *this.
iterator begin()
Returns an iterator pointing to the first pair, if *this is not empty; otherwise, returns the past-th...
bool operator!=(const Box< ITV > &x, const Box< ITV > &y)
void swap(CO_Tree &x, CO_Tree &y)
const D & ask() const
Const accessor to the ask component.
bool definitely_entails(const Ask_Tell_Pair &y) const
Returns true if *this definitely entails y. Returns false if *this may not entail y (i...
Ask_Tell & operator=(const Ask_Tell &y)
The assignment operator. (*this and y can be dimension-incompatible.)
Ask_Tell()
Default constructor: builds the top of the ask-and-tell constraint system (i.e., the empty system)...
Sequence::size_type size_type
iterator_to_const< Sequence > iterator
Alias for a read-only bidirectional iterator on the pairs an Ask_Tell object.
void drop_pairs(iterator first, iterator last)
Drops all the pairs from first to last (excluded).
const_iterator_to_const< Sequence > const_iterator
A bidirectional const_iterator on the disjuncts of a Powerset element.
bool empty() const
Returns true if and only if there are no pairs in *this.
bool is_bottom() const
Returns true if and only if *this is the bottom element of the ask-and-tell constraint system (i...
void m_swap(Ask_Tell &y)
Swaps *this with y.
Sequence::iterator Sequence_iterator
Alias for the low-level iterator on the pairs.
size_type size() const
Returns the number of pairs.
iterator end()
Returns the past-the-end iterator.
Ask_Tell_Pair(const D &ask, const D &tell)
Pair constructor.
std::reverse_iterator< iterator > reverse_iterator
The reverse iterator type built from Powerset::iterator.
memory_size_type total_memory_in_bytes() const
Returns a lower bound to the total size in bytes of the memory occupied by *this. ...
std::reverse_iterator< const_iterator > const_reverse_iterator
The reverse iterator type built from Powerset::const_iterator.
Sequence sequence
The sequence container holding the pairs/.
reverse_iterator rbegin()
Returns a reverse_iterator pointing to the last pair, if *this is not empty; otherwise, returns the before-the-start reverse_iterator.
bool is_normalized() const
Returns true if and only if *this is normalized.
std::list< Ask_Tell_Pair< D > > Sequence
An ask-tell agent is implemented as a sequence of ask-tell pairs.
void upper_bound_assign(const Ask_Tell &y)
Assigns to *this an upper bound of *this and y.
bool definitely_entails(const Ask_Tell &y) const
Returns true if *this definitely entails y. Returns false if *this may not entail y (i...
void meet_assign(const Ask_Tell &y)
Assigns to *this the meet of *this and y.
int32_t hash_code() const
Returns a 32-bit hash code for *this.
bool is_top() const
Returns true if and only if *this is the top element of the ask-and-tell constraint system (i...
A const_iterator on a sequence of read-only objects.
Ask_Tell & add_pair(const Ask_Tell_Pair< D > &p)
Adds to *this the pair p.
The entire library is confined to this namespace.
Ask_Tell_Pair< D > Pair
An ask-tell agent is composed of pairs.
Sequence::const_iterator Sequence_const_iterator
Alias for the low-level const_iterator on the pairs.
const D & tell() const
Const accessor to the ask component.
void pair_insert_good(const D &a, const D &t)
bool normalized
If true, *this is normalized.
bool check_normalized() const
Does the hard work of checking whether *this is normalized and returns true if and only if it is...
Sequence::value_type value_type
iterator drop_pair(iterator position)
Drops the pair in *this pointed to by position, returning an iterator to the pair following position...
bool operator==(const Box< ITV > &x, const Box< ITV > &y)
A pair of ask and tell descriptions.
An iterator on a sequence of read-only objects.
reverse_iterator rend()
Returns the before-the-start reverse_iterator.
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
void pair_insert(const D &a, const D &t)
The ask and tell construction on a base-level domain.
void clear()
Drops all the pairs, making *this an empty powerset.
bool OK() const
Checks if all the invariants are satisfied.