- java.lang.Object
-
- org.logicng.solvers.datastructures.LNGBoundedLongQueue
-
public final class LNGBoundedLongQueue extends Object
A bounded long queue (for Glucose)- Since:
- 1.0
- Version:
- 1.3
-
-
Constructor Summary
Constructors Constructor Description LNGBoundedLongQueue()Constructs a new bounded long queue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavg()Returns the average value of this queue.voidfastClear()Performs a fast clear of this queue (the elements are left untouched).voidinitSize(int size)Initializes the size of this queue.voidpush(long x)Pushes a new element to the queue.StringtoString()booleanvalid()Returnstrueif this queue is valid (the queue is filled completely) orfalseif it is not.
-
-
-
Method Detail
-
initSize
public void initSize(int size)
Initializes the size of this queue.- Parameters:
size- the size
-
push
public void push(long x)
Pushes a new element to the queue.- Parameters:
x- the new element
-
avg
public int avg()
Returns the average value of this queue.- Returns:
- the average value of this queue
-
valid
public boolean valid()
Returnstrueif this queue is valid (the queue is filled completely) orfalseif it is not.- Returns:
trueif this queue is valid
-
fastClear
public void fastClear()
Performs a fast clear of this queue (the elements are left untouched).
-
-