Skip to content
Permalink
Browse files
GIRAPH-1215
closes #97
  • Loading branch information
Maja Kabiljo committed Dec 6, 2018
1 parent f5dacbb commit bb8dab546215a602108d29d8026111cf099b7609
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 11 deletions.
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(int key, byte value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(int key, double value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(int key, float value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(int key, int value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(int key, long value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(long key, byte value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(long key, double value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(long key, float value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(long key, int value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(long key, long value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;
@@ -81,7 +81,8 @@ public void clear() {
* @param value Value
*/
public void add(${type1.lower} key, ${type2.lower} value) {
if (size == capacity && compare(keys[0], values[0], key, value) >= 0) {
if (capacity == 0 ||
(size == capacity && compare(keys[0], values[0], key, value) >= 0)) {
// If the heap is full and smallest element in it is not smaller
// than value, do nothing
return;

0 comments on commit bb8dab5

Please sign in to comment.