code: private <E extends WeightedEdge> SparseDoubleVector getVertexWeightVector(
              WeightedGraph<E> g, int vertex) {
          if (keepWeightVectors) {
              SparseDoubleVector weightVec = vertexToWeightVector.get(vertex);
              if (weightVec == null) {
                  synchronized(this) {
                      weightVec = vertexToWeightVector.get(vertex);
                      if (weightVec == null) {
                          weightVec = computeWeightVector(g, vertex);
                          vertexToWeightVector.put(vertex, weightVec);
                      }
                  }
              }
              return weightVec;
          }
          else
              return computeWeightVector(g, vertex);
      }
docs: Returns the normalized weight vector for the specified row, to be used in
  edge comparisons.  The weight vector is normalized by the number of edges
  from the row with positive weights and includes a weight for the row to
  itself, which reflects the similarity of the keystone nod.