You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
What nat-dependent Vector & Matrix operations should be implemented? #201
I prefer to think of vectors as either (n,1) matrices or (1,n) matrices (covectors); this simplifies things as the vector operations are then special cases of the matrix ones. I think MATLAB adopts this philosophy but I’m not certain.
@nasosev After some experiments, I decided not to merge matrix and vector into one type: the conversion between 1D array and 2D array is expensive and the implementation of pretty printer and other type classes becomes much complicated (e.g. vectors are foldable but matrices are not).
Activity
gusty commentedon Sep 25, 2019
It might be possible to make them applicatives but we'll need a way to express an infinite vector for the
pureoperation.n1lr4d1c4l commentedon Sep 26, 2019
@cannorin, in addition to what you mentioned, I think these operations could be valuable:
I prefer to think of vectors as either (n,1) matrices or (1,n) matrices (covectors); this simplifies things as the vector operations are then special cases of the matrix ones. I think MATLAB adopts this philosophy but I’m not certain.
cannorin commentedon Oct 14, 2019
@nasosev After some experiments, I decided not to merge matrix and vector into one type: the conversion between 1D array and 2D array is expensive and the implementation of pretty printer and other type classes becomes much complicated (e.g. vectors are foldable but matrices are not).