Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E4E4D2009E8 for ; Mon, 30 May 2016 23:06:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E3B6C160A19; Mon, 30 May 2016 21:06:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 34811160969 for ; Mon, 30 May 2016 23:06:00 +0200 (CEST) Received: (qmail 68270 invoked by uid 500); 30 May 2016 21:05:59 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 68258 invoked by uid 99); 30 May 2016 21:05:58 -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; Mon, 30 May 2016 21:05:58 +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 3795C1A048B for ; Mon, 30 May 2016 21:05:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.979 X-Spam-Level: * X-Spam-Status: No, score=1.979 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=bargr-net.20150623.gappssmtp.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Lbrm48gj8FF5 for ; Mon, 30 May 2016 21:05:57 +0000 (UTC) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com [209.85.214.47]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id BA4B05F241 for ; Mon, 30 May 2016 21:05:56 +0000 (UTC) Received: by mail-it0-f47.google.com with SMTP id z123so39128878itg.0 for ; Mon, 30 May 2016 14:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bargr-net.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to; bh=UCV8Z3aQefIrZH2xEyT8E2B41jTUyveltXWYIaTcOwU=; b=vbi+2+QK0TPqNefAQloyLX2G/TKegMbx2eUuR/p15KSKYIvw+Q5HWTLIB3PBLMZz9d tcEoxGs0FExGepuQ69gNsn/h8PjxJCrZJ7Ix3dH/sFqGlVvbdtkhu0BYQqX7+111VprJ A0B2EcpAz5s4A36W/c7CTRfxtaGSr4pXELkgduld4sSxPxO0GKvPllion00nVk521TLf Z2hi2KwaQfJzla+FnL4nnw4kSPGM782+CvVNLTgR8OIiBqCmC1j6ch+uraUNjrigiPWM MprYOeNsni36T27DdvqpnjP7uv/5ENozHgv6Dy9QHFknuD+PKyewzRZuJDZB5gV3XlYZ IEfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=UCV8Z3aQefIrZH2xEyT8E2B41jTUyveltXWYIaTcOwU=; b=nDEPoi8RydjtPIOCkH5E+Qav8QgVJuqshZox3btrBQcw1sW8I4RnrACN3UHDI58NjZ NN9R42qdNdOmY6mfJQcjChPmx4OuuCxki7L9EaqSXNcylfbH61vUaH3+bev1kkAZtNv0 9KrGnz34YBbOO7qPogpweeaxAbd59MNDYS+1NIUYh73NTXAQio1Vd/hzcoJsKloZI4rp mOQ8Dznr+kPMSArKmmS33Aan8m5DQW/VSaqwLA4Nz+tTzwha0wimSL6NkHiQ3B5RsQOg y0atmlXOn0OMiot4mSnwE8r6SfU8dmdwhSX4GpGExivzOSPFwIPPQnxXARfE59uaUq5H 8pJw== X-Gm-Message-State: ALyK8tLR8nUhWq7kd7DDmf8r/gov3kwmgJvD9cIUujxoOmOFJwtsdJmXbLEdgCoMsEvcWvPAOiNwC3id1NNiPg== MIME-Version: 1.0 X-Received: by 10.36.20.196 with SMTP id 187mr9360849itg.83.1464642355975; Mon, 30 May 2016 14:05:55 -0700 (PDT) Received: by 10.36.50.87 with HTTP; Mon, 30 May 2016 14:05:55 -0700 (PDT) Date: Tue, 31 May 2016 00:05:55 +0300 Message-ID: Subject: [Math] Adding min/max and argmin/argmax values for an arrays of double/int (Comparable). From: Artem Barger To: Commons Developers List Content-Type: multipart/alternative; boundary=001a1143e3c059f3cc0534159f89 archived-at: Mon, 30 May 2016 21:06:01 -0000 --001a1143e3c059f3cc0534159f89 Content-Type: text/plain; charset=UTF-8 Hi. Lately working w/ Apache Commons Math, library I've found myself implementing functions which given an array of either doubles of integers return the min or max value among all elements of an array. Moreover I've added an argmin/argmin functions as well, which for given array of double/int values return an index of min/max element within that array. Since I didn't find such functions available in the project, I'm willing to contribute these function into the framework and was curious whenever it's usable? Also what should be the right place to put these functions? I've added them as static method for MathArrays class, however not 100% sure this is the right place. Think further about these functions, I can easily make them work w/ instances of Comparable interface of accept Comparator as second parameter. What should be the right way to handle this? Best regards, Artem Barger. --001a1143e3c059f3cc0534159f89--