Ignore:
Timestamp:
Apr 29, 2005, 11:15:58 AM (17 years ago)
Author:
Peter
Message:

file structure modifications. NOTE, this revision is not working, please wait for the next...

Location:
trunk/lib
Files:
2 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/lib/statistics/Fisher.h

    r294 r295  
    11// $Id$
    22
    3 #ifndef _theplu_cpptools_fisher_
    4 #define _theplu_cpptools_fisher_
     3#ifndef _theplu_statistics_fisher_
     4#define _theplu_statistics_fisher_
    55
    6 // C++ tools include
    7 /////////////////////
    8 #include "Score.h"
    9 #include "vector.h"
    10 //#include <gsl/gsl_cdf.h>
     6#include <c++_tools/statistics/Score.h>
     7#include <c++_tools/gslapi/vector.h>
    118
    12 // Standard C++ includes
    13 ////////////////////////
    14 //#include <utility>
    15 //#include <vector>
    169
    1710namespace theplu {
    18 namespace cpptools { 
     11namespace statistics { 
    1912  ///
    2013  /// Class for Fisher's exact test.   
     
    6558   
    6659    ///
     60    /// Function calculating score from 2x2 table for which the
     61    /// elements are calculated as follows \n
     62    /// a: #data \f$ x=1 \f$ AND \f$ y=1 \f$ \n
     63    /// b: #data \f$ x=-1 \f$ AND \f$ y=1 \f$ \n
     64    /// c: #data \f$ x=1 \f$ AND \f$ y=-1 \f$ \n
     65    /// d: #data \f$ x=-1 \f$ AND \f$ y=1 \f$ \n
     66    ///
    6767    /// @return odds ratio. If absolute_ is true and odds ratio is
    6868    /// less than unity 1 divided by odds ratio is returned
    6969    ///
    70     double score(const gslapi::vector&, const gslapi::vector&
     70    double score(const gslapi::vector& x, const gslapi::vector& y
    7171                 const std::vector<size_t>& = std::vector<size_t>());
    7272
    7373    ///
    74     /// Weighted version of odds ratio. Each element in 2x2 table is
    75     /// calculated as \f$ \sum weight_i \f$, so when each weight is
     74    /// Weighted version of score. Each element in 2x2 table is
     75    /// calculated as \f$ \sum w_i \f$, so when each weight is
    7676    /// unitary the same table is created as in the unweighted version
    7777    /// @return odds ratio
    7878    ///
    79     double score(const gslapi::vector&, const gslapi::vector&
    80                  const gslapi::vector&,
     79    double score(const gslapi::vector& x, const gslapi::vector& y
     80                 const gslapi::vector& w,
    8181                 const std::vector<size_t>& = std::vector<size_t>());
    8282
    8383    ///
    84     /// @return odds ratio  \f$ ad/bc\f$ 
     84    /// \f$ \frac{ad}{bc} \f$
    8585    ///
    86     double score(const u_int, const u_int, const u_int, const u_int);
     86    /// @return odds ratio. If absolute_ is true and odds ratio is
     87    /// less than unity, 1 divided by odds ratio is returned
     88    ///
     89    double score(const u_int a, const u_int b,
     90                 const u_int c, const u_int d);
    8791   
    88     double oddsratio(const double, const double,
    89                      const double, const double) const;
    9092
    9193         
     
    98100    u_int d_;
    99101
     102    double oddsratio(const double a, const double b,
     103                     const double c, const double d) const;
    100104
    101105  };
    102106
    103 }} // of namespace cpptools and namespace theplu
     107}} // of namespace statistics and namespace theplu
    104108
    105109#endif
Note: See TracChangeset for help on using the changeset viewer.