code: private void add(SparseDoubleVector dest, TernaryVector src) {
          for (int p : src.positiveDimensions())
              dest.add(p, 1);
          for (int n : src.negativeDimensions())
              dest.add(n, -1);
      }
docs: Adds a {@link TernaryVector} to a {@link IntegerVector}