
com.carrotsearch.hppcrt.ShortPriorityQueue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hppcrt Show documentation
Show all versions of hppcrt Show documentation
High Performance Primitive Collections Realtime
(fork of HPPC of Carrotsearch)
Fundamental data structures (maps, sets, lists, stacks, queues, heaps, sorts) generated for
combinations of object and primitive types to conserve JVM memory and speed
up execution. The Realtime fork intend of extending collections while tweaking and optimizations to remove any dynamic allocations at runtime,
and low variance execution times.
package com.carrotsearch.hppcrt;
/**
* A Priority queue of short
s.
*/
@javax.annotation.Generated(
date = "2016-01-27T20:51:53+0100",
value = "KTypePriorityQueue.java")
public interface ShortPriorityQueue extends ShortCollection
{
/**
* Add a k
element in the priority queue
* @param k
*/
void add(short k);
/**
* Retrieve, but not remove, the top element of the queue,
* i.e. the min element with respect to the comparison criteria
* (implementation defined)
* of the queue. Returns the default value if empty.
*/
short top();
/**
* Retrieve, and remove the top element of the queue,
* i.e. the min element with respect to the comparison criteria
* (implementation defined) Returns the default value if empty.
*/
short popTop();
/**
* Update priorities of all the elements of the queue, to re-establish the correct priorities
* towards the comparison criteria.
*/
void updatePriorities();
/**
* Update the priority of the {@link #top()} element, to re-establish its actual priority
* towards the comparison criteria when it may have changed such that it is no longer the
* min element with respect to the comparison criteria.
*/
void updateTopPriority();
/**
* Returns the "default value" value used
* in methods returning "default value"
*/
short getDefaultValue();
/**
* Set the "default value" value to be used
* in methods returning "default value"
*/
void setDefaultValue(final short defaultValue);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy