Quote:
Originally Posted by BAMF
Why dont you just extend the vector class to add magnitude, dot, and cross methods?
I do agree with you 100% on the vector being a poor choice. I recently coded a matrix class with gaussian reduction, but I didnt run into this. I wish the math class in every language went beyond highschool level mathematics.
|
Quote:
Originally Posted by n0nsensical
It makes sense to me; it's a collection of values, and I doubt the term's use in computer science started with STL. Not exactly the same as a mathematical vector since the same operations aren't defined, but you could easily define them to make it more like one (which can also have any number of values n-dimensional). Don't blame the creators of STL for your own confusion (seems to be a common thing with C++ in general, and like L.A., I find it my duty to defend it); I'm sure there are plenty of mathematicians getting along fine with it. =P
|
Please allow me to be a mathematical snob for a moment and point out that neither of you (nor JinnKai) understand what a
mathematical vector is, which is why I included a link with my original post (and here too, so you don't miss it). You all think like physicists...
A vector is merely an element of a set that follows the vector axioms. So, for instance, the most popular vector space, aside from the Cartesian vectors everyone has already mentioned, is the set of continuous functions. Interestingly enough, the set of sinusoidal waves of integral frequencies forms a basis for this set! This is the basis of
fourier analysis and is very important for signal processing, for which there is plenty of software written!
Can continuous functions be represented as n-tuples of values? Not really... Let's face it, std::vector has nothing to do with vectors!
Why not call it exactly what it is: an
array. What would have been wrong with std::array?