Changeset 1716


Ignore:
Timestamp:
Jan 13, 2009, 10:21:44 PM (15 years ago)
Author:
Jari Häkkinen
Message:

Addresses #425. Made class Partitioner private.

Location:
trunk/yat/normalizer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/normalizer/qQuantileNormalizer.cc

    r1715 r1716  
    3636
    3737
    38   Partitioner::Partitioner(const utility::VectorBase& vec,
    39                            unsigned int N)
     38  qQuantileNormalizer::Partitioner::Partitioner(const utility::VectorBase& vec,
     39                                                unsigned int N)
    4040    : average_(utility::Vector(N)), index_(utility::Vector(N))
    4141  {
     
    6060
    6161
    62   const utility::Vector& Partitioner::averages(void) const
     62  const utility::Vector& qQuantileNormalizer::Partitioner::averages(void) const
    6363  {
    6464    return average_;
     
    6666
    6767
    68   const utility::Vector& Partitioner::index(void) const
     68  const utility::Vector& qQuantileNormalizer::Partitioner::index(void) const
    6969  {
    7070    return index_;
     
    7272
    7373
    74   size_t Partitioner::size(void) const
     74  size_t qQuantileNormalizer::Partitioner::size(void) const
    7575  {
    7676    return average_.size();
  • trunk/yat/normalizer/qQuantileNormalizer.h

    r1712 r1716  
    3030}
    3131namespace normalizer {
    32 
    33   /**
    34      \brief Partition a vector of data into equal sizes.
    35 
    36      The class also calculates the average of each part and assigns
    37      the average to the mid point of each part. The midpoint is a
    38      double, i.e., it is not forced to be an integer index.
    39   */
    40   class Partitioner
    41   {
    42   public:
    43     /**
    44        \brief Create the partition and perform required calculations.
    45     */
    46     Partitioner(const utility::VectorBase& vec, unsigned int N);
    47 
    48     /**
    49        \brief Return the averages for each part.
    50 
    51        \return The average vector.
    52     */
    53     const utility::Vector& averages(void) const;
    54 
    55     /**
    56        \brief Return the mid point for each partition.
    57 
    58        \return The index vector.
    59     */
    60     const utility::Vector& index(void) const;
    61 
    62     /**
    63        \return The number of parts.
    64     */
    65     size_t size(void) const;
    66 
    67   private:
    68     utility::Vector average_;
    69     utility::Vector index_;
    70   };
    71 
    7232
    7333  /**
     
    12989
    13090  private:
     91
     92  /**
     93     \brief Partition a vector of data into equal sizes.
     94
     95     The class also calculates the average of each part and assigns
     96     the average to the mid point of each part. The midpoint is a
     97     double, i.e., it is not forced to be an integer index.
     98  */
     99  class Partitioner
     100  {
     101  public:
     102    /**
     103       \brief Create the partition and perform required calculations.
     104    */
     105    Partitioner(const utility::VectorBase& vec, unsigned int N);
     106
     107    /**
     108       \brief Return the averages for each part.
     109
     110       \return The average vector.
     111    */
     112    const utility::Vector& averages(void) const;
     113
     114    /**
     115       \brief Return the mid point for each partition.
     116
     117       \return The index vector.
     118    */
     119    const utility::Vector& index(void) const;
     120
     121    /**
     122       \return The number of parts.
     123    */
     124    size_t size(void) const;
     125
     126  private:
     127    utility::Vector average_;
     128    utility::Vector index_;
     129  };
     130
     131
    131132    Partitioner target_;
    132133  };
Note: See TracChangeset for help on using the changeset viewer.