4 ms·
Yes, you can have a vector of, say, naturals. I'm pretty sure you can even create a vector field out of vectors of non-reals.
by fluoridation 4y ago
Yes, you can have a vector of, say, naturals. I'm pretty sure you can even create a vector field out of vectors of non-reals.
- Koshkin 4y agoA "vector field" and a "field" are two completely different notions. (And yes, you can build a field from integers.) https://en.wikipedia.org/wiki/Finite_field https://en.wikipedia.org/wiki/Finite_field
- fluoridation 4y agoMy bad. I meant to say "vector space", not "vector field". I understand the difference, but I often make this mistake because the set of a vector space is almost always the set of an algebraic field (i.e. the reals).
- xigoi 4y agoReally? What is the additive inverse of (1, 2, 3) ∈ ℕ³ ?
- fluoridation 4y agoIt depends on how you define addition.
- xigoi 4y agoI guess you could make it a vector space through a bijection with the rational numbers, but something tells me C++ programmers don't have that in mind when writing std::vector<unsigned>. And it doesn't solve the problem that C++ “vectors” are resizable.
- fluoridation 4y agoSee my comment above on the subject.
- Koshkin 4y ago(-1, -2, -3), is it not?