#include <InfBucketQueue.hpp>
|
void | Grow (size_t new_size) |
| Grows bucket queue size to new_size. More...
|
|
void | Remove (size_t idt, llint wgt) |
| Removes element of identity idt and weight wgt of the bucket queue. More...
|
|
Definition at line 31 of file InfBucketQueue.hpp.
Bial::InfBucketQueue::InfBucketQueue |
( |
size_t |
size, |
|
|
llint |
inf_val, |
|
|
llint |
bucket_size = 1.0 , |
|
|
bool |
increasing_order = true , |
|
|
bool |
fifo_tie = true |
|
) |
| |
Basic Constructor.
- Date
- 2015/Jun/24
- Parameters
-
size | Total number of elements to be inserted in the queue. |
inf_val | Value used for infinite. |
bucket_size | The size of the bucket. Elements whose weight difference is lower than the bucket_size may fall into the same bucket. |
increasing_order | increasing or decreasing order of bucket queue output. |
fifo_tie | fifo or lifo tiebreak. |
- Returns
- none.
- Warning
- none.
size_t Bial::InfBucketQueue::Buckets |
( |
| ) |
const |
Returns the current number of buckets.
- Date
- 2015/Jun/24
- Parameters
-
- Returns
- The current number of buckets.
- Warning
- none.
size_t Bial::InfBucketQueue::Elements |
( |
| ) |
|
Returns the number of elements in queue.
- Date
- 2015/Jun/24
- Parameters
-
- Returns
- Number of elements in queue.
- Warning
- none.
bool Bial::InfBucketQueue::Empty |
( |
| ) |
|
Returns true if bucket queue is empty.
- Date
- 2015/Jun/24
- Parameters
-
- Returns
- Whether bucket queue is empty or not.
- Warning
- none.
void Bial::InfBucketQueue::Finished |
( |
size_t |
idt | ) |
|
Sets finished state to element of index idt.
- Date
- 2015/Jun/24
- Parameters
-
idt | Identity of the element. |
- Returns
- none.
- Warning
- none.
void Bial::InfBucketQueue::Grow |
( |
size_t |
new_size | ) |
|
|
protected |
Grows bucket queue size to new_size.
- Date
- 2015/Jun/24
- Parameters
-
new_size | new weight bucket queue size. |
- Returns
- none.
- Warning
- none.
bool Bial::InfBucketQueue::Increasing |
( |
| ) |
const |
Returns increasing attribute value.
- Date
- 2015/Jun/24
- Parameters
-
- Returns
- Increasing attribute value.
- Warning
- none.
size_t Bial::InfBucketQueue::Index |
( |
llint |
value | ) |
|
Computes and returns the index where the input weight falls.
- Date
- 2015/Jun/24
- Parameters
-
- Returns
- The index where the input weight falls.
- Warning
- none.
size_t Bial::InfBucketQueue::InfiniteElements |
( |
| ) |
|
Returns the number of inifinite elements in queue.
- Date
- 2015/Jun/24
- Parameters
-
- Returns
- Number of inifinite elements in queue.
- Warning
- none.
void Bial::InfBucketQueue::Insert |
( |
size_t |
idt, |
|
|
llint |
wgt |
|
) |
| |
Inserts element of identity idt and weight wgt into the bucket queue.
- Date
- 2015/Jun/24
- Parameters
-
idt | identity of the element. |
wgt | weight of the element. |
- Returns
- none.
- Warning
- none.
int Bial::InfBucketQueue::Remove |
( |
| ) |
|
Removes the next element in the bucket queue.
- Date
- 2015/Jun/24
- Parameters
-
- Returns
- The next element in the bucket queue.
- Warning
- none.
void Bial::InfBucketQueue::Remove |
( |
size_t |
idt, |
|
|
llint |
wgt |
|
) |
| |
|
protected |
Removes element of identity idt and weight wgt of the bucket queue.
- Date
- 2015/Jun/24
- Parameters
-
idt | identity of the element. |
wgt | weight of the element. |
- Returns
- none.
- Warning
- none.
void Bial::InfBucketQueue::ResetState |
( |
| ) |
|
Sets all element states to NOT_VISITED.
- Date
- 2016/Jan/27
- Parameters
-
- Returns
- none.
- Warning
- none.
BucketState Bial::InfBucketQueue::State |
( |
size_t |
idt | ) |
const |
Returns element state in queue.
- Date
- 2015/Jun/24
- Parameters
-
idt | identity of the element. |
- Returns
- Element state in queue.
- Warning
- none.
void Bial::InfBucketQueue::State |
( |
size_t |
idt, |
|
|
BucketState |
new_state |
|
) |
| |
Sets new state to element of index idt.
- Date
- 2015/Jun/24
- Parameters
-
idt | Identity of the element. |
new_state | New state. |
- Returns
- none.
- Warning
- none.
void Bial::InfBucketQueue::Update |
( |
size_t |
idt, |
|
|
llint |
cur_wgt, |
|
|
llint |
new_wgt |
|
) |
| |
Updates current weight of element of identity idt.
- Date
- 2015/Jun/24
- Parameters
-
idt | identity of the element. |
cur_wgt | current weight of the element. |
new_wgt | the new weight assigned to the element. |
- Returns
- none.
- Warning
- none.
llint Bial::InfBucketQueue::delta |
|
protected |
size_t Bial::InfBucketQueue::elements |
|
protected |
bool Bial::InfBucketQueue::fifo |
|
protected |
Whether this queue removes elements increasingly or decreasingly.
Definition at line 42 of file InfBucketQueue.hpp.
bool Bial::InfBucketQueue::increasing |
|
protected |
size_t Bial::InfBucketQueue::inf_elements |
|
protected |
Whether this queue implements FIFO or LIFO tie-break policy.
Definition at line 43 of file InfBucketQueue.hpp.
llint Bial::InfBucketQueue::infinite_val |
|
protected |
llint Bial::InfBucketQueue::maximum |
|
protected |
llint Bial::InfBucketQueue::minimum |
|
protected |
vector containing pointers to elements that fall into each bucket weight.
Definition at line 37 of file InfBucketQueue.hpp.
vector containing information about each element ( state, previous, next ).
Definition at line 36 of file InfBucketQueue.hpp.
The documentation for this class was generated from the following file: