commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eamon Doyle <ea...@cornercase.net>
Subject [math] Having trouble using any Math functions
Date Thu, 10 Feb 2011 16:10:10 GMT
Hi all.  I am new to Math (and including non-standard classes that aren't
created by my own code for that matter) and I am having trouble calling
DescriptiveStatistics.  Having searched for a solution for 3 days and having
asked a number of friends, this is the logical next step.  When I try to run
my program, I get two “cannot find symbol class DescriptiveStatistics”
errors on the line that constructs the todaysDocsStats object.  If anyone
has insight as to what I’m doing wrong here, I would really appreciate the
help.



Here are the relevant bits:



The path to commons-math-2.1.jar is in my classpath.  If I remove it, then I
also get the error “package org.apache.commons.math does not exist”

Some code:

import java.util.*;

import org.apache.commons.math.*;



public class CalcTAT {



                public Date startProcessingTime;

                public Date endProcessingTime;

                public Date currentTime;



                public CalcTAT(Date startTimeHold, Date endTimeHold)

                {

                                startProcessingTime = startTimeHold;

                                endProcessingTime = endTimeHold;

                }



    public ArrayList findTAT( ArrayList docRes )

    {

**stuff removed**

                                DescriptiveStatistics todaysDocsStats = new
DescriptiveStatistics();

                                while(conditions )

                                {

                                                todaysDocsStats.add(**an
int**);



                                }

                                                System.out.println(
todaysDocsStats.percentile(85));

                }

    }

}




Thanks for any help you can provide.

-Eamon

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message