Changeset 1031 for trunk/yat/statistics


Ignore:
Timestamp:
Feb 4, 2008, 4:44:44 PM (14 years ago)
Author:
Markus Ringnér
Message:

Fixes #272

Location:
trunk/yat/statistics
Files:
1 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/Makefile.am

    r1003 r1031  
    4040include_statistics_HEADERS = AUC.h Averager.h AveragerPair.h \
    4141  AveragerWeighted.h AveragerPairWeighted.h \
    42   euclidean_vector_distance.h Fisher.h \
     42  distance.h euclidean_distance.h Fisher.h \
    4343  FoldChange.h Histogram.h \
    4444  KolmogorovSmirnov.h \
    4545  Pearson.h PearsonCorrelation.h \
    46   pearson_vector_distance.h ROC.h \
     46  pearson_distance.h ROC.h \
    4747  SAMScore.h Score.h SNRScore.h tScore.h tTest.h \
    48   utility.h vector_distance.h VectorFunction.h WilcoxonFoldChange.h
     48  utility.h VectorFunction.h WilcoxonFoldChange.h
  • trunk/yat/statistics/distance.h

    r1030 r1031  
    1 #ifndef theplu_yat_statistics_vector_distance_h
    2 #define theplu_yat_statistics_vector_distance_h
     1#ifndef theplu_yat_statistics_distance_h
     2#define theplu_yat_statistics_distance_h
    33
    44// $Id$
     
    3939  /// For each measure to calculate distances between containers
    4040  /// with random access iterators one should provide a struct
    41   /// that inherits from vector_distance_tag and provides a "label" for
     41  /// that inherits from distance_tag and provides a "label" for
    4242  /// the distance measure.
    4343  ///
    44   struct vector_distance_tag {
     44  struct distance_tag {
    4545    /// tag defining distance measure
    46     typedef vector_distance_tag distance;
     46    typedef distance_tag distance;
    4747  };
    4848
     
    5454  /// distance measures.  Instead it can access the "label" of each
    5555  /// distance measure through the special template structure
    56   /// vector_distance_traits.
     56  /// distance_traits.
    5757  ///
    5858  template <class T>
    59   struct vector_distance_traits {
     59  struct distance_traits {
    6060    /// \return distance type
    6161    typedef typename T::distance distance;
     
    7373  ///
    7474  template <typename Iter1, typename Iter2, typename Dist>
    75   double vector_distance(Iter1 beg1, Iter1 end1, Iter2 beg2, const Dist disttag)
     75  double distance(Iter1 beg1, Iter1 end1, Iter2 beg2, const Dist disttag)
    7676  {
    7777    return
    78       vector_distance(beg1,end1,beg2,
    79                       typename vector_distance_traits<Dist>::distance(),
     78      distance(beg1,end1,beg2,
     79                      typename distance_traits<Dist>::distance(),
    8080                      typename utility::weighted_if_any2<Iter1, Iter2>::type());
    8181  }       
  • trunk/yat/statistics/euclidean_distance.h

    r1030 r1031  
    1 #ifndef theplu_yat_statistics_euclidean_vector_distance_h
    2 #define theplu_yat_statistics_euclidean_vector_distance_h
     1#ifndef theplu_yat_statistics_euclidean_distance_h
     2#define theplu_yat_statistics_euclidean_distance_h
    33
    44// $Id$
     
    2727#include "AveragerPair.h"
    2828#include "AveragerPairWeighted.h"
    29 #include "vector_distance.h"
     29#include "distance.h"
    3030#include "yat/utility/iterator_traits.h"
    3131
     
    4141  /// the Euclidean distance measure.
    4242  ///
    43   struct euclidean_vector_distance_tag
    44     : public vector_distance_tag
     43  struct euclidean_distance_tag
     44    : public distance_tag
    4545  {
    4646    /// \brief tag for euclidean distance
    47     typedef euclidean_vector_distance_tag distance;
     47    typedef euclidean_distance_tag distance;
    4848  };
    4949
     
    5555  ///
    5656  template <typename Iter1, typename Iter2>
    57   double vector_distance(Iter1 beg1,Iter1 end1, Iter2 beg2,
    58                          const euclidean_vector_distance_tag& disttype,
     57  double distance(Iter1 beg1,Iter1 end1, Iter2 beg2,
     58                         const euclidean_distance_tag& disttype,
    5959                         utility::unweighted_type)
    6060  {
     
    7171  ///
    7272  template <typename Iter1, typename Iter2>
    73   double vector_distance(Iter1 beg1, Iter1 end1, Iter2 beg2,
    74                          const euclidean_vector_distance_tag& disttype,
     73  double distance(Iter1 beg1, Iter1 end1, Iter2 beg2,
     74                         const euclidean_distance_tag& disttype,
    7575                         utility::weighted_type)
    7676  {
  • trunk/yat/statistics/pearson_distance.h

    r1030 r1031  
    1 #ifndef theplu_yat_statistics_pearson_vector_distance_h
    2 #define theplu_yat_statistics_pearson_vector_distance_h
     1#ifndef theplu_yat_statistics_pearson_distance_h
     2#define theplu_yat_statistics_pearson_distance_h
    33
    44// $Id$
     
    2525*/
    2626
    27 #include "vector_distance.h"
     27#include "distance.h"
    2828
    2929#include "AveragerPair.h"
     
    4040  /// the Pearson distance measure.
    4141  ///
    42   struct pearson_vector_distance_tag
    43     : public vector_distance_tag
     42  struct pearson_distance_tag
     43    : public distance_tag
    4444  {
    4545    /// \brief tag for pearson distance
    46     typedef pearson_vector_distance_tag distance;
     46    typedef pearson_distance_tag distance;
    4747  };
    4848
     
    5454  ///
    5555  template <class Iter>
    56   double vector_distance(Iter beg1,Iter end1, Iter beg2,
    57                          const pearson_vector_distance_tag& disttype,
     56  double distance(Iter beg1,Iter end1, Iter beg2,
     57                         const pearson_distance_tag& disttype,
    5858                         utility::unweighted_type)
    5959  {
     
    6969  ///
    7070  template <class Iter>
    71   double vector_distance(Iter beg1,Iter end1, Iter beg2,
    72                          const pearson_vector_distance_tag& disttype,
     71  double distance(Iter beg1,Iter end1, Iter beg2,
     72                         const pearson_distance_tag& disttype,
    7373                         utility::weighted_type)
    7474  {
Note: See TracChangeset for help on using the changeset viewer.