Re: svn commit: r1562220 - in /commons/proper/math/trunk/src: changes/ main/java/org/apache/commons/math3/geometry/enclosing/ main/java/org/apache/commons/math3/geometry/euclidean/twod/ test/java/org/

2014-01-28 Thread Thomas Neidhart
On 01/28/2014 09:29 PM, l...@apache.org wrote:
> Author: luc
> Date: Tue Jan 28 20:29:27 2014
> New Revision: 1562220
> 
> URL: http://svn.apache.org/r1562220
> Log:
> Added Emo Welzl algorithm finding points smallest enclosing ball.
> 
> JIRA: MATH-1095
> 
> Added:
> 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/
> 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/Encloser.java
>(with props)
> 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/EnclosingBall.java
>(with props)
> 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/SupportBallGenerator.java
>(with props)
> 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/WelzlEncloser.java
>(with props)
> 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/package-info.java
>(with props)
> 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/euclidean/twod/BallGenerator.java
>(with props)
> 
> commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/enclosing/
> 
> commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/enclosing/WelzlEncloserTest.java
>(with props)
> 
> commons/proper/math/trunk/src/test/java/org/apache/commons/math3/geometry/euclidean/twod/BallGeneratorTest.java
>(with props)
> Modified:
> commons/proper/math/trunk/src/changes/changes.xml

Hi Luc,

looks nice and gives me some good ideas for the ConvexHull too!

Thanks,

Thomas

> 
> Modified: commons/proper/math/trunk/src/changes/changes.xml
> URL: 
> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/changes/changes.xml?rev=1562220&r1=1562219&r2=1562220&view=diff
> ==
> --- commons/proper/math/trunk/src/changes/changes.xml (original)
> +++ commons/proper/math/trunk/src/changes/changes.xml Tue Jan 28 20:29:27 2014
> @@ -51,6 +51,9 @@ If the output is not quite correct, chec
>
>
>  
> +  
> +   Added Emo Welzl algorithm to find the smallest enclosing ball of a 
> collection of points.
> +  
>
>  Fixed an indexing problem in "BicubicSplineInterpolatingFunction" 
> which
>  resulted in wrong interpolations.
> 
> Added: 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/Encloser.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/Encloser.java?rev=1562220&view=auto
> ==
> --- 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/Encloser.java
>  (added)
> +++ 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/Encloser.java
>  Tue Jan 28 20:29:27 2014
> @@ -0,0 +1,39 @@
> +/*
> + * 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.math3.geometry.enclosing;
> +
> +import java.util.List;
> +
> +import org.apache.commons.math3.geometry.Point;
> +import org.apache.commons.math3.geometry.Space;
> +
> +/** Interface for algorithms computing enclosing balls.
> + * @param  Space type.
> + * @param  Point type.
> + * @version $Id$
> + * @see EnclosingBall
> + * @since 3.3
> + */
> +public interface Encloser> {
> +
> +/** Find a ball enclosing a list of points.
> + * @param points points to enclose
> + * @return enclosing ball
> + */
> +EnclosingBall enclose(List points);
> +
> +}
> 
> Propchange: 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/Encloser.java
> --
> svn:eol-style = native
> 
> Propchange: 
> commons/proper/math/trunk/src/main/java/org/apache/commons/math3/geometry/enclosing/Encloser.java
> --
> svn:keywords = "Author Date Id Revision"
> 

[io] Addition of a TrailerInputStream class?

2014-01-28 Thread Duncan Jones
Hi all,

For a project of mine I developed a class named TrailerInputStream,
which reads from an InputStream whilst retaining a buffer of N bytes
(the trailer), Once the stream has been exhausted, the final N bytes
are obtained by calling the getTrailer() method.

I found it helpful for reading structured data in which the main
contents of the stream are processed differently to the trailer at the
end.

Is there a place for something like this in IO? I can imagine a
symmetric class called HeaderInputStream as well.

Current code is at
https://github.com/RNCryptor/JNCryptor/blob/streaming/src/main/java/org/cryptonode/jncryptor/TrailerInputStream.java.
It's not yet in a fit state for submission, but isn't far away in
terms of comment quality and unit tests.

Kind regards,

Duncan

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org