0

What's the difference between OVector and SVector in nalgebra?

Why is there no SPoint?

user357269
  • 1,835
  • 14
  • 40
  • 1
    As i (not much of a rust user) read it: OVector can have runtime-dynamic dimensions. SVector can only have compile-time static dimensions. So if you have a need for 3x3 matrix in all usages of your program, no matter what input, SVector can be more efficient (more information for compiler; stack-alloc possible). A point sounds like a fixed (1,1) dimension. Therefore i would expect every point to be of compile-time known dimensionality. A similar concept is available in [Eigen](https://eigen.tuxfamily.org/dox/group__QuickRefPage.html) (C++). – sascha Dec 28 '21 at 17:38
  • @sascha: Thanks! Point is just a wrapper around OVector: https://docs.rs/nalgebra/0.29.0/nalgebra/geometry/struct.OPoint.html – user357269 Dec 28 '21 at 17:40

0 Answers0