Hello,

just stumbled on this in vector while looking for outer product operation --

  @Override
  public Matrix cross(Vector other) {
    Matrix result = matrixLike(size, other.size());
    for (int row = 0; row < size; row++) {
      result.assignRow(row, other.times(getQuick(row)));
    }
    return result;
  }


It seems this guy computes an outer product, but not cross product (
crossprod for vectors =ab sin(theta)n). Seems like a misleading
naming.

It is probably motivated by R, where tcrossproduct (which is a product
of matrices, not vectors) is defined as XY' and crossprod which is
defined X'Y and so in case of cbind(vector) it would constitute either
dot product or outer product respectively. But i am not sure where R
is deriving this; and even then it is definitely misleading as R would
apply this to the world of matrices, not vectors. In vectors cross
product means something else and i think this may create a confusion
(it certainly did in my case)..

thanks.
-Dmitriy

Reply via email to