From issues-return-70367-archive-asf-public=cust-asf.ponee.io@commons.apache.org Tue Oct 23 13:03:04 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 8CB7918066B for ; Tue, 23 Oct 2018 13:03:03 +0200 (CEST) Received: (qmail 92610 invoked by uid 500); 23 Oct 2018 11:03:02 -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 92599 invoked by uid 99); 23 Oct 2018 11:03:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2018 11:03:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id F1E5EC041A for ; Tue, 23 Oct 2018 11:03:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id DZ2-0MdcfHbu for ; Tue, 23 Oct 2018 11:03:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 00E625F230 for ; Tue, 23 Oct 2018 11:03: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 85336E0360 for ; Tue, 23 Oct 2018 11:03: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 48D42252B5 for ; Tue, 23 Oct 2018 11:03:00 +0000 (UTC) Date: Tue, 23 Oct 2018 11:03:00 +0000 (UTC) From: "Gilles (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= 60440#comment-16660440 ]=20 Gilles commented on GEOMETRY-23: -------------------------------- If I take this statement {quote}I picture the representation of an n-dimensional vector as an n-tupl= e as a matter of definition and not implementation. {quote} as meaning that "Commons Geometry" represents the "vector" concept by a dat= a structure that stores Cartesian coordinates, then the alternative to havi= ng {{ofCartesian}} is to rename {{Vector3D}} to {{CartesianVector3D}}. I.e. the equivalent of {code:java} Vector3D v =3D Vector3D.ofCartesian(1, 2, 3); {code} is {code:java} CartesianVector3D v =3D CartesianVector3D.of(1, 2, 3); {code} This has the big advantage to completely remove the ambiguity on what is be= ing represented (one-to-one mapping between math and code), {{of}} becomes = self-documenting and {{CartesianVector3D}} can be a ["ValJO"|https://blog.j= oda.org/2014/03/valjos-value-java-objects.html]. > 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)