code: private static void add(DoubleVector semantics,
                              TernaryVector index,
                              double percentage) {
          for (int p : index.positiveDimensions())
              semantics.add(p, percentage);
          for (int n : index.negativeDimensions())
              semantics.add(n, -percentage);
      }
docs: Adds the index vector to the semantic vector using the percentage to
  specify how much of each dimesion is added.
  
  @param semantics the semantic vector whose values will be modified by the
  index vector
  @param index the index vector that will be added to the semantic vector
  @param the percentage of the index vector's values that will be added to
  the semantic vector