|
BWAPI
|
Count the number of alternations in a sequence of NTs. More...
#include <Alternation_counter.h>
Public Member Functions | |
| Alternation_counter () | |
| void | push_back (const NT &i) |
| Add the next element in the sequence. | |
| std::size_t | number_of_alternations () const |
| The number of alternations found. | |
| bool | is_uncertain () const |
| Return true if an interval with unknown sign could have changed the number of alternations. | |
| bool | parity_uncertain () const |
| Return true if an interval with unknown sign could have changed the parity of the alternations. | |
Protected Attributes | |
| std::size_t | num_alternations_ |
| Extended_sign | last_sign_ |
| bool | count_uncertain_ |
| bool | parity_uncertain_ |
| bool | last_was_uncertain_ |
Count the number of alternations in a sequence of NTs.
The extended_sign function is used to support interval arithmetic (where the sign can be uncertain).
| Alternation_counter< NT >::Alternation_counter | ( | ) | [inline] |
| bool Alternation_counter< NT >::is_uncertain | ( | ) | const [inline] |
Return true if an interval with unknown sign could have changed the number of alternations.
| std::size_t Alternation_counter< NT >::number_of_alternations | ( | ) | const [inline] |
The number of alternations found.
Note, this may not be correct (if intervals are used). It is the number found.
| bool Alternation_counter< NT >::parity_uncertain | ( | ) | const [inline] |
Return true if an interval with unknown sign could have changed the parity of the alternations.
| void Alternation_counter< NT >::push_back | ( | const NT & | i | ) | [inline] |
bool Alternation_counter< NT >::count_uncertain_ [protected] |
Extended_sign Alternation_counter< NT >::last_sign_ [protected] |
bool Alternation_counter< NT >::last_was_uncertain_ [protected] |
std::size_t Alternation_counter< NT >::num_alternations_ [protected] |
bool Alternation_counter< NT >::parity_uncertain_ [protected] |
1.7.6.1