Hi all, I have a question for you:
I have a matrix of the following type, where the i-th vector is a row vector:
A = [v1;v2;v3;v4;…;vN]
I want to compute all the possible differences between vectors, except the self-one. I mean: I need a first iteration that returns me [v1-v2;v1-v3;v1-v4;….;v1-vN] but I DON'T want to consider v1-v1; then at the next iteration I want [v2-v1; v2-v3; v2-v4;…;v2-vN] and i DON'T want v2-v2.
I need to do this for all the rows of my matrix A, I prefer to obtain only one difference-matrix at time because then I have to do some processing over it. So can you suggest me an algorithm that exactly does this?
Thanks
Best Answer