psteitz     2004/01/10 23:19:52

  Modified:    math/src/java/org/apache/commons/math/random
                        EmpiricalDistribution.java
  Log:
  Added load(URL). Addressing PR #25972, reported by Bill Barker.
  
  Revision  Changes    Path
  1.11      +12 -4     
jakarta-commons/math/src/java/org/apache/commons/math/random/EmpiricalDistribution.java
  
  Index: EmpiricalDistribution.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/random/EmpiricalDistribution.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- EmpiricalDistribution.java        15 Nov 2003 16:01:37 -0000      1.10
  +++ EmpiricalDistribution.java        11 Jan 2004 07:19:52 -0000      1.11
  @@ -56,6 +56,7 @@
   
   import java.io.IOException;
   import java.io.File;
  +import java.net.URL;
   import java.util.ArrayList;
   
   import org.apache.commons.math.stat.DescriptiveStatistics;
  @@ -85,18 +86,25 @@
   public interface EmpiricalDistribution {
       
       /**
  -     * Computes the empirical distribution from the input file
  +     * Computes the empirical distribution from the input file.
        * @param filePath fully qualified name of a file in the local file system
        * @throws IOException if an IO error occurs
        */
       void load(String filePath) throws IOException; 
       
       /**
  -     * Computes the empirical distribution from the input file
  -     * @param file url of the input file
  +     * Computes the empirical distribution from the input file.
  +     * @param file the input file
        * @throws IOException if an IO error occurs
        */
       void load(File file) throws IOException;
  +    
  +    /**
  +     * Computes the empirical distribution using data read from a URL.
  +     * @param file url of the input file
  +     * @throws IOException if an IO error occurs
  +     */
  +    void load(URL url) throws IOException;
       
       /** 
        * Generates a random value from this distribution.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to