3 ms·
> And how would you compute the cross product of <"foo", "bar", "baz"> and <"apple", "orange", "banana"> exactly? How would you compute the cross product of <N
by chrisseaton 6y ago
> And how would you compute the cross product of <"foo", "bar", "baz"> and <"apple", "orange", "banana"> exactly?
How would you compute the cross product of <NaN, NaN, NaN> and <NaN, NaN, NaN>?
Some vectors don't have a useful result for cross product, even if they contain 'numbers' and even if you can get some kind of result out.
Same with dot product of a string. Doesn't make much sense... so probably don't do it.
- skohan 6y ago> even if they contain 'numbers' Vectors don't 'contain' numbers, a vector is a multidimensional value. The fact that a C++ vector is conceptually a container for values more than anything else is a reason why 'vector' is a poor name for this component.
- chrisseaton 6y agoYes they contain a number for each dimension. Not sure what you think the point of debating individual words like this? What practical problems do you think there are?
- skohan 6y agoYou're the one arguing from the extremely strained logic that because ordering rules exist for strings, this somehow means that C++ vectors have anything to do with mathematical vectors in the mind of the average programmer. The practical problem is, when you do a lot of work with linear algebra, you would really like to have the term vector to use for its canonical mathematical meaning rather than having it reserved for a data structure which is not suitable for that purpose.