code: public Set<WordEntry> distanceMax(String word) {
          float[] wordVector = getWordVector(word);
          if (wordVector == null) {
              return null;
          }
          Set<Entry<String, float[]>> entrySet = vocabulary.entrySet();
          float[] tempVector = null;
          List<WordEntry> wordEntrys = new ArrayList<WordEntry>(topNSize);
          for (Entry<String, float[]> entry : entrySet) {
              String name = entry.getKey();
              if (name.equals(word)) {
                  continue;
              }
              float minDist = 10, maxDist = -10;
              tempVector = entry.getValue();
              for (int i = 0; i < wordVector.length; i++) {
  
                  maxDist = Math.max(wordVector[i] * tempVector[i], maxDist);
                  minDist = Math.min(wordVector[i] * tempVector[i], minDist);
              }
              insertTopN(name, maxDist + minDist, wordEntrys);
          }
          return new TreeSet<WordEntry>(wordEntrys);
      }
docs: FAIL only counting min + max distance