\seekquarry\yioop\library\indexing_pluginsQueue

Queue for the BFS traversal

Summary

Methods
Properties
Constants
__construct()
enqueue()
dequeue()
isEmpty()
$size
$queue_array
$front
$rear
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$size

$size : integer

Number of elements queue can hold

Type

integer

$queue_array

$queue_array : array

Circular array used to store queue elements

Type

array

$front

$front : integer

Index in $queue_array of the front of the queue

Type

integer

$rear

$rear : integer

Index in $queue_array of the end of the queue

Type

integer

Methods

__construct()

__construct(integer  $size) 

Builds a queue suitable for doing breadth first search traversal

Parameters

integer $size

number of elements queue can hold

enqueue()

enqueue(string  $i) 

Add an element, typically a Vertex label to the queue

Parameters

string $i

typically a Vertex label

dequeue()

dequeue() : string

Removes the front of the queue and returns it

Returns

string —

front of queue

isEmpty()

isEmpty() : boolean

Whether or not the queue is empty

Returns

boolean