Re: Re: [geometry] PointMap and PointSet

2022-03-26 Thread Matt Juntunen
Hello, This kind of API sounds useful but not directly related to the PointMap/Set types. As you mentioned, it seems like the API would most likely use PointMap/Set internally. I believe the next step should be to create a JIRA issue and figure out the details there. Since it sounds like there ar

Re: Re: [geometry] PointMap and PointSet

2022-03-23 Thread Gilles Sadowski
Hi. Le mer. 23 mars 2022 à 03:27, Matt Juntunen a écrit : > > Gilles, > > > Say, for example, that "V" holds a single (floating-point) value. We > > insert entries > > map.put(x, 2); > > map.put(y, 8); > > assuming that "x" and "y" and just barely different, according to the > > chosen "precis

Re: Re: [geometry] PointMap and PointSet

2022-03-22 Thread Matt Juntunen
Gilles, > Say, for example, that "V" holds a single (floating-point) value. We > insert entries > map.put(x, 2); > map.put(y, 8); > assuming that "x" and "y" and just barely different, according to the > chosen "precision context". Then: > z = (x + y) / 2; // Pseudo-code. > m = map.get(z); >

Re: Re: [geometry] PointMap and PointSet

2022-03-22 Thread Gilles Sadowski
Le mar. 22 mars 2022 à 14:46, Matt Juntunen a écrit : > > Hello, > > Unless there are any other comments on the PR, I'm going to plan on > merging it into master within the next couple of days. > Thanks for providing this new functionality. Do you envision that [Geometry] will also provide ways

Re: Re: [geometry] PointMap and PointSet

2022-03-22 Thread Matt Juntunen
Hello, Unless there are any other comments on the PR, I'm going to plan on merging it into master within the next couple of days. Regards, Matt On Sun, Mar 20, 2022 at 11:39 AM Matt Juntunen wrote: > > Hi Eric, > > > Would Java’s Map.entrySet provide the “getEntry” type method needed? > > https

Re: Re: [geometry] PointMap and PointSet

2022-03-20 Thread Matt Juntunen
Hi Eric, > Would Java’s Map.entrySet provide the “getEntry” type method needed? > https://docs.oracle.com/javase/8/docs/api/java/util/Map.html#entrySet-- > Or would this provide all entry’s and still need to find the specific entry > so maybe a forEach variation to filter for a specific entry? >

Re: Re: [geometry] PointMap and PointSet

2022-03-20 Thread Eric Bresie
> > On March 14, 2022 at 10:19:14 AM CDT, Matt Juntunen > mailto:matt.a.juntu...@gmail.com)> wrote: > > > I'm a little bit confused: Isn't it always the case that > getEntry(p).getKey() > will return the originally inserted (i.e. "canonical") point (i.e. not "p")? > > Map does not contain a "get

Re: [geometry] PointMap and PointSet

2022-03-18 Thread Matt Juntunen
Hello, I've updated the PR [1] with the following changes: - made the Map.Entry instance returned by PointMap.getEntry() support the setValue() method for all spaces and dimensions - created an abstract base class to share code between the 1D PointMap implementations - fixed a bug in the 1D spheri

Re: [geometry] PointMap and PointSet

2022-03-16 Thread Gilles Sadowski
Hi. Le mer. 16 mars 2022 à 15:42, Matt Juntunen a écrit : > > Hello, > > > I suggest to carefully consider whether to return a "SimpleEntry" > (and prominently note that any sort of concurrent modification is > a caller responsibility). > > I see what you mean and I think that would be a good ide

Re: [geometry] PointMap and PointSet

2022-03-16 Thread Alex Herbert
On Wed, 16 Mar 2022 at 14:42, Matt Juntunen wrote: > Hello, > > > I suggest to carefully consider whether to return a "SimpleEntry" > (and prominently note that any sort of concurrent modification is > a caller responsibility). > > I see what you mean and I think that would be a good idea. Howeve

Re: [geometry] PointMap and PointSet

2022-03-16 Thread Matt Juntunen
Hello, > I suggest to carefully consider whether to return a "SimpleEntry" (and prominently note that any sort of concurrent modification is a caller responsibility). I see what you mean and I think that would be a good idea. However, the sticking point is that the 1D implementations for both Euc

Re: [geometry] PointMap and PointSet

2022-03-16 Thread Gilles Sadowski
Hi. Le mer. 16 mars 2022 à 03:17, Matt Juntunen a écrit : > > Hello, > > I've made the following changes to the PR: > - removed the "resolveKey" method from PointMap > - renamed PointMap.resolveEntry to PointMap.getEntry and > PointSet.resolve to PointSet.get > - added an entry on PointMap/PointS

Re: [geometry] PointMap and PointSet

2022-03-15 Thread Matt Juntunen
Hello, I've made the following changes to the PR: - removed the "resolveKey" method from PointMap - renamed PointMap.resolveEntry to PointMap.getEntry and PointSet.resolve to PointSet.get - added an entry on PointMap/PointSet to the user guide - addressed Github comments (thanks, Bruno!) I ran so

Re: [geometry] PointMap and PointSet

2022-03-15 Thread Gilles Sadowski
Hi. Le mar. 15 mars 2022 à 00:47, Matt Juntunen a écrit : > > Hello, > > > Do I understand correctly that the "resolveEntry" method which > you added behaves as my above "getEntry"? > > Correct. > > > If so, the latter can > replace both "resolve" methods, for a (c)leaner API. > > That would work

Re: [geometry] PointMap and PointSet

2022-03-14 Thread Matt Juntunen
Hello, > Do I understand correctly that the "resolveEntry" method which you added behaves as my above "getEntry"? Correct. > If so, the latter can replace both "resolve" methods, for a (c)leaner API. That would work. I would need to add a matching "get" method to PointSet to provide the same fu

Re: [geometry] PointMap and PointSet

2022-03-14 Thread Gilles Sadowski
Hello. Le lun. 14 mars 2022 à 16:19, Matt Juntunen a écrit : > > Gilles, > > > it would be great to keep the tutorials/userguide in sync. > > Sounds good. I'll update the user guide in this PR. > > > I'm a little bit confused: Isn't it always the case that > getEntry(p).getKey() > will return t

Re: [geometry] PointMap and PointSet

2022-03-14 Thread Matt Juntunen
Gilles, > it would be great to keep the tutorials/userguide in sync. Sounds good. I'll update the user guide in this PR. > I'm a little bit confused: Isn't it always the case that getEntry(p).getKey() will return the originally inserted (i.e. "canonical") point (i.e. not "p")? Map does not co

Re: [geometry] PointMap and PointSet

2022-03-13 Thread Gilles Sadowski
Hello Matt. Le dim. 13 mars 2022 à 15:41, Matt Juntunen a écrit : > > Hello, > > > Is there a gentle introduction to how it works and/or the intended > use cases? > > Not specifically. The implementations are used the same way as JDK > Maps and Sets so usage should be very familiar. As far as the

Re: [geometry] PointMap and PointSet

2022-03-13 Thread Matt Juntunen
Hello, > Is there a gentle introduction to how it works and/or the intended use cases? Not specifically. The implementations are used the same way as JDK Maps and Sets so usage should be very familiar. As far as the internal implementation details, I've tried to describe that in the javadocs for

Re: [geometry] PointMap and PointSet

2022-03-12 Thread Gilles Sadowski
Hello. Le ven. 11 mars 2022 à 16:18, Matt Juntunen a écrit : > > Hello, > > I recently posted a PR [1] for GEOMETRY-142 [2], which is for adding > PointMap and PointSet implementations. These are Map and Set > implementations specifically designed to use Points as keys. Is there a gentle introdu

[geometry] PointMap and PointSet

2022-03-11 Thread Matt Juntunen
Hello, I recently posted a PR [1] for GEOMETRY-142 [2], which is for adding PointMap and PointSet implementations. These are Map and Set implementations specifically designed to use Points as keys. They support fuzzy key comparison, meaning that points do not have to be exactly equal to each other