svn commit: r743663 - /commons/proper/fileupload/trunk/xdocs/index.xml
Author: dennisl Date: Thu Feb 12 09:15:36 2009 New Revision: 743663 URL: http://svn.apache.org/viewvc?rev=743663view=rev Log: Fix broken link. Modified: commons/proper/fileupload/trunk/xdocs/index.xml Modified: commons/proper/fileupload/trunk/xdocs/index.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/xdocs/index.xml?rev=743663r1=743662r2=743663view=diff == --- commons/proper/fileupload/trunk/xdocs/index.xml (original) +++ commons/proper/fileupload/trunk/xdocs/index.xml Thu Feb 12 09:15:36 2009 @@ -49,7 +49,7 @@ lia href=streaming.htmlStreaming API/a/li lia href=faq.htmlFrequently Asked Questions/a/li lia href=apidocs/index.htmlJavaDoc API/a/li - lia href=maven-reports.htmlProject Reports/a/li + lia href=project-reports.htmlProject Reports/a/li /ul You can also a href=cvs-usage.htmlbrowse/a the Subversion repository. /p
svn commit: r743676 - /commons/sandbox/compress/trunk/pom.xml
Author: bodewig Date: Thu Feb 12 10:03:44 2009 New Revision: 743676 URL: http://svn.apache.org/viewvc?rev=743676view=rev Log: Explicitly set javac source and target to 1.4, submitted by Christian Grobmeier, SANDBOX-288 Modified: commons/sandbox/compress/trunk/pom.xml Modified: commons/sandbox/compress/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/pom.xml?rev=743676r1=743675r2=743676view=diff == --- commons/sandbox/compress/trunk/pom.xml (original) +++ commons/sandbox/compress/trunk/pom.xml Thu Feb 12 10:03:44 2009 @@ -85,9 +85,17 @@ /properties build -!-- turn off cobertura until we figure out why it's hanging -- plugins plugin +groupIdorg.apache.maven.plugins/groupId +artifactIdmaven-compiler-plugin/artifactId +configuration + source1.4/source + target1.4/target +/configuration + /plugin + !-- turn off cobertura until we figure out why it's hanging -- + plugin groupIdorg.codehaus.mojo/groupId artifactIdcobertura-maven-plugin/artifactId configuration
svn commit: r743678 - in /commons/sandbox/compress/trunk/src: main/java/org/apache/commons/compress/compressors/bzip2/ test/resources/
Author: bodewig Date: Thu Feb 12 10:27:10 2009 New Revision: 743678 URL: http://svn.apache.org/viewvc?rev=743678view=rev Log: use proper BZip2 signature, SANDBOX-285 Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java commons/sandbox/compress/trunk/src/test/resources/bla.txt.bz2 Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java?rev=743678r1=743677r2=743678view=diff == --- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java (original) +++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java Thu Feb 12 10:27:10 2009 @@ -218,12 +218,9 @@ if (in.available() == 0) { throw new IOException(Empty InputStream); } -int magic2 = this.in.read(); -if (magic2 != 'h') { -throw new IOException(Stream is not BZip2 formatted: expected 'h' - + as first byte but got ' + (char) magic2 - + '); -} +checkMagicChar('B', first); +checkMagicChar('Z', second); +checkMagicChar('h', third); int blockSize = this.in.read(); if ((blockSize '1') || (blockSize '9')) { @@ -237,6 +234,17 @@ setupBlock(); } +private void checkMagicChar(char expected, String position) +throws IOException { +int magic = this.in.read(); +if (magic != expected) { +throw new IOException(Stream is not BZip2 formatted: expected ' + + expected + ' as + position + + byte but got ' + (char) magic + + '); +} +} + private void initBlock() throws IOException { char magic0 = bsGetUByte(); char magic1 = bsGetUByte(); Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java?rev=743678r1=743677r2=743678view=diff == --- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java (original) +++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java Thu Feb 12 10:27:10 2009 @@ -405,6 +405,8 @@ bytesOut = 0; nBlocksRandomised = 0; +bsPutUChar('B'); +bsPutUChar('Z'); /* Write `magic' bytes h indicating file-format == huffmanised, followed by a digit indicating blockSize100k. */ Modified: commons/sandbox/compress/trunk/src/test/resources/bla.txt.bz2 URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/resources/bla.txt.bz2?rev=743678r1=743677r2=743678view=diff == Binary files - no diff available.
svn commit: r743688 - in /commons/proper/math/trunk/src: java/org/apache/commons/math/stat/correlation/ site/xdoc/ test/R/ test/org/apache/commons/math/stat/correlation/
Author: psteitz Date: Thu Feb 12 11:21:54 2009 New Revision: 743688 URL: http://svn.apache.org/viewvc?rev=743688view=rev Log: Added correlation package, Covariance class. JIRA: MATH-114 Added: commons/proper/math/trunk/src/java/org/apache/commons/math/stat/correlation/ commons/proper/math/trunk/src/java/org/apache/commons/math/stat/correlation/Covariance.java (with props) commons/proper/math/trunk/src/test/R/covarianceTestCases commons/proper/math/trunk/src/test/org/apache/commons/math/stat/correlation/ commons/proper/math/trunk/src/test/org/apache/commons/math/stat/correlation/CovarianceTest.java (with props) Modified: commons/proper/math/trunk/src/site/xdoc/changes.xml commons/proper/math/trunk/src/test/R/testAll Added: commons/proper/math/trunk/src/java/org/apache/commons/math/stat/correlation/Covariance.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/stat/correlation/Covariance.java?rev=743688view=auto == --- commons/proper/math/trunk/src/java/org/apache/commons/math/stat/correlation/Covariance.java (added) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/stat/correlation/Covariance.java Thu Feb 12 11:21:54 2009 @@ -0,0 +1,205 @@ +/* + * 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. + */ +package org.apache.commons.math.stat.correlation; + +import org.apache.commons.math.MathRuntimeException; +import org.apache.commons.math.linear.RealMatrix; +import org.apache.commons.math.linear.DenseRealMatrix; +import org.apache.commons.math.stat.descriptive.moment.Mean; +import org.apache.commons.math.stat.descriptive.moment.Variance; + +/** + * Computes covariances for pairs of arrays or columns of a matrix. + * + * pThe constructors that take codeRealMatrix/code or + * codedouble[][]/code arguments generate correlation matrices. The + * columns of the input matrices are assumed to represent variable values./p + * + * pThe constructor argument codebiasCorrected/code determines whether or + * not computed covariances are bias-corrected./p + * + * pUnbiased covariances are given by the formula/p + * codecov(X, Y) = Sigma;[(xsubi/sub - E(X))(ysubi/sub - E(Y))] / (n - 1)/code + * where codeE(x)/code is the mean of codeX/code and codeE(Y)/code + * is the mean of the codeY/code values. + * + * pNon-bias-corrected estimates use coden/code in place of coden - 1/code + * + * @version $Revision$ $Date$ + * @since 2.0 + */ +public class Covariance { + +/** covariance matrix */ +private final RealMatrix covarianceMatrix; + +public Covariance() { +super(); +covarianceMatrix = null; +} + +/** + * Create a Covariance matrix from a rectangular array + * whose columns represent covariates. + * + * pThe codebiasCorrected/code parameter determines whether or not + * covariance estimates are bias-corrected./p + * + * pThe input array must be rectangular with at least two columns + * and two rows./p + * + * @param data rectangular array with columns representing covariates + * @param biasCorrected true means covariances are bias-corrected + * @throws IllegalArgumentException if the input data array is not + * rectangular with at least two rows and two columns. + */ +public Covariance(double[][] data, boolean biasCorrected) { +this(new DenseRealMatrix(data), biasCorrected); +} + +/** + * Create a Covariance matrix from a rectangular array + * whose columns represent covariates. + * + * pThe input array must be rectangular with at least two columns + * and two rows/p + * + * @param data rectangular array with columns representing covariates + * @throws IllegalArgumentException if the input data array is not + * rectangular with at least two rows and two columns. + */ +public Covariance(double[][] data) { +this(data, true); +} + +/** + * Create a covariance matrix from a matrix whose columns + * represent covariates. + * + * pThe codebiasCorrected/code parameter determines whether or not +
svn commit: r743930 - /commons/sandbox/compress/trunk/pom.xml
Author: niallp Date: Thu Feb 12 23:42:56 2009 New Revision: 743930 URL: http://svn.apache.org/viewvc?rev=743930view=rev Log: SANDBOX-288 Use properties to configure the compiler plugin for Java 1.4 through the commons-parent pom and upgrade to the current sandbox parent pom Modified: commons/sandbox/compress/trunk/pom.xml Modified: commons/sandbox/compress/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/pom.xml?rev=743930r1=743929r2=743930view=diff == --- commons/sandbox/compress/trunk/pom.xml (original) +++ commons/sandbox/compress/trunk/pom.xml Thu Feb 12 23:42:56 2009 @@ -22,7 +22,7 @@ parent groupIdorg.apache.commons/groupId artifactIdcommons-sandbox-parent/artifactId -version4/version +version7/version /parent artifactIdcommons-compress/artifactId @@ -80,20 +80,14 @@ /distributionManagement properties +maven.compile.source1.4/maven.compile.source +maven.compile.target1.4/maven.compile.target commons.componentidcompress/commons.componentid commons.jira.componentid12311183/commons.jira.componentid /properties build plugins - plugin -groupIdorg.apache.maven.plugins/groupId -artifactIdmaven-compiler-plugin/artifactId -configuration - source1.4/source - target1.4/target -/configuration - /plugin !-- turn off cobertura until we figure out why it's hanging -- plugin groupIdorg.codehaus.mojo/groupId
svn commit: r743933 - /commons/sandbox/xml/trunk/pom.xml
Author: niallp Date: Thu Feb 12 23:43:50 2009 New Revision: 743933 URL: http://svn.apache.org/viewvc?rev=743933view=rev Log: Use properties to configure the compiler plugin for Java 1.5 through the commons-parent pom Modified: commons/sandbox/xml/trunk/pom.xml Modified: commons/sandbox/xml/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/sandbox/xml/trunk/pom.xml?rev=743933r1=743932r2=743933view=diff == --- commons/sandbox/xml/trunk/pom.xml (original) +++ commons/sandbox/xml/trunk/pom.xml Thu Feb 12 23:43:50 2009 @@ -62,19 +62,14 @@ /distributionManagement properties +maven.compile.source1.5/maven.compile.source +maven.compile.target1.5/maven.compile.target commons.componentidxml/commons.componentid commons.jira.componentid12312652/commons.jira.componentid /properties build plugins - plugin -artifactIdmaven-compiler-plugin/artifactId -configuration - source1.5/source - target1.5/target -/configuration - /plugin /plugins /build