kspread Library API Documentation

stats.h

00001 /*
00002     $Id: stats.h 212185 2003-03-07 22:11:39Z waba $
00003 
00004     KCalc, a scientific calculator for the X window system using the
00005     Qt widget libraries, available at no cost at http://www.troll.no
00006 
00007     Copyright (C) 1996 Bernd Johannes Wuebben
00008                        wuebben@math.cornell.edu
00009 
00010     This program is free software; you can redistribute it and/or modify
00011     it under the terms of the GNU General Public License as published by
00012     the Free Software Foundation; either version 2 of the License, or
00013     (at your option) any later version.
00014 
00015     This program is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU General Public License for more details.
00019 
00020     You should have received a copy of the GNU General Public License
00021     along with this program; if not, write to the Free Software
00022     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 
00024 */
00025 
00026 #ifndef KSTATS_H
00027 #define KSTATS_H
00028 
00029 #include <qptrlist.h>
00030 #include <math.h>
00031 #include "kcalctype.h"
00032 
00033 class KStats
00034 {
00035 
00036 public:
00037 
00038     KStats();
00039     ~KStats();
00040 
00041 public:
00042 
00043     void clearAll();
00044     void enterData(CALCAMNT data);
00045     void clearLast();
00046     CALCAMNT min();
00047     CALCAMNT max();
00048     CALCAMNT sum();
00049     CALCAMNT mul();
00050     CALCAMNT sum_of_squares();
00051     CALCAMNT mean();
00052     CALCAMNT median();
00053     CALCAMNT std_kernel();
00054     CALCAMNT std();
00055     CALCAMNT sample_std();
00056     int      count();
00057     bool     error();
00058 
00059 private:
00060 
00061     QPtrList<CALCAMNT> data;
00062     bool error_flag;
00063 
00064 };
00065 
00066 class MyList : public  QPtrList<CALCAMNT>
00067 {
00068 
00069 public:
00070 
00071   MyList() : QPtrList<CALCAMNT>() {};
00072 
00073 protected:
00074   int compareItems(Item item1,Item item2);
00075 };
00076 
00077 
00078 #endif /*KSTATS_H*/
00079 
KDE Logo
This file is part of the documentation for kspread Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:43:38 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003