code: func (m *BottomK) Similarity(m2 *BottomK) float64 {
  
  	if m.size != m2.size {
  		panic("minhash minimums size mismatch")
  	}
  
  	mins := make(map[uint64]int, len(*m.minimums))
  
  	for _, v := range *m.minimums {
  		mins[v]++
  	}
  
  	intersect := 0
  
  	for _, v := range *m2.minimums {
  		if count, ok := mins[v]; ok && count > 0 {
  			intersect++
  			mins[v] = count - 1
  		}
  	}
  
  	maxlength := len(*m.minimums)
  	if maxlength < len(*m2.minimums) {
  		maxlength = len(*m2.minimums)
  	}
  
  	return float64(intersect) / float64(maxlength)
  }
docs: // Similarity computes an estimate for the similarity between the two sets.