@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof SimilarityMatrix))
			return false;

		SimilarityMatrix other = (SimilarityMatrix) obj;

		return ((this.ids == null && other.ids == null) || this.ids.equals(other.ids))
				&& ((this.similarities == null && other.similarities == null
						|| this.similarities.equals(other.similarities)))
				&& ((this.sparseSimilarities == null && other.sparseSimilarities == null
						|| this.sparseSimilarities.equals(other.sparseSimilarities)));
	}