From issues-return-70419-archive-asf-public=cust-asf.ponee.io@commons.apache.org Fri Oct 26 03:33:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8183C180670 for ; Fri, 26 Oct 2018 03:33:04 +0200 (CEST) Received: (qmail 46025 invoked by uid 500); 26 Oct 2018 01:33:03 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 46014 invoked by uid 99); 26 Oct 2018 01:33:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2018 01:33:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 18DE41A361D for ; Fri, 26 Oct 2018 01:33:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.3 X-Spam-Level: X-Spam-Status: No, score=-110.3 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 3trLcREzxuCq for ; Fri, 26 Oct 2018 01:33:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3E58D5F58C for ; Fri, 26 Oct 2018 01:33:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 72B07E12FE for ; Fri, 26 Oct 2018 01:33:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1D3A32669A for ; Fri, 26 Oct 2018 01:33:00 +0000 (UTC) Date: Fri, 26 Oct 2018 01:33:00 +0000 (UTC) From: "Matt Juntunen (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEOMETRY-23) Remove Euclidean Point Classes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GEOMETRY-23?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D166= 64505#comment-16664505 ]=20 Matt Juntunen commented on GEOMETRY-23: --------------------------------------- I did some more digging on this from a mathematical standpoint and this is = what I found: while there are indeed multiple representations possible for = vectors (eg, Cartesian, polar, barycentric, etc), they are not equally usef= ul from a computational perspective. The best source I found for this is fr= om=C2=A0[this |https://www.amazon.com/Linear-Algebra-Matrix-Theory-Mathemat= ics/dp/0486623181] book, where it says (p31) {quote}Using analytic geometry, it is possible to reduce the study of plana= r vectors to a study of pairs (a1, a2)T of real numbers... and such vectors= can be uniquely identified with the rectangular coordinates of their respe= ctive endpoints. {quote} So, Cartesian coordinates function as something of a lowest common denomina= tor for analytic geometry. This is witnessed by your dot product example ab= ove where the spherical coordinates had to be converted to Cartesian and ba= ck again. It therefore makes sense to me to have our primary vector/point c= lass use this system and provide an API for easy conversion between other c= oordinate systems. This is what we have now.=20 I believe that our most basic data structure should have the most obvious a= nd shortest name possible. When I first started working with commons-math v= 4, I was very confused by the {{Cartesian?D}} classes. I had to read the do= cumentation to find out what it was, how it related to other geometric obje= cts, and to answer basic questions like whether or not I could get a dot pr= oduct with it. With the name {{Vector?D}}, these questions are automaticall= y answered. No user should be surprised or confused by the API, especially = if they've used other geometry libraries or even the {{java.awt.geom.Point2= D}} classes. I don't mean to belabor this issue. I just feel strongly about the naming h= ere, especially since these classes are the bedrock of the Euclidean module= . If we can't come to an agreement, perhaps we should post the issue to the= dev ML for some outside feedback?=20 =C2=A0 > Remove Euclidean Point Classes > ------------------------------ > > Key: GEOMETRY-23 > URL: https://issues.apache.org/jira/browse/GEOMETRY-23 > Project: Apache Commons Geometry > Issue Type: Improvement > Reporter: Matt Juntunen > Priority: Major > Labels: pull-request-available > > Based on discussion of the current Point/Vector API in GEOMETRY-14 and re= search into other geometric libraries, I think we should remove the Euclide= an Point?D classes and make Vector?D also implement Point. This will end up= being similar to the previous commons-math design but avoids the issue rai= sed in MATH-1284 since the Point and Vector interfaces are not related. The= y just happen to be implemented by the same class, which we're calling Vect= or?D since a vector can be used to indicate a point (by adding it to the or= igin). > In the course of trying this out this design, I ended up removing 7 class= es and simplifying several methods. I think that's a good indicator that th= is is a good design choice. > =C2=A0 > Pull request: https://github.com/apache/commons-geometry/pull/15 -- This message was sent by Atlassian JIRA (v7.6.3#76005)