#include <cursor.h>
Inherits astl::bfirst_cursor_concept.
Public Types | |
typedef QueueCursor::char_traits | char_traits |
Character traits describing char_type. | |
typedef QueueCursor::char_type | char_type |
The type of the transitions letters. | |
typedef QueueCursor::state_type | state_type |
The type of the automaton-states identifiers. | |
typedef QueueCursor::tag_type | tag_type |
The type of the data attached to states. | |
Public Member Functions | |
state_type | aim () const |
Returns the aim state of the pointed transition. | |
bool | aim_final () const |
Returns true if the aim state of the transition that this cursor points to is final. | |
tag_type | aim_tag () const |
Returns the data attached to the aim state of the pointed transition. | |
bfirst_cursor () | |
Creates a cursor with an empty queue used as an end-of-range iterator. | |
bfirst_cursor (const QueueCursor &x, const MarkerFunction &f=MarkerFunction()) | |
Creates a cursor with x as queue. | |
char_type | letter () const |
Returns the letter on the pointed transition. | |
bool | next () |
Increments the cursor making it point to the next transition in the sequence. | |
bool | operator!= (const self &x) const |
Returns true if queues are different compared element by element. | |
bool | operator== (const self &x) const |
Returns true if both queues are equal compared element by element. | |
state_type | src () const |
Returns the identifier of the state that this cursor points to. | |
bool | src_final () const |
Returns true if the state that this cursor points to is final. | |
tag_type | src_tag () const |
Returns the data attached to the state that this cursor points to. |
It is an iterator on a sequence of transitions ordered according to the breadth-first traversal algorithm. The method next() allows to increment the cursor, making it point to the next transition in the sequence. This methods returns true
if the transition reached has been enqueued and false
otherwise (dequeue). The bfirst_cursor is used in the same way as the iterators on sequence to define ranges foralgorithms.
Parameter | Description | Default | Requirements |
---|---|---|---|
QueueCursor | The type of the queue cursor | QueueCursor is a model of queue cursor | |
MarkerFunction | The type of state marker used for preventing the cursor from visiting twice the same transition on cyclic automata and DAGs | none | MarkerFunction is either none , set_marker<ForwardCursor::state_type> or a model of state marker |
state_type aim | ( | ) | const |
Returns the aim state of the pointed transition.
bool aim_final | ( | ) | const |
Returns true
if the aim state of the transition that this cursor points to is final.
tag_type aim_tag | ( | ) | const |
Returns the data attached to the aim state of the pointed transition.
char_type letter | ( | ) | const |
Returns the letter on the pointed transition.
bool next | ( | ) |
Increments the cursor making it point to the next transition in the sequence.
Returns true
if the transition reached has been enqueued.
bool operator!= | ( | const self & | x | ) | const |
Returns true
if queues are different compared element by element.
bool operator== | ( | const self & | x | ) | const |
Returns true
if both queues are equal compared element by element.
state_type src | ( | ) | const |
bool src_final | ( | ) | const |
tag_type src_tag | ( | ) | const |
Returns the data attached to the state that this cursor points to.