Skip to content

Conversation

@rimadoma
Copy link
Contributor

Add an op which calculates the centroid of a collection of vectors (? extends org.scijava.vecmath.Tuple3d)

@ctrueden
Copy link
Member

ctrueden commented Jul 20, 2016

Thanks @rimadoma!

Before we merge this, I think we really need to decide how we are going to handle vectors, matrices, etc., as core data structures. I am rather against adding a vecmath dependency to ImageJ Ops core—though it is actually pretty lightweight, it is also GPL code, which is incompatible with the Ops permissive BSD license.

See also fiji/fiji#135

Anyway, this op might belong in its own imagej-ops-vecmath project or some such. What do others think?

@ctrueden
Copy link
Member

ctrueden commented Dec 5, 2017

Let's finally decide on matrix libraries at this 2017-12 hackathon! Then this PR can finally be resolved.

@rimadoma
Copy link
Contributor Author

rimadoma commented Dec 6, 2017

Yes, this thing could go with my other linear algebra ops.

There is already a dependency on apache.commons.math in imagej-ops, but I think there's call for mutability. If immutability is really needed, we could have wrappers on top of the mutable objects e.g. ImmutableVector3d

rimadoma added 2 commits June 19, 2018 17:59
This commit also rebased branch
Richard Domander added 3 commits June 20, 2018 16:02
Switch from org.scijava.vecmath to org.joml.joml.
@rimadoma
Copy link
Contributor Author

I resurrected this PR by updating it to use JOML, which is now the consensus linear algebra library (?). Suggestions about for the namespace of this op are welcome. Could start math/lin-alg/? I have at least one other op that would fit there. In any case, I expect eventually this'll better fit into scijava-ops.

@rimadoma
Copy link
Contributor Author

If I wanted to create the same op method for a collection of Vector3d and Vector3f what would be the best way? Just centroid(Iterable<Vector3d>) will have the same erasure for any type. Also the Vector classes have no other common supertype than Externalizable.

@rimadoma rimadoma mentioned this pull request Jun 26, 2018
@ctrueden ctrueden added the to do label Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants