Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 24395 invoked from network); 13 Mar 2010 23:33:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Mar 2010 23:33:45 -0000 Received: (qmail 1438 invoked by uid 500); 13 Mar 2010 23:33:04 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 1372 invoked by uid 500); 13 Mar 2010 23:33:04 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 1365 invoked by uid 99); 13 Mar 2010 23:33:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Mar 2010 23:33:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Mar 2010 23:33:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 16CAE23889E7; Sat, 13 Mar 2010 23:32:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r922691 - in /commons/proper/math/trunk/src/test/R: ChiSquareDistributionTestCases.R FDistributionTestCases.R GammaDistributionTestCases.R WeibullDistributionTestCases.R exponentialTestCases testAll Date: Sat, 13 Mar 2010 23:32:37 -0000 To: commits@commons.apache.org From: psteitz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100313233238.16CAE23889E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: psteitz Date: Sat Mar 13 23:32:37 2010 New Revision: 922691 URL: http://svn.apache.org/viewvc?rev=922691&view=rev Log: Added Wiebull, Gamma, F, ChiSquare verification tests, added density test for exponential. Added: commons/proper/math/trunk/src/test/R/ChiSquareDistributionTestCases.R (with props) commons/proper/math/trunk/src/test/R/FDistributionTestCases.R (with props) commons/proper/math/trunk/src/test/R/GammaDistributionTestCases.R (with props) commons/proper/math/trunk/src/test/R/WeibullDistributionTestCases.R (with props) Modified: commons/proper/math/trunk/src/test/R/exponentialTestCases commons/proper/math/trunk/src/test/R/testAll Added: commons/proper/math/trunk/src/test/R/ChiSquareDistributionTestCases.R URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/R/ChiSquareDistributionTestCases.R?rev=922691&view=auto ============================================================================== --- commons/proper/math/trunk/src/test/R/ChiSquareDistributionTestCases.R (added) +++ commons/proper/math/trunk/src/test/R/ChiSquareDistributionTestCases.R Sat Mar 13 23:32:37 2010 @@ -0,0 +1,97 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#------------------------------------------------------------------------------ +# R source file to validate ChiSquare distribution tests in +# org.apache.commons.math.distribution.ChiSquareDistributionTest +# +# To run the test, install R, put this file and testFunctions +# into the same directory, launch R from this directory and then enter +# source("") +# +#----------------------------------------------------------------------------- +tol <- 1E-9 + +# Function definitions +source("testFunctions") # utility test functions + +# function to verify distribution computations +verifyDistribution <- function(points, expected, df, tol) { + rDistValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rDistValues[i] <- pchisq(point, df, log = FALSE) + } + output <- c("Distribution test df = ", df) + if (assertEquals(expected, rDistValues, tol, "Distribution Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +# function to verify density computations +verifyDensity <- function(points, expected, df, tol) { + rDensityValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rDensityValues[i] <- dchisq(point, df, log = FALSE) + } + output <- c("Density test df = ", df) + if (assertEquals(expected, rDensityValues, tol, "Density Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +# function to verify quantiles +verifyQuantiles <- function(points, expected, df, tol) { + rQuantileValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rQuantileValues[i] <- qchisq(point, df, log = FALSE) + } + output <- c("Quantile test df = ", df) + if (assertEquals(expected, rQuantileValues, tol, "Quantile Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +#-------------------------------------------------------------------------- +cat("ChiSquare Distribution test cases\n") + +df <- 5 +distributionValues <- c(0.001, 0.01, 0.025, 0.05, 0.1, 0.999, 0.990, 0.975, 0.950, 0.900) +densityValues <- c(0.0115379817652, 0.0415948507811, 0.0665060119842, 0.0919455953114, 0.121472591024, + 0.000433630076361, 0.00412780610309, 0.00999340341045, 0.0193246438937, 0.0368460089216) +distributionPoints <- c(0.210212602629, 0.554298076728, 0.831211613487, 1.14547622606, 1.61030798696, + 20.5150056524, 15.0862724694, 12.8325019940, 11.0704976935, 9.23635689978) +verifyQuantiles(distributionValues, distributionPoints, df, tol) +verifyDistribution(distributionPoints, distributionValues, df, tol) +verifyDensity(distributionPoints, densityValues, df, tol) + +df <- .1 +distributionPoints <- c(1.16892641146e-60, 1.16892641146e-40, 1.06313237798e-32, 1.11477509638e-26, 1.16892641146e-20, + 5.47291719746, 2.17525480018, 1.13434752351, 0.531864604852, 0.152634227818) +verifyQuantiles(distributionValues, distributionPoints, df, tol) +verifyDistribution(distributionPoints, distributionValues, df, tol) + +displayDashes(WIDTH) Propchange: commons/proper/math/trunk/src/test/R/ChiSquareDistributionTestCases.R ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/proper/math/trunk/src/test/R/ChiSquareDistributionTestCases.R ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: commons/proper/math/trunk/src/test/R/ChiSquareDistributionTestCases.R ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: commons/proper/math/trunk/src/test/R/FDistributionTestCases.R URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/R/FDistributionTestCases.R?rev=922691&view=auto ============================================================================== --- commons/proper/math/trunk/src/test/R/FDistributionTestCases.R (added) +++ commons/proper/math/trunk/src/test/R/FDistributionTestCases.R Sat Mar 13 23:32:37 2010 @@ -0,0 +1,92 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#------------------------------------------------------------------------------ +# R source file to validate F distribution tests in +# org.apache.commons.math.distribution.TDistributionTest +# +# To run the test, install R, put this file and testFunctions +# into the same directory, launch R from this directory and then enter +# source("") +# +#----------------------------------------------------------------------------- +tol <- 1E-9 + +# Function definitions +source("testFunctions") # utility test functions + +# function to verify distribution computations +verifyDistribution <- function(points, expected, numeratorDf, denominatorDf, tol) { + rDistValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rDistValues[i] <- pf(point, numeratorDf, denominatorDf, log = FALSE) + } + output <- c("Distribution test numerator df = ", numeratorDf, " denominator df = ", denominatorDf) + if (assertEquals(expected, rDistValues, tol, "Distribution Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +# function to verify density computations +verifyDensity <- function(points, expected, numeratorDf, denominatorDf, tol) { + rDensityValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rDensityValues[i] <- df(point, numeratorDf, denominatorDf, log = FALSE) + } + output <- c("Density test numerator df = ", numeratorDf, " denominator df = ", denominatorDf) + if (assertEquals(expected, rDensityValues, tol, "Density Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +# function to verify quantiles +verifyQuantiles <- function(points, expected, numeratorDf, denominatorDf, tol) { + rQuantileValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rQuantileValues[i] <- qf(point, numeratorDf, denominatorDf, log = FALSE) + } + output <- c("Quantile test numerator df = ", numeratorDf, " denominator df = ", denominatorDf) + if (assertEquals(expected, rQuantileValues, tol, "Quantile Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +#-------------------------------------------------------------------------- +cat("F Distribution test cases\n") + +numeratorDf <- 5 +denominatorDf <- 6 +distributionValues <- c(0.001, 0.01, 0.025, 0.05, 0.1, 0.999, 0.990, 0.975, 0.950, 0.900) +densityValues <- c(0.0689156576706, 0.236735653193, 0.364074131941, 0.481570789649, 0.595880479994, + 0.000133443915657, 0.00286681303403, 0.00969192007502, 0.0242883861471, 0.0605491314658) +distributionPoints <- c(0.0346808448626, 0.0937009113303, 0.143313661184, 0.202008445998, 0.293728320107, + 20.8026639595, 8.74589525602, 5.98756512605, 4.38737418741, 3.10751166664) +verifyQuantiles(distributionValues, distributionPoints, numeratorDf, denominatorDf, tol) +verifyDistribution(distributionPoints, distributionValues, numeratorDf, denominatorDf, tol) +verifyDensity(distributionPoints, densityValues, numeratorDf, denominatorDf, tol) + +displayDashes(WIDTH) Propchange: commons/proper/math/trunk/src/test/R/FDistributionTestCases.R ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/proper/math/trunk/src/test/R/FDistributionTestCases.R ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: commons/proper/math/trunk/src/test/R/FDistributionTestCases.R ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: commons/proper/math/trunk/src/test/R/GammaDistributionTestCases.R URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/R/GammaDistributionTestCases.R?rev=922691&view=auto ============================================================================== --- commons/proper/math/trunk/src/test/R/GammaDistributionTestCases.R (added) +++ commons/proper/math/trunk/src/test/R/GammaDistributionTestCases.R Sat Mar 13 23:32:37 2010 @@ -0,0 +1,92 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#------------------------------------------------------------------------------ +# R source file to validate Gamma distribution tests in +# org.apache.commons.math.distribution.GammaDistributionTest +# +# To run the test, install R, put this file and testFunctions +# into the same directory, launch R from this directory and then enter +# source("") +# +#----------------------------------------------------------------------------- +tol <- 1E-9 + +# Function definitions +source("testFunctions") # utility test functions + +# function to verify distribution computations +verifyDistribution <- function(points, expected, alpha, beta, tol) { + rDistValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rDistValues[i] <- pgamma(point, shape=alpha, scale=beta, log = FALSE) + } + output <- c("Distribution test shape = ", shape, " scale = ", scale) + if (assertEquals(expected, rDistValues, tol, "Distribution Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +# function to verify density computations +verifyDensity <- function(points, expected, alpha, beta, tol) { + rDensityValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rDensityValues[i] <- dgamma(point, shape=alpha, scale=beta, log = FALSE) + } + output <- c("Density test shape = ", shape, " scale = ", scale) + if (assertEquals(expected, rDensityValues, tol, "Density Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +# function to verify quantiles +verifyQuantiles <- function(points, expected, alpha, beta, tol) { + rQuantileValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rQuantileValues[i] <- qgamma(point, shape=alpha, scale=beta, log = FALSE) + } + output <- c("Quantile test shape = ", shape, " scale = ", scale) + if (assertEquals(expected, rQuantileValues, tol, "Quantile Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +#-------------------------------------------------------------------------- +cat("Gamma Distribution test cases\n") + +shape <- 4 +scale <- 2 +distributionValues <- c(0.001, 0.01, 0.025, 0.05, 0.1, 0.999, 0.990, 0.975, 0.950, 0.900) +densityValues <- c(0.00427280075546, 0.0204117166709, 0.0362756163658, 0.0542113174239, 0.0773195272491, + 0.000394468852816, 0.00366559696761, 0.00874649473311, 0.0166712508128, 0.0311798227954) +distributionPoints <- c(0.857104827257, 1.64649737269, 2.17973074725, 2.7326367935, 3.48953912565, + 26.1244815584, 20.0902350297, 17.5345461395, 15.5073130559, 13.3615661365) +verifyQuantiles(distributionValues, distributionPoints, shape, scale, tol) +verifyDistribution(distributionPoints, distributionValues, shape, scale, tol) +verifyDensity(distributionPoints, densityValues, shape, scale, tol) + +displayDashes(WIDTH) Propchange: commons/proper/math/trunk/src/test/R/GammaDistributionTestCases.R ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/proper/math/trunk/src/test/R/GammaDistributionTestCases.R ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: commons/proper/math/trunk/src/test/R/GammaDistributionTestCases.R ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: commons/proper/math/trunk/src/test/R/WeibullDistributionTestCases.R URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/R/WeibullDistributionTestCases.R?rev=922691&view=auto ============================================================================== --- commons/proper/math/trunk/src/test/R/WeibullDistributionTestCases.R (added) +++ commons/proper/math/trunk/src/test/R/WeibullDistributionTestCases.R Sat Mar 13 23:32:37 2010 @@ -0,0 +1,92 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#------------------------------------------------------------------------------ +# R source file to validate Weibull distribution tests in +# org.apache.commons.math.distribution.GammaDistributionTest +# +# To run the test, install R, put this file and testFunctions +# into the same directory, launch R from this directory and then enter +# source("") +# +#----------------------------------------------------------------------------- +tol <- 1E-9 + +# Function definitions +source("testFunctions") # utility test functions + +# function to verify distribution computations +verifyDistribution <- function(points, expected, alpha, beta, tol) { + rDistValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rDistValues[i] <- pweibull(point, shape=alpha, scale=beta, log = FALSE) + } + output <- c("Distribution test shape = ", shape, " scale = ", scale) + if (assertEquals(expected, rDistValues, tol, "Distribution Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +# function to verify density computations +verifyDensity <- function(points, expected, alpha, beta, tol) { + rDensityValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rDensityValues[i] <- dweibull(point, shape=alpha, scale=beta, log = FALSE) + } + output <- c("Density test shape = ", shape, " scale = ", scale) + if (assertEquals(expected, rDensityValues, tol, "Density Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +# function to verify quantiles +verifyQuantiles <- function(points, expected, alpha, beta, tol) { + rQuantileValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rQuantileValues[i] <- qweibull(point, shape=alpha, scale=beta, log = FALSE) + } + output <- c("Quantile test shape = ", shape, " scale = ", scale) + if (assertEquals(expected, rQuantileValues, tol, "Quantile Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +#-------------------------------------------------------------------------- +cat("Weibull Distribution test cases\n") + +shape <- 1.2 +scale <- 2.1 +distributionValues <- c(0.001, 0.01, 0.025, 0.05, 0.1, 0.999, 0.990, 0.975, 0.950, 0.900) +densityValues <- c(0.180535929306, 0.262801138133, 0.301905425199, 0.330899152971, 0.353441418887, 0.000788590320203, + 0.00737060094841, 0.0177576041516, 0.0343043442574, 0.065664589369) +distributionPoints <- c(0.00664355180993, 0.0454328283309, 0.0981162737374, 0.176713524579, 0.321946865392, + 10.5115496887, 7.4976304671, 6.23205600701, 5.23968436955, 4.20790282578) +verifyQuantiles(distributionValues, distributionPoints, shape, scale, tol) +verifyDistribution(distributionPoints, distributionValues, shape, scale, tol) +verifyDensity(distributionPoints, densityValues, shape, scale, tol) + +displayDashes(WIDTH) Propchange: commons/proper/math/trunk/src/test/R/WeibullDistributionTestCases.R ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/proper/math/trunk/src/test/R/WeibullDistributionTestCases.R ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: commons/proper/math/trunk/src/test/R/WeibullDistributionTestCases.R ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: commons/proper/math/trunk/src/test/R/exponentialTestCases URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/R/exponentialTestCases?rev=922691&r1=922690&r2=922691&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/R/exponentialTestCases (original) +++ commons/proper/math/trunk/src/test/R/exponentialTestCases Sat Mar 13 23:32:37 2010 @@ -21,11 +21,8 @@ # into the same directory, launch R from this directory and then enter # source("") # -# R functions used -# pexp(q, rate = 1, lower.tail = TRUE, log.p = FALSE) <- distribution -# qexp(p, rate = 1, lower.tail = TRUE, log.p = FALSE) <- quantiles #------------------------------------------------------------------------------ -tol <- 1E-7 +tol <- 1E-9 # Function definitions @@ -48,6 +45,39 @@ verifyDistribution <- function(points, e } } +# function to verify density computations +verifyDensity <- function(points, expected, mean, tol) { + rDensityValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rDensityValues[i] <- dexp(point, 1/mean) + } + output <- c("Density test mean = ", mean) + if (assertEquals(expected, rDensityValues, tol, "Density Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + +# function to verify quantiles +verifyQuantiles <- function(points, expected, mean, tol) { + rQuantileValues <- rep(0, length(points)) + i <- 0 + for (point in points) { + i <- i + 1 + rQuantileValues[i] <- qexp(point, 1/mean, log = FALSE) + } + output <- c("Quantile test mean = ", mean) + if (assertEquals(expected, rQuantileValues, tol, "Quantile Values")) { + displayPadded(output, SUCCEEDED, WIDTH) + } else { + displayPadded(output, FAILED, WIDTH) + } +} + + #-------------------------------------------------------------------------- cat("Exponential test cases\n") @@ -55,13 +85,16 @@ mean <- 5 distributionValues <- c(0, 0, 0.001, 0.01, 0.025, 0.05, 0.1, 0.999, 0.990, 0.975, 0.950, 0.900) -distributionPoints <- c(-2, 0, 0.005002502, 0.05025168, 0.1265890, 0.2564665, 0.5268026, - 34.53878, 23.02585, 18.44440, 14.97866, 11.51293) - +densityValues <- c(0.2, 0.2, 0.1998, 0.198, 0.195, 0.19, 0.18, 0.000200000000000, + 0.00200000000002, 0.00499999999997, 0.00999999999994, 0.0199999999999) +distributionPoints <- c(0, 0, 0.00500250166792, 0.0502516792675, 0.126589039921, 0.256466471938, + 0.526802578289, 34.5387763949, 23.0258509299, 18.4443972706, 14.9786613678, 11.5129254650) verifyDistribution(distributionPoints, distributionValues, mean, tol) +verifyQuantiles(distributionValues, distributionPoints, mean, tol) +verifyDensity(distributionPoints, densityValues, mean, tol) output <- "Probability test P(.25 < X < .75)" -if (assertEquals(0.0905214, pexp(.75, 1/mean) - pexp(.25, 1/mean), tol, "Probability value")) { +if (assertEquals(0.0905214480757, pexp(.75, 1/mean) - pexp(.25, 1/mean), tol, "Probability value")) { displayPadded(output, SUCCEEDED, WIDTH) } else { displayPadded(output, FAILED, WIDTH) Modified: commons/proper/math/trunk/src/test/R/testAll URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/R/testAll?rev=922691&r1=922690&r2=922691&view=diff ============================================================================== --- commons/proper/math/trunk/src/test/R/testAll (original) +++ commons/proper/math/trunk/src/test/R/testAll Sat Mar 13 23:32:37 2010 @@ -36,6 +36,10 @@ source("exponentialTestCases") source("cauchyTestCases.R") source("pascalTestCases") source("TDistributionTestCases.R") +source("FDistributionTestCases.R") +source("GammaDistributionTestCases.R") +source("WeibullDistributionTestCases.R") +source("ChiSquareDistributionTestCases.R") # regression source("regressionTestCases")