- Timestamp:
- Feb 22, 2008, 10:31:22 PM (16 years ago)
- Location:
- trunk/yat
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/DataLookup2D.h
r1088 r1125 129 129 /// @return sub-Lookup of the DataLookup2D 130 130 /// 131 /// @ Note Returns a dynamically allocated DataLookup2D, which has131 /// @note Returns a dynamically allocated DataLookup2D, which has 132 132 /// to be deleted by the caller to avoid memory leaks. 133 133 /// … … 138 138 /// @return sub-Lookup of the DataLookup2D 139 139 /// 140 /// @ Note Returns a dynamically allocated DataLookup2D, which has140 /// @note Returns a dynamically allocated DataLookup2D, which has 141 141 /// to be deleted by the caller to avoid memory leaks. 142 142 /// -
trunk/yat/classifier/EnsembleBuilder.h
r1121 r1125 45 45 class EnsembleBuilder 46 46 { 47 48 47 public: 48 /** 49 \brief Type of classifier that ensemble is built on. 50 */ 49 51 typedef Classifier classifier_type; 52 53 /** 54 Type of container used for storing data e.g. MatrixLookup or KernelLookup 55 */ 50 56 typedef Data data_type; 51 57 … … 72 78 73 79 /// 74 /// @ Return classifier80 /// @return classifier 75 81 /// 76 82 const Classifier& classifier(size_t i) const; 77 83 78 84 /// 79 /// @ Return Number of classifiers in ensemble85 /// @return Number of classifiers in ensemble 80 86 /// 81 87 u_long size(void) const; -
trunk/yat/classifier/Kernel.h
r1000 r1125 132 132 /// instatiate (see 'Prototype' in Design Patterns). 133 133 /// 134 /// @ Note Returns a dynamically allocated Kernel, which has134 /// @note Returns a dynamically allocated Kernel, which has 135 135 /// to be deleted by the caller to avoid memory leaks. 136 136 /// … … 143 143 /// instatiate (see 'Prototype' in Design Patterns). 144 144 /// 145 /// @ Note Returns a dynamically allocated Kernel, which has145 /// @note Returns a dynamically allocated Kernel, which has 146 146 /// to be deleted by the caller to avoid memory leaks. 147 147 /// -
trunk/yat/classifier/KernelLookup.h
r1110 r1125 76 76 const_iterator; 77 77 78 /** 79 'Read only' iterator intended to iterate over a column 80 */ 78 81 typedef const_iterator const_column_iterator; 82 83 /** 84 'Read only' iterator intended to iterate over a row 85 */ 79 86 typedef const_iterator const_row_iterator; 80 87 … … 198 205 /// \return data that KernelLookup is built upon. 199 206 /// 200 /// @ Note Returns a dynamically allocated MatrixLookup, which has207 /// @note Returns a dynamically allocated MatrixLookup, which has 201 208 /// to be deleted by the caller to avoid memory leaks. 202 209 /// … … 243 250 KernelLookup. 244 251 245 \ Note Returns a dynamically allocated KernelLookup, which has252 \note Returns a dynamically allocated KernelLookup, which has 246 253 to be deleted by the caller to avoid memory leaks. 247 254 */ … … 258 265 this was built from. 259 266 260 @ Note Returns a dynamically allocated DataLookup2D, which has267 @note Returns a dynamically allocated DataLookup2D, which has 261 268 to be deleted by the caller to avoid memory leaks. 262 269 */ … … 273 280 this was built from. 274 281 275 @ Note Returns a dynamically allocated DataLookup2D, which has282 @note Returns a dynamically allocated DataLookup2D, which has 276 283 to be deleted by the caller to avoid memory leaks. 277 284 */ … … 285 292 KernelLookup 286 293 287 \ Note Returns a dynamically allocated DataLookup2D, which has294 \note Returns a dynamically allocated DataLookup2D, which has 288 295 to be deleted by the caller to avoid memory leaks. 289 296 */ … … 298 305 \return sub-Lookup of the DataLookup2D 299 306 300 \ Note Returns a dynamically allocated DataLookup2D, which has307 \note Returns a dynamically allocated DataLookup2D, which has 301 308 to be deleted by the caller to avoid memory leaks. 302 309 */ -
trunk/yat/classifier/Kernel_MEV.h
r1000 r1125 89 89 /// instatiate (see 'Prototype' in Design Patterns). 90 90 /// 91 /// @ Note Returns a dynamically allocated Kernel, which has91 /// @note Returns a dynamically allocated Kernel, which has 92 92 /// to be deleted by the caller to avoid memory leaks. 93 93 /// … … 101 101 /// instatiate (see 'Prototype' in Design Patterns). 102 102 /// 103 /// @ Note Returns a dynamically allocated Kernel, which has103 /// @note Returns a dynamically allocated Kernel, which has 104 104 /// to be deleted by the caller to avoid memory leaks. 105 105 /// -
trunk/yat/classifier/Kernel_SEV.h
r1121 r1125 78 78 /// instatiate (see 'Prototype' in Design Patterns). 79 79 /// 80 /// @ Note Returns a dynamically allocated Kernel, which has80 /// @note Returns a dynamically allocated Kernel, which has 81 81 /// to be deleted by the caller to avoid memory leaks. 82 82 /// … … 90 90 /// instatiate (see 'Prototype' in Design Patterns). 91 91 /// 92 /// @ Note Returns a dynamically allocated Kernel, which has92 /// @note Returns a dynamically allocated Kernel, which has 93 93 /// to be deleted by the caller to avoid memory leaks. 94 94 /// -
trunk/yat/classifier/MatrixLookup.h
r1121 r1125 79 79 const_iterator; 80 80 81 /** 82 'Read only' iterator used to iterate over a column 83 */ 81 84 typedef const_iterator const_column_iterator; 85 86 /** 87 'Read only' iterator used to iterate over a row 88 */ 82 89 typedef const_iterator const_row_iterator; 83 90 … … 286 293 /// undefined. 287 294 /// 288 /// @ Note Returns a dynamically allocated DataLookup2D, which has295 /// @note Returns a dynamically allocated DataLookup2D, which has 289 296 /// to be deleted by the caller to avoid memory leaks. 290 297 /// -
trunk/yat/classifier/MatrixLookupWeighted.h
r1121 r1125 80 80 const_iterator; 81 81 82 /** 83 'Read only' iterator used to iterate over a column 84 */ 82 85 typedef const_iterator const_column_iterator; 86 87 /** 88 'Read only' iterator used to iterate over a row 89 */ 83 90 typedef const_iterator const_row_iterator; 84 91 -
trunk/yat/classifier/SVM.h
r1124 r1125 78 78 79 79 /// 80 /// 80 /// Same as copy constructor. 81 81 /// 82 82 SVM* make_classifier(void) const; -
trunk/yat/classifier/SubsetGenerator.h
r1086 r1125 52 52 { 53 53 public: 54 /** 55 type of data that is stored in SubsetGenerator 56 */ 54 57 typedef T value_type; 55 58 -
trunk/yat/classifier/SupervisedClassifier.h
r1121 r1125 71 71 /// instatiate (see 'Prototype' in Design Patterns). 72 72 /// 73 /// @ Note Returns a dynamically allocated SupervisedClassifier, which has73 /// @note Returns a dynamically allocated SupervisedClassifier, which has 74 74 /// to be deleted by the caller to avoid memory leaks. 75 75 /// -
trunk/yat/statistics/KolmogorovSmirnov.h
r1003 r1125 90 90 }; 91 91 92 /** 93 \brief output operator 94 */ 92 95 std::ostream& operator<<(std::ostream&, const KolmogorovSmirnov&); 93 96 -
trunk/yat/statistics/PearsonCorrelation.h
r1024 r1125 92 92 correlation is zero (and the data is Gaussian). 93 93 94 @ Note This function can only be used together with the94 @note This function can only be used together with the 95 95 unweighted score. 96 96 -
trunk/yat/utility/Container2DIterator.h
r1110 r1125 48 48 { 49 49 public: 50 /** 51 Tells whether iterator is weighted or not. 52 53 \see weighted_iterator_tag and unweighted_iterator_tag 54 */ 50 55 typedef typename Policy::weighted_iterator_type weighted_iterator_type; 51 56 … … 64 69 \param container iterator points to 65 70 \param row telling which row iterator points to 66 \param colu n telling which column iterator points to71 \param column telling which column iterator points to 67 72 */ 68 73 Container2DIterator(Container& container, size_t row, size_t column) … … 267 272 268 273 /** 269 Whether Container2DIterator is weighted is desiced by Policy.274 Specialization for Container2DIterator 270 275 */ 271 276 template<typename A, typename B, typename C, typename D, typename Policy> 272 277 struct weighted_iterator_traits<Container2DIterator<A, B, C, D, Policy> > { 278 /** 279 Whether Container2DIterator is weighted is desiced by Policy. 280 */ 273 281 typedef typename Policy::weighted_iterator_type type; 274 282 }; 275 283 284 /** 285 Specialization for Container2DIterator 286 */ 276 287 template<typename A, typename B, typename C, typename D, typename E> 277 288 struct iterator_traits<Container2DIterator<A, B, C, D, E> > { -
trunk/yat/utility/IteratorPolicy.h
r1092 r1125 37 37 struct IteratorPolicy 38 38 { 39 /// type returned from function data 39 40 typedef reference data_type; 41 /// type returned from function weight 40 42 typedef weight_t weight_type; 43 /** 44 returns unweighted_iterator_tag as Policy is intended to be 45 used in a unweighted iterator 46 */ 41 47 typedef unweighted_iterator_tag weighted_iterator_type; 42 48 49 /** 50 \return c(row, column) 51 */ 43 52 data_type data(const Container& c, size_t row, size_t column) const 44 53 { … … 46 55 } 47 56 57 /** 58 \return same as data 59 */ 48 60 reference dereference(const Container& c, size_t row, size_t column) const 49 61 { … … 51 63 } 52 64 65 /** 66 \return 1.0 67 */ 53 68 weight_type weight(const Container& c, size_t row, size_t column) const 54 69 { … … 65 80 struct IteratorPolicyWeighted 66 81 { 82 /// type returned from function dereference 67 83 typedef std::pair<data_t, weight_t> reference; 84 /// type returned from function data 68 85 typedef data_t data_type; 86 /// type returned from function weight 69 87 typedef weight_t weight_type; 88 /// weighted_iterator_tag as Policy is intended for weighted iterators 70 89 typedef weighted_iterator_tag weighted_iterator_type; 71 90 91 /** 92 \return data 93 */ 72 94 data_type data(const Container& c, size_t row, size_t column) const 73 95 { … … 75 97 } 76 98 99 /** 100 \return a pair in of <data, weight>. 101 */ 77 102 reference dereference(const Container& c, size_t row, size_t column) const 78 103 { … … 80 105 } 81 106 107 /** 108 \return weight 109 */ 82 110 weight_type weight(const Container& c, size_t row, size_t column) const 83 111 { -
trunk/yat/utility/Matrix.h
r1121 r1125 66 66 public: 67 67 /** 68 Mutable iterator that iterates over all elements 68 69 */ 69 70 typedef StrideIterator<double*> iterator; 70 71 71 72 /** 73 Read-only iterator that iterates over all elements 72 74 */ 73 75 typedef StrideIterator<const double*> const_iterator; 74 76 75 77 /** 78 Mutable iterator that iterates over one column 76 79 */ 77 80 typedef StrideIterator<double*> column_iterator; 78 81 79 82 /** 83 Read-only iterator that iterates over one column 80 84 */ 81 85 typedef StrideIterator<const double*> const_column_iterator; 82 86 83 87 /** 88 Mutable iterator that iterates over one row 84 89 */ 85 90 typedef StrideIterator<double*> row_iterator; 86 91 87 92 /** 93 Read-only iterator that iterates over one row 88 94 */ 89 95 typedef StrideIterator<const double*> const_row_iterator; -
trunk/yat/utility/OptionArg.h
r1000 r1125 70 70 71 71 protected: 72 /** 73 \return true if Option is required, i.e., if Option is not 74 found during parsing an exception will be thrown. 75 */ 72 76 inline bool required(void) const { return required_; } 73 77 -
trunk/yat/utility/OptionHelp.h
r1000 r1125 50 50 "h,help" (default) for having both short and long option name 51 51 \param desc string used in help display 52 \param def default value for switch53 52 */ 54 53 OptionHelp(CommandLine& cmd, std::string name="h,help", -
trunk/yat/utility/SmartPtr.h
r1050 r1125 32 32 33 33 /** 34 SmartPtr is a wrapper around a pointer. Default SmartPtr is set 35 to be owner of pointer, which implies pointer will be deleted in 36 destructor. Pointer can be shared between many SmartPtr, in which 37 case a counter is kept updated in copying and assignment telling 38 how many owners there are. When the counter reaches zero, the 39 pointer is deleted. 34 40 */ 35 41 template<typename T> -
trunk/yat/utility/StrideIterator.h
r1088 r1125 39 39 40 40 /** 41 S trideIterator is weighted if underlying iterator is weighted.41 Specialization for StrideIterator that calls underlying iterator. 42 42 */ 43 43 template <typename Iter> 44 44 struct weighted_iterator_traits<StrideIterator<Iter> > { 45 /** 46 StrideIterator is weighted if underlying iterator is weighted. 47 */ 45 48 typedef typename weighted_iterator_traits<Iter>::type type; 46 49 }; 47 50 51 /** 52 Specialization for StrideIterator using iterator_traits with base() 53 */ 48 54 template <class Iter> 49 55 struct iterator_traits<StrideIterator<Iter> > { … … 52 58 */ 53 59 double data(StrideIterator<Iter> iter) const 54 { iterator_traits<Iter> jojo; 55 return jojo.data(iter.base()); } 60 { return iterator_traits<Iter>().data(iter.base()); } 56 61 57 62 /** … … 80 85 { 81 86 public: 87 /// type of underlying iterator 82 88 typedef Iter iterator_type; 89 /// value type 83 90 typedef typename std::iterator_traits<Iter>::value_type value_type; 91 /// difference type 84 92 typedef typename std::iterator_traits<Iter>::difference_type difference_type; 93 /// reference 85 94 typedef typename std::iterator_traits<Iter>::reference reference; 95 /// pointer 86 96 typedef typename std::iterator_traits<Iter>::pointer pointer; 97 /// weighted_iterator_tag if iterator is weighted 87 98 typedef typename yat::utility::weighted_iterator_traits<Iter>::type w_type; 88 99 … … 95 106 96 107 /** 97 */ 98 // Peter, this is ugly hack to provide iteartor to const_iterator 108 Conversion from mutable iterator to const iterator. Only works 109 if underlying iterator is a pointer. 110 */ 111 // Peter, this is ugly hack to provide iterator to const_iterator 99 112 // for our gsl_iterators - solution? use Boost:iterator_adaptor 100 113 operator StrideIterator<const value_type*>() … … 118 131 119 132 /** 133 \return pointer 120 134 */ 121 135 pointer operator->() const { return &(operator*()); } -
trunk/yat/utility/VectorBase.h
r1120 r1125 119 119 const double& operator()(size_t i) const; 120 120 // Peter, remove this one 121 /// \deprecated 121 122 const double& operator[](size_t i) const; 122 123 … … 153 154 154 155 protected: 156 /// pointer to underlying GSL vector 155 157 const gsl_vector* const_vec_; 156 158 157 159 private: 158 // copy assignment no allowed160 // copy assignment not allowed 159 161 const VectorBase& operator=(const VectorBase&); 160 162 }; -
trunk/yat/utility/VectorConstView.h
r1121 r1125 50 50 modified. 51 51 52 \ Note that view vectors do not own the underlying data,52 \note that view vectors do not own the underlying data, 53 53 and a view is not valid if the vector/matrix owing the data is 54 54 deallocated. -
trunk/yat/utility/VectorMutable.h
r1120 r1125 160 160 double& operator()(size_t i); 161 161 // Peter, remove this one 162 /// \deprecated 162 163 double& operator[](size_t i); 163 164 // to allow overload from base class … … 210 211 211 212 protected: 213 /** 214 pointer to underlying GSL vector. Should always point to same 215 gsl_vector as const_vec_ in base class does. This pointer should 216 by used for mutable operations. Do not use this in const 217 functions; use const_vec_ inherited from BaseVector. 218 */ 212 219 gsl_vector* vec_; 213 220 … … 227 234 struct proxy 228 235 { 236 /// pointer to GSL vector keeping everything we need to create a 237 /// new VectorMutable from a proxy. 229 238 gsl_vector* vec_; 230 239 }; … … 247 256 248 257 /** 249 Sort the elements in the VectorMutable .258 Sort the elements in the VectorMutable \a vec 250 259 */ 251 void sort(VectorMutable& );260 void sort(VectorMutable& vec); 252 261 253 262 }}} // of namespace utility, yat, and theplu -
trunk/yat/utility/iterator_traits.h
r1115 r1125 44 44 45 45 /** 46 All iterators default to unweighted type 46 All iterators default to unweighted type. If you want your 47 iterator to behave as weighted, you need to provide a 48 specialization. 47 49 48 50 \see Iterator and StrideIterator … … 50 52 template <class T> 51 53 struct weighted_iterator_traits { 54 /** 55 All iterators default to unweighted type 56 */ 52 57 typedef unweighted_iterator_tag type; 53 58 }; … … 60 65 template <class T1, class T2> 61 66 struct unweighted_type_and { 67 /** 68 default return weighted_iterator_tag 69 */ 62 70 typedef weighted_iterator_tag type; 63 71 }; … … 69 77 template <> 70 78 struct unweighted_type_and<unweighted_iterator_tag, unweighted_iterator_tag> { 79 /** 80 return unweighted_iterator_tag 81 */ 71 82 typedef unweighted_iterator_tag type; 72 83 }; … … 79 90 template <class T1, class T2> 80 91 struct weighted_if_any2 { 92 private: 81 93 typedef typename weighted_iterator_traits<T1>::type w_type1; 82 94 typedef typename weighted_iterator_traits<T2>::type w_type2; 95 public: 96 /// return unweighted if both are unweighted 83 97 typedef typename unweighted_type_and<w_type1, w_type2>::type type; 84 98 }; … … 89 103 template <class T1, class T2, class T3> 90 104 struct weighted_if_any3 { 105 private: 91 106 typedef typename weighted_if_any2<T1, T2>::type tmp; 92 107 typedef typename weighted_iterator_traits<T3>::type w_type3; 108 public: 109 /// return unweighted if all are unweighted 93 110 typedef typename unweighted_type_and<tmp, w_type3>::type type; 94 111 };
Note: See TracChangeset
for help on using the changeset viewer.