Changeset 1716
 Timestamp:
 Jan 13, 2009, 10:21:44 PM (12 years ago)
 Location:
 trunk/yat/normalizer
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/normalizer/qQuantileNormalizer.cc
r1715 r1716 36 36 37 37 38 Partitioner::Partitioner(const utility::VectorBase& vec,39 38 qQuantileNormalizer::Partitioner::Partitioner(const utility::VectorBase& vec, 39 unsigned int N) 40 40 : average_(utility::Vector(N)), index_(utility::Vector(N)) 41 41 { … … 60 60 61 61 62 const utility::Vector& Partitioner::averages(void) const62 const utility::Vector& qQuantileNormalizer::Partitioner::averages(void) const 63 63 { 64 64 return average_; … … 66 66 67 67 68 const utility::Vector& Partitioner::index(void) const68 const utility::Vector& qQuantileNormalizer::Partitioner::index(void) const 69 69 { 70 70 return index_; … … 72 72 73 73 74 size_t Partitioner::size(void) const74 size_t qQuantileNormalizer::Partitioner::size(void) const 75 75 { 76 76 return average_.size(); 
trunk/yat/normalizer/qQuantileNormalizer.h
r1712 r1716 30 30 } 31 31 namespace 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 assigns37 the average to the mid point of each part. The midpoint is a38 double, i.e., it is not forced to be an integer index.39 */40 class Partitioner41 {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 72 32 73 33 /** … … 129 89 130 90 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 131 132 Partitioner target_; 132 133 };
Note: See TracChangeset
for help on using the changeset viewer.