Changeset 4339
- Timestamp:
- Apr 15, 2023, 12:35:22 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEWS
r4326 r4339 4 4 5 5 version 0.21 (released NOT YET) 6 - A number of classes no longer inherit from std::unary_function (or 7 std::binary_function), but typedef argument_type 8 (first_argument_type or second_argument_type) and result_type 9 itself instead (ticket #998). 6 10 - htslib 1.10 (or newer) is now required (ticket #991) 7 11 - GSL 2.2 (or newer) is now required (ticket #983) -
trunk/yat/omic/BamRead.h
r4207 r4339 500 500 */ 501 501 struct BamLessPos 502 : public std::binary_function<const BamRead&, const BamRead&, bool>503 502 { 503 /// first argument is a const BamRead& 504 typedef const BamRead& first_argument_type; 505 /// second argument is a const BamRead& 506 typedef const BamRead& second_argument_type; 507 /// Functor returns a \c bool 508 typedef bool result_type; 509 504 510 /** 505 511 \return true if lhs tid is less than rhs tid; or tid … … 521 527 */ 522 528 struct BamLessEnd 523 : public std::binary_function<const BamRead&, const BamRead&, bool>524 529 { 530 /// first argument is a const BamRead& 531 typedef const BamRead& first_argument_type; 532 /// second argument is a const BamRead& 533 typedef const BamRead& second_argument_type; 534 /// Functor returns a \c bool 535 typedef bool result_type; 536 525 537 /** 526 538 \return true if lhs tid is less than rhs tid; or tid … … 541 553 */ 542 554 struct BamLessName 543 : public std::binary_function<const BamRead&, const BamRead&, bool>544 555 { 556 /// first argument is a const BamRead& 557 typedef const BamRead& first_argument_type; 558 /// second argument is a const BamRead& 559 typedef const BamRead& second_argument_type; 560 /// Functor returns a bool 561 typedef bool result_type; 562 545 563 /** 546 564 \return \c true if lhs query name is less than rhs query name -
trunk/yat/omic/BamReadFilter.h
r3999 r4339 55 55 \since new in yat 0.11 56 56 */ 57 class BamReadFilter : public std::unary_function<const BamRead&, bool>57 class BamReadFilter 58 58 { 59 59 public: 60 /// Functor takes a const BamRead& 61 typedef const BamRead& argument_type; 62 /// Functor returns \c bool 63 typedef bool result_type; 64 60 65 /** 61 66 Create a functor which accepts reads with mapping quality \a -
trunk/yat/omic/BamWriteIterator.h
r4252 r4339 41 41 \since New in yat 0.10 42 42 */ 43 class BamWriter : public std::unary_function<const BamRead&, void>43 class BamWriter 44 44 { 45 45 public: 46 /// \c argument_type is const BamRead& 47 typedef const BamRead& argument_type; 48 /// Functor returns nothing 49 typedef void result_type; 50 46 51 /** 47 52 \brief Default constructor -
trunk/yat/omic/Codon.h
r3487 r4339 143 143 \since New in yat 0.7 144 144 */ 145 struct AminoAcidEqual : public std::binary_function<Codon, Codon, bool>145 struct AminoAcidEqual 146 146 { 147 /// \c first_argument_type is Codon 148 typedef Codon first_argument_type; 149 /// \c second_argument_type is Codon 150 typedef Codon second_argument_type; 151 /// \c result_type is \c bool 152 typedef bool result_type; 153 147 154 /// \return \c true \a lhs and \a rhs translates to same amino acid 148 155 bool operator()(const Codon& lhs, const Codon& rhs) const; -
trunk/yat/utility/OstreamIterator.h
r4252 r4339 41 41 /// \internal class used in OstreamIterator 42 42 template<typename T> 43 class OstreamIteratorFunc : public std::unary_function<const T&, void>43 class OstreamIteratorFunc 44 44 { 45 45 public: -
trunk/yat/utility/Segment.h
r4338 r4339 330 330 */ 331 331 template<typename T, class Compare> 332 struct SegmentCompare : 333 public std::binary_function<Segment<T,Compare>, Segment<T,Compare>, bool> 334 { 332 struct SegmentCompare 333 { 334 /// \c first_argument_type is \c Segment<T,Compare> 335 typedef Segment<T,Compare> first_argument_type; 336 /// \c second_argument_type is \c Segment<T,Compare> 337 typedef Segment<T,Compare> second_argument_type; 338 /// \c result_type is \c bool 339 typedef bool result_type; 340 335 341 /** 336 342 \see compare(const Segment<T,Compare>&, const Segment<T,Compare>&) -
trunk/yat/utility/stl_utility.h
r4324 r4339 84 84 */ 85 85 template<typename T> 86 struct abs : std::unary_function<T, T> 87 { 86 struct abs 87 { 88 /// \c argument_type is \c T 89 typedef T argument_type; 90 91 /// \c result_type is \c T 92 typedef T result_type; 93 88 94 /** 89 95 \return absolute value … … 120 126 */ 121 127 template<typename Pointer> 122 struct Dereferencer : 123 public std::unary_function<Pointer, 124 typename std::iterator_traits<Pointer>::reference> 125 { 128 struct Dereferencer 129 { 130 /// \c argument_type is \c Pointer 131 typedef Pointer argument_type; 132 /// \c result_type 133 typedef typename std::iterator_traits<Pointer>::reference result_type; 134 126 135 /** 127 136 \brief constructor … … 176 185 */ 177 186 template<class F, class G, class H> 178 class compose_f_gx_hy : 179 public std::binary_function<typename G::argument_type, 180 typename H::argument_type, 181 typename F::result_type> 187 class compose_f_gx_hy 182 188 { 183 189 public: 190 /// \c first_argument_type is G's \c argument_type 191 typedef typename G::argument_type first_argument_type; 192 /// \c second_argument_type is H's \c argument_type 193 typedef typename H::argument_type second_argument_type; 194 /// \c result_type is F's \c result_type 195 typedef typename F::result_type result_type; 196 184 197 /** 185 198 \brief default constructor … … 248 261 */ 249 262 template<class F, class G> 250 class compose_f_gxy : 251 public std::binary_function<typename G::first_argument_type, 252 typename G::second_argument_type, 253 typename F::result_type> 263 class compose_f_gxy 254 264 { 255 265 public: 266 /// \c first_argument_type is G's first_argument_type 267 typedef typename G::first_argument_type first_argument_type; 268 /// \c second_argument_type is G's second_argument_type 269 typedef typename G::second_argument_type second_argument_type; 270 /// \c result_type is F's result_type 271 typedef typename F::result_type result_type; 272 256 273 /** 257 274 \brief default constructor … … 324 341 */ 325 342 template<class F, class G> 326 class compose_f_gx : public std::unary_function<typename G::argument_type, 327 typename F::result_type> 343 class compose_f_gx 328 344 { 329 345 public: 346 /// \c argument_type is G's \c argument_type 347 typedef typename G::argument_type argument_type; 348 /// \c result_type is G's \c result_type 349 typedef typename F::result_type result_type; 350 330 351 /** 331 352 \brief default constructor … … 400 421 */ 401 422 template<class F, class G, class H> 402 class compose_f_gx_hx : public std::unary_function<typename G::argument_type, 403 typename F::result_type> 423 class compose_f_gx_hx 404 424 { 405 425 public: 426 /// \c argument_type is G's \c argument_type 427 typedef typename G::argument_type argument_type; 428 /// \c result_type is F's \c result_type 429 typedef typename F::result_type result_type; 430 406 431 /** 407 432 \brief default constructor … … 457 482 */ 458 483 template<typename T> 459 struct Exp : std::unary_function<T, T> 460 { 484 struct Exp 485 { 486 /// \c argument_type is \c T 487 typedef T argument_type; 488 /// \c result_type is \c T 489 typedef T result_type; 490 461 491 /** 462 492 \return exponentiated value … … 472 502 */ 473 503 template<typename T> 474 struct Identity : public std::unary_function<T, T> 475 { 504 struct Identity 505 { 506 /// \c argument_type is \c T 507 typedef T argument_type; 508 /// \c result_type is \c T 509 typedef T result_type; 476 510 /// \return \a arg 477 511 T operator()(T arg) const { return arg; } … … 622 656 */ 623 657 template<typename T> 624 struct less_nan : std::binary_function<T, T, bool> 625 { 658 struct less_nan 659 { 660 /// \c first_argument_type is \c T 661 typedef T first_argument_type; 662 /// \c second_argument_type is \c T 663 typedef T second_argument_type; 664 /// \c result_type is \c bool 665 typedef bool result_type; 666 626 667 /** 627 668 \return \c true if x is less than y. NaNs are treated as a number … … 645 686 template<> 646 687 struct less_nan<DataWeight> 647 : std::binary_function<DataWeight, DataWeight, bool> 648 { 688 { 689 /// \c first_argument_type is \c DataWeight 690 typedef DataWeight first_argument_type; 691 /// \c second_argument_type is \c DataWeight 692 typedef DataWeight second_argument_type; 693 /// \c result_type is \c bool 694 typedef bool result_type; 695 649 696 /** 650 697 \return less_nan<double>(x.data(), y.data()) … … 666 713 */ 667 714 template<typename T> 668 class Log : std::unary_function<T, T>715 class Log 669 716 { 670 717 public: 718 /// \c argument_type is \c T 719 typedef T argument_type; 720 /// \c result_type is \c T 721 typedef T result_type; 722 671 723 /** 672 724 Default constructor using natural base \f$ e \f$
Note: See TracChangeset
for help on using the changeset viewer.