Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support n-dimensional vectors #146

Closed
almstrand opened this issue Jun 12, 2015 · 1 comment
Closed

Support n-dimensional vectors #146

almstrand opened this issue Jun 12, 2015 · 1 comment

Comments

@almstrand
Copy link

Can a new Vector class be added that represents a vector of arbitrary length?

It seems the current implementation of classes Vector2, Vector3, and Vector4 can be generalized to form a new class VectorN, which would also implement Vector.

Clearly, 2, 3, and 4 dimensional vectors are sufficient for many applications. However there are applications where this restriction becomes prohibitive. The options for overcoming this restriction include creating another pub package, or a custom implementation in the application itself; neither of which promotes re-use, nor settling on a common package for solving a very common problem.

As an example, pub package math_expressions has the set goal of "[...]supporting real, vector and interval evaluations of mathematical expressions." As the package depends on vector_math it is currently limited to evaluating expressions involving up to 4-dimensional vectors. An issue has been filed to look into options for eliminating this limitation. One of the options is for math_expressions to add a class that implements Vector and represents vectors of arbitrary length, but it seems such a class would better belong invector_math to promote standardizing on a singe package for representing vectors of all types.

@johnmccutchan
Copy link
Collaborator

Adding general size matrix / vector types to vector_math could happen but probably won't happen anytime soon because it is a lot of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants