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

Create Matrix/Vector from array #15

Open
Xfel opened this issue Nov 23, 2015 · 2 comments
Open

Create Matrix/Vector from array #15

Xfel opened this issue Nov 23, 2015 · 2 comments

Comments

@Xfel
Copy link

Xfel commented Nov 23, 2015

When reading binary files, it would be useful to be able to create Matrices and Vectors from primitive arrays. Currently, this is only possible for the MatrixN or VectorN classes, if I want an object of specific size, I need to copy it manually or create it from an N object which is additional overhead.

@Wolf480pl
Copy link
Contributor

Are you sure that something like. new VectorNf(array).toVector3() being slower than new Vector3f(array[0], array[1], array[2]) is a bottleneck in your program?

Also, would you mind coming to the #flow IRC channel on EsperNet to discuss this issue?

@Wolf480pl
Copy link
Contributor

Also, vecotrs and matrices are serialzable, so you could use Java's serialization if it works for you, dunno what your usecase is though.

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