All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.carrotsearch.hppcrt.heaps.BytePriorityQueue Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 0.7.5
Show newest version
package com.carrotsearch.hppcrt.heaps;

import com.carrotsearch.hppcrt.ByteCollection;

/**
 * A Priority queue of bytes.
 */
  
 @javax.annotation.Generated(date = "2015-02-27T19:21:03+0100", value = "HPPC-RT generated from: BytePriorityQueue.java") 
public interface BytePriorityQueue extends ByteCollection
{
    /**
     * Add a k element in the priority queue
     * @param k
     */
    void add(byte 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.
     */
    byte 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.
     */
    byte 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();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy