item_pairs.add(new ItemPair(light, heavy, light_weight));
item_pairs.add(new ItemPair(light, heavy, light_weight));
item_pairs.add(new ItemPair(light, heavy, light_weight));
item_pairs.add(new ItemPair(light, heavy, light_weight));
/** * Adds key/value to the appropriate queue. Keys with values less than the threshold get added to * {@code light_weights}, all others get added to {@code heavy_weights}. */ private void enqueueItem( T key, double value, double threshold, Queue<ItemPair> light_weights, Queue<ItemPair> heavy_weights) { if (value < threshold) { light_weights.offer(new ItemPair(key, null, value)); } else { heavy_weights.offer(new ItemPair(null, key, value)); } }
/** * Adds key/value to the appropriate queue. Keys with values less than * the threshold get added to {@code light_weights}, all others get added * to {@code heavy_weights}. */ private void enqueueItem(T key, double value, double threshold, Queue<ItemPair> light_weights, Queue<ItemPair> heavy_weights) { if (value < threshold) light_weights.offer(new ItemPair(key, null, value)); else heavy_weights.offer(new ItemPair(null, key, value)); }
/** * Adds key/value to the appropriate queue. Keys with values less than * the threshold get added to {@code light_weights}, all others get added * to {@code heavy_weights}. */ private void enqueueItem(T key, double value, double threshold, Queue<ItemPair> light_weights, Queue<ItemPair> heavy_weights) { if (value < threshold) light_weights.offer(new ItemPair(key, null, value)); else heavy_weights.offer(new ItemPair(null, key, value)); }
/** * Adds key/value to the appropriate queue. Keys with values less than the * threshold get added to {@code light_weights}, all others get added to * {@code heavy_weights}. */ private void enqueueItem(T key, double value, double threshold, Queue<ItemPair> light_weights, Queue<ItemPair> heavy_weights) { if (value < threshold) { light_weights.offer(new ItemPair(key, null, value)); } else { heavy_weights.offer(new ItemPair(null, key, value)); } }