code: public double getDotProduct(Tensor other) {
          checkEqualSize(this, other);
          double dot = s.zero();
          for (int c = 0; c < this.values.length; c++) {
              dot = s.plus(dot, s.times(this.values[c], other.values[c]));
          }
          return dot;
      }
docs: Computes the sum of the entries of the pointwise product of two tensors with identical domains.