Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46FED11BF5 for ; Mon, 4 Aug 2014 12:05:23 +0000 (UTC) Received: (qmail 40377 invoked by uid 500); 4 Aug 2014 12:05:22 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 40274 invoked by uid 500); 4 Aug 2014 12:05:22 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 40258 invoked by uid 99); 4 Aug 2014 12:05:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2014 12:05:21 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.74.71.26] (HELO hel.is.scarlet.be) (193.74.71.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2014 12:05:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1407153893; bh=ZBspuPHKHQw9Ey30xde8ZglXzFQXb+QxoH2CLJXpVOM=; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To: Subject:In-Reply-To:References:Message-ID; b=lovoM1UAo4058hoGtHjI4ffYRoR1oJf5VZOngBVj2UWodw9M+q557XSm98b/OD4l0 UbsooOiOKpa5bfEX94yhIPOqs7TzA0JQO9KJGTgNQXWAvvqhwmGaD8WXeDnTxpEjQF 1LpODYKyv1CvA0Oy19jWMGGedMElR+bke17aLtzs= Received: from webmail.scarlet.be (meigs.is.scarlet.be [193.74.71.216]) by hel.is.scarlet.be (8.14.5/8.14.5) with ESMTP id s74C4qZv007968 for ; Mon, 4 Aug 2014 14:04:53 +0200 X-Scarlet: d=1407153893 c=193.74.71.216 Received: from ip-83-134-165-170.dsl.scarlet.be ([83.134.165.170]) via ip-83-134-165-170.dsl.scarlet.be ([83.134.165.170]) by webmail.scarlet.be with HTTP (HTTP/1.1 POST); Mon, 04 Aug 2014 14:04:52 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 04 Aug 2014 14:04:52 +0200 From: Gilles To: Subject: Re: [math] UnivariateIntegrator stop conditions In-Reply-To: <53DF6354.9050304@gmail.com> References: <53DF6354.9050304@gmail.com> Message-ID: <647c4d6f52cb29dd94bba13004820c62@scarlet.be> X-Sender: gilles@harfang.homelinux.org User-Agent: Scarlet Webmail X-DCC-scarlet.be-Metrics: hel; whitelist X-Virus-Scanned: clamav-milter 0.98.1-exp at hel X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org On Mon, 04 Aug 2014 14:41:24 +0400, Alexander Nozik wrote: > The univariate integrator class provides iterative integration > procedure. It throws exception if the number of evaluations is larger > than given number. The problem arises when one is limited by some > performance issues and wants to minimize the number of evaluations > even at the expense of accuracy. So for example I need to calculate > an > integral with best possible accuracy with limited number of > evaluations (and check the accuracy afterwards). I agree that the current design doesn't care for that case. > I can't do that > because if UnivariateIntegrator throws the exception, I can not > access > the result. Also it does not make sense why the accurasy is provided > in the constructor and maximum number of evaluations is the parameter > of integrate method. These are decisions made a while back; I recall that there were some fuzziness as to which parameters should go where. It was supposedly a trade-off between robustness, efficiency and flexibility. The design could be challenged now, provided we can replace it with something comprehensive. We could draw inspiration from the redesign of the least-squares fitting implementation (see package "o.a.c.m.fitting.leastsquares"). > Of course one could use the GaussIntegrator, but it does not > implement UnivariateIntegrator class, so if one needs to use these > integrators interchangeably (I do need), than the only option is to > write some wrapper class. > It would be good to have a default UnivariateIntegrator wrapper for > GaussIntegrator. "GaussIntegrator" is a building block for "IterativeLegendreIntegrator" (that implements the "UnivariateIntegrator" interface). It's a self-consistent implementation of a standard algorithm. I don't think it would be a good idea to clutter it with methods which you just said that are not flexible enough. > Also perhaps it makes sense to move maximum > evaluations to the constructor. How would that help you? > > I believe this question has already been discussed somewhere last > year but I can't remember the answer. See above, and the "dev" ML archive. You are most welcome to propose a new integration framework. Regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org