// Path: src/java/org/sidoh/collections/HashOfPriorityQueues.java
// public class HashOfPriorityQueues<K, V> extends DefaultingHashMap<K, Collection<V>> {
// 	private static final long serialVersionUID = -9081613625997115241L;
// 	
// 	private final Builder<V> pqBuilder;
// 	private final boolean sync;
// 	
// 	public HashOfPriorityQueues(MinMaxPriorityQueue.Builder<V> builder) {
// 		this(builder, false);
// 	}
// 
// 	public HashOfPriorityQueues(MinMaxPriorityQueue.Builder<V> pqBuilder, boolean sync) {
// 		this.pqBuilder = pqBuilder;
// 		this.sync = sync;
// 	}
// 
// 	@Override
// 	protected Collection<V> getDefaultValue() {
// 		Collection<V> val = pqBuilder.create();
// 		if (sync) {
// 			val = Collections.synchronizedCollection(val);
// 		}
// 		return val;
// 	}
// 
// 	public void addFor(K key, V value) {
// 		get(key).add(value);
// 	}
// 	
// }
// 
// Path: src/java/org/sidoh/song_recognition/signature/ConstellationMap.java
// public static class Star implements Serializable {
// 	private static final long serialVersionUID = 1851275921474044916L;
// 		
// 
// 	private final double time;
// 	private final double frequency;
// 	private final double intensity;
// 	private final int x;
// 	private final int y;
// 		
// 	public Star(final double time, final double frequency, final double intensity, final int x, final int y) {
// 		this.time = time;
// 		this.frequency = frequency;
// 		this.intensity = intensity;
// 		this.x = x;
// 		this.y = y;
// 	}
// 
// 	public double getTime() {
// 		return time;
// 	}
// 
// 	public double getFrequency() {
// 		return frequency;
// 	}
// 
// 	public double getIntensity() {
// 		return intensity;
// 	}
// 		
// 	public int getTick() {
// 		return x;
// 	}
// 		
// 	public int getBin() {
// 		return y;
// 	}
// 		
// 	@Override
// 	public int hashCode() {
// 		final int prime = 31;
// 		int result = 1;
// 		result = prime * result + x;
// 		result = prime * result + y;
// 		return result;
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (this == obj)
// 			return true;
// 		if (obj == null)
// 			return false;
// 		if (getClass() != obj.getClass())
// 			return false;
// 		Star other = (Star) obj;
// 		if (x != other.x)
// 			return false;
// 		if (y != other.y)
// 			return false;
// 		return true;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "Star [x=" + x + ", y=" + y + ", intensity=" + intensity + "]";
// 	}
// }


import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.Map;
import org.sidoh.collections.HashOfPriorityQueues;
import org.sidoh.song_recognition.signature.ConstellationMap.Star;
import org.sidoh.song_recognition.spectrogram.Spectrogram;
import com.google.common.collect.MinMaxPriorityQueue;
package org.sidoh.song_recognition.signature;




public class EvenlySpreadInFrequencyStarBuffer extends StarBuffer {
	
	protected static class Builder extends StarBuffer.Builder {

		public Builder(double starDensityFactor) {
			super(starDensityFactor);
		}
		
		public EvenlySpreadInFrequencyStarBuffer create(Spectrogram spec) {
			return new EvenlySpreadInFrequencyStarBuffer(spec, starDensityFactor);
		}
		
	}
	
// Path: src/java/org/sidoh/collections/HashOfPriorityQueues.java
// public class HashOfPriorityQueues<K, V> extends DefaultingHashMap<K, Collection<V>> {
// 	private static final long serialVersionUID = -9081613625997115241L;
// 	
// 	private final Builder<V> pqBuilder;
// 	private final boolean sync;
// 	
// 	public HashOfPriorityQueues(MinMaxPriorityQueue.Builder<V> builder) {
// 		this(builder, false);
// 	}
// 
// 	public HashOfPriorityQueues(MinMaxPriorityQueue.Builder<V> pqBuilder, boolean sync) {
// 		this.pqBuilder = pqBuilder;
// 		this.sync = sync;
// 	}
// 
// 	@Override
// 	protected Collection<V> getDefaultValue() {
// 		Collection<V> val = pqBuilder.create();
// 		if (sync) {
// 			val = Collections.synchronizedCollection(val);
// 		}
// 		return val;
// 	}
// 
// 	public void addFor(K key, V value) {
// 		get(key).add(value);
// 	}
// 	
// }
// 
// Path: src/java/org/sidoh/song_recognition/signature/ConstellationMap.java
// public static class Star implements Serializable {
// 	private static final long serialVersionUID = 1851275921474044916L;
// 		
// 
// 	private final double time;
// 	private final double frequency;
// 	private final double intensity;
// 	private final int x;
// 	private final int y;
// 		
// 	public Star(final double time, final double frequency, final double intensity, final int x, final int y) {
// 		this.time = time;
// 		this.frequency = frequency;
// 		this.intensity = intensity;
// 		this.x = x;
// 		this.y = y;
// 	}
// 
// 	public double getTime() {
// 		return time;
// 	}
// 
// 	public double getFrequency() {
// 		return frequency;
// 	}
// 
// 	public double getIntensity() {
// 		return intensity;
// 	}
// 		
// 	public int getTick() {
// 		return x;
// 	}
// 		
// 	public int getBin() {
// 		return y;
// 	}
// 		
// 	@Override
// 	public int hashCode() {
// 		final int prime = 31;
// 		int result = 1;
// 		result = prime * result + x;
// 		result = prime * result + y;
// 		return result;
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (this == obj)
// 			return true;
// 		if (obj == null)
// 			return false;
// 		if (getClass() != obj.getClass())
// 			return false;
// 		Star other = (Star) obj;
// 		if (x != other.x)
// 			return false;
// 		if (y != other.y)
// 			return false;
// 		return true;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "Star [x=" + x + ", y=" + y + ", intensity=" + intensity + "]";
// 	}
// }


// Path: src/java/org/sidoh/song_recognition/signature/EvenlySpreadInFrequencyStarBuffer.java
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.Map;
import org.sidoh.collections.HashOfPriorityQueues;
import org.sidoh.song_recognition.signature.ConstellationMap.Star;
import org.sidoh.song_recognition.spectrogram.Spectrogram;
import com.google.common.collect.MinMaxPriorityQueue;

package org.sidoh.song_recognition.signature;




public class EvenlySpreadInFrequencyStarBuffer extends StarBuffer {
	
	protected static class Builder extends StarBuffer.Builder {

		public Builder(double starDensityFactor) {
			super(starDensityFactor);
		}
		
		public EvenlySpreadInFrequencyStarBuffer create(Spectrogram spec) {
			return new EvenlySpreadInFrequencyStarBuffer(spec, starDensityFactor);
		}
		
	}
	
	protected Map<Integer, Collection<Star>> stars;