Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ahFunction.H
Go to the documentation of this file.
1
2/*
3 Aleph_w
4
5 Data structures & Algorithms
6 version 2.0.0b
7 https://github.com/lrleon/Aleph-w
8
9 This file is part of Aleph-w library
10
11 Copyright (c) 2002-2026 Leandro Rabindranath Leon
12
13 Permission is hereby granted, free of charge, to any person obtaining a copy
14 of this software and associated documentation files (the "Software"), to deal
15 in the Software without restriction, including without limitation the rights
16 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 copies of the Software, and to permit persons to whom the Software is
18 furnished to do so, subject to the following conditions:
19
20 The above copyright notice and this permission notice shall be included in all
21 copies or substantial portions of the Software.
22
23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 SOFTWARE.
30*/
31
32
45// Functor implementations -*- C++ -*-
46
47/*
48 *
49 * Copyright (c) 1994
50 * Hewlett-Packard Company
51 *
52 * Permission to use, copy, modify, distribute and sell this software
53 * and its documentation for any purpose is hereby granted without fee,
54 * provided that the above copyright notice appear in all copies and
55 * that both that copyright notice and this permission notice appear
56 * in supporting documentation. Hewlett-Packard Company makes no
57 * representations about the suitability of this software for any
58 * purpose. It is provided "as is" without express or implied warranty.
59 *
60 *
61 * Copyright (c) 1996-1998
62 * Silicon Graphics Computer Systems, Inc.
63 *
64 * Permission to use, copy, modify, distribute and sell this software
65 * and its documentation for any purpose is hereby granted without fee,
66 * provided that the above copyright notice appear in all copies and
67 * that both that copyright notice and this permission notice appear
68 * in supporting documentation. Silicon Graphics makes no
69 * representations about the suitability of this software for any
70 * purpose. It is provided "as is" without express or implied warranty.
71 */
72
73# ifndef AHFUNCTION_H
74# define AHFUNCTION_H
75
76# include <utility>
77
78namespace Aleph
79{
80
81 template <class _Arg, class _Result>
83 {
86 };
87
88 template <class _Arg1, class _Arg2, class _Result>
90 {
91 typedef _Arg1 first_argument_type; // the type of the first argument
92 typedef _Arg2 second_argument_type; // the type of the second argument
93 typedef _Result result_type; // type of the return type
94 };
95
96
97 template <class _Tp>
98 struct plus : public binary_function<_Tp, _Tp, _Tp>
99 {
100 _Tp operator () (const _Tp& __x, const _Tp& __y) const noexcept
101 {
102 return __x + __y;
103 }
104 };
105
106
107 template <class _Tp>
108 struct minus : public binary_function<_Tp, _Tp, _Tp>
109 {
110 _Tp operator () (const _Tp& __x, const _Tp& __y) const noexcept
111 {
112 return __x - __y;
113 }
114 };
115
116
117 template <class _Tp>
118 struct multiplies : public binary_function<_Tp, _Tp, _Tp>
119 {
120 _Tp operator () (const _Tp& __x, const _Tp& __y) const noexcept
121 {
122 return __x * __y;
123 }
124 };
125
126
127 template <class _Tp>
128 struct divides : public binary_function<_Tp, _Tp, _Tp>
129 {
130 _Tp operator () (const _Tp& __x, const _Tp& __y) const noexcept
131 {
132 return __x / __y;
133 }
134 };
135
136
137 template <class _Tp>
138 struct modulus : public binary_function<_Tp, _Tp, _Tp>
139 {
140 _Tp operator () (const _Tp& __x, const _Tp& __y) const noexcept
141 {
142 return __x % __y;
143 }
144 };
145
146
147 template <class _Tp>
148 struct negate : public unary_function<_Tp, _Tp>
149 {
150 _Tp operator () (const _Tp& __x) const noexcept
151 {
152 return -__x;
153 }
154 };
155
156
157 template <class _Tp>
158 struct equal_to : public binary_function<_Tp, _Tp, bool>
159 {
160 bool operator () (const _Tp& __x, const _Tp& __y) const noexcept
161 {
162 return __x == __y;
163 }
164 };
165
166
167 template <class _Tp>
168 struct not_equal_to : public binary_function<_Tp, _Tp, bool>
169 {
170 bool operator()(const _Tp& __x, const _Tp& __y) const noexcept
171 {
172 return __x != __y;
173 }
174 };
175
176
177 template <class _Tp>
178 struct greater : public binary_function<_Tp, _Tp, bool>
179 {
180 bool operator () (const _Tp& __x, const _Tp& __y) const noexcept
181 {
182 return __x > __y;
183 }
184 };
185
186
187 template <class _Tp>
188 struct less : public binary_function<_Tp, _Tp, bool>
189 {
190 bool operator () (const _Tp& __x, const _Tp& __y) const noexcept
191 {
192 return __x < __y;
193 }
194 };
195
196
197 template <class _Tp>
198 struct greater_equal : public binary_function<_Tp, _Tp, bool>
199 {
200 bool operator () (const _Tp& __x, const _Tp& __y) const noexcept
201 {
202 return __x >= __y;
203 }
204 };
205
206
207 template <class _Tp>
208 struct less_equal : public binary_function<_Tp, _Tp, bool>
209 {
210 bool operator () (const _Tp& __x, const _Tp& __y) const noexcept
211 {
212 return __x <= __y;
213 }
214 };
215
216
217 template <class _Tp>
218 struct logical_and : public binary_function<_Tp, _Tp, bool>
219 {
220 bool operator () (const _Tp& __x, const _Tp& __y) const noexcept
221 {
222 return __x and __y;
223 }
224 };
225
226
227 template <class _Tp>
228 struct logical_or : public binary_function<_Tp, _Tp, bool>
229 {
230 bool operator () (const _Tp& __x, const _Tp& __y) const noexcept
231 {
232 return __x or __y;
233 }
234 };
235
236
237 template <class _Tp>
238 struct logical_not : public unary_function<_Tp, bool>
239 {
240 bool operator () (const _Tp& __x) const noexcept
241 {
242 return not __x;
243 }
244 };
245
246
247 template <class _Predicate>
249 : public unary_function <typename _Predicate::argument_type, bool>
250 {
251 protected:
252
254
255 public:
256
257 explicit unary_negate (const _Predicate& __x) : _M_pred(__x) {}
258
259 bool operator () (const typename _Predicate::argument_type& __x)
260 const noexcept
261 {
262 return not _M_pred(__x);
263 }
264 };
265
266
267 template <class _Predicate> inline
272
273
274 template <class _Predicate>
276 : public binary_function<typename _Predicate::first_argument_type,
277 typename _Predicate::second_argument_type,
278 bool>
279 {
280 protected:
281
283
284 public:
285
286 explicit binary_negate (const _Predicate& __x) : _M_pred(__x) { }
287
288 bool
289 operator () (const typename _Predicate::first_argument_type& __x,
290 const typename _Predicate::second_argument_type& __y) const
291 {
292 return not _M_pred(__x, __y);
293 }
294 };
295
296
297 template <class _Predicate> inline
302
303
304 template <class _Operation>
306 : public unary_function<typename _Operation::second_argument_type,
307 typename _Operation::result_type>
308 {
309 protected:
310
312
313 typename _Operation::first_argument_type value;
314
315 public:
316
318 const typename _Operation::first_argument_type& __y)
319 : op(__x), value(__y) {}
320
321 typename _Operation::result_type
322 operator () (const typename _Operation::second_argument_type& __x) const
323 {
324 return op (value, __x);
325 }
326
327 typename _Operation::result_type
328 operator () (typename _Operation::second_argument_type& __x) const
329 {
330 return op(value, __x);
331 }
332 };
333
334
335 template <class _Operation, class _Tp> inline
337 {
338 typedef typename _Operation::first_argument_type _Arg1_type;
339
341 }
342
343 template <class _Operation>
345 : public unary_function<typename _Operation::first_argument_type,
346 typename _Operation::result_type>
347 {
348 protected:
349
351
352 typename _Operation::second_argument_type value;
353
354 public:
355
357 const typename _Operation::second_argument_type& __y)
358 : op(__x), value (__y) {}
359
360 typename _Operation::result_type
361 operator () (const typename _Operation::first_argument_type& __x) const
362 {
363 return op (__x, value);
364 }
365
366 typename _Operation::result_type
367 operator () (typename _Operation::first_argument_type& __x) const
368 {
369 return op (__x, value);
370 }
371 };
372
373
374 template <class _Operation, class _Tp> inline
376 {
377 typedef typename _Operation::second_argument_type _Arg2_type;
378
380 }
381
382
383 template <class _Arg, class _Result>
384 class pointer_to_unary_function : public unary_function<_Arg, _Result>
385 {
386 protected:
387
389
390 public:
391
393
396
398 {
399 return _M_ptr (__x);
400 }
401 };
402
403
404 template <class _Arg, class _Result> inline
409
410
411 template <class _Arg1, class _Arg2, class _Result>
413 : public binary_function<_Arg1, _Arg2, _Result>
414 {
415 protected:
416
418
419 public:
420
422
425
427 {
428 return _M_ptr(__x, __y);
429 }
430 };
431
432
433 template <class _Arg1, class _Arg2, class _Result> inline
439
440 template <class _Tp>
441 struct _Identity : public unary_function<_Tp,_Tp>
442 {
444 {
445 return __x;
446 }
447
448 const _Tp& operator () (const _Tp& __x) const
449 {
450 return __x;
451 }
452 };
453
454 template <class _Pair>
455 struct _Select1st : public unary_function<_Pair, typename _Pair::first_type>
456 {
457 typename _Pair::first_type& operator () (_Pair& __x) const
458 {
459 return __x.first;
460 }
461
462 const typename _Pair::first_type& operator () (const _Pair& __x) const
463 {
464 return __x.first;
465 }
466 };
467
468 template <class _Pair>
469 struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type>
470 {
471 typename _Pair::second_type& operator () (_Pair& __x) const
472 {
473 return __x.second;
474 }
475
476 const typename _Pair::second_type& operator () (const _Pair& __x) const
477 {
478 return __x.second;
479 }
480 };
481
482
483 template <class _Ret, class _Tp>
484 class mem_fun_t : public unary_function<_Tp*, _Ret>
485 {
486 public:
487
488 explicit mem_fun_t (_Ret (_Tp::*__pf) () )
489 : _M_f(__pf) {}
490
492 {
493 return (__p->*_M_f)();
494 }
495
496 private:
497
498 _Ret (_Tp::*_M_f) ();
499 };
500
501
502 template <class _Ret, class _Tp>
503 class const_mem_fun_t : public unary_function<const _Tp*, _Ret>
504 {
505 public:
506
508 : _M_f (__pf) {}
509
510 _Ret operator () (const _Tp* __p) const
511 {
512 return (__p->*_M_f) ();
513 }
514
515 private:
516
518 };
519
520
521 template <class _Ret, class _Tp>
522 class mem_fun_ref_t : public unary_function<_Tp, _Ret>
523 {
524 public:
525
526 explicit mem_fun_ref_t (_Ret (_Tp::*__pf)())
527 : _M_f (__pf) {}
528
530 {
531 return (__r.*_M_f)();
532 }
533
534 private:
535
536 _Ret (_Tp::*_M_f) ();
537 };
538
539
540 template <class _Ret, class _Tp>
541 class const_mem_fun_ref_t : public unary_function<_Tp, _Ret>
542 {
543 public:
544
546 : _M_f (__pf) {}
547
548 _Ret operator () (const _Tp& __r) const
549 {
550 return (__r.*_M_f)();
551 }
552
553 private:
554
556 };
557
558
559 template <class _Ret, class _Tp, class _Arg>
560 class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret>
561 {
562 public:
563
564 explicit mem_fun1_t (_Ret (_Tp::*__pf) (_Arg))
565 : _M_f(__pf) {}
566
568 {
569 return (__p->*_M_f) (__x);
570 }
571
572 private:
573
575 };
576
577
578 template <class _Ret, class _Tp, class _Arg>
579 class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret>
580 {
581 public:
582
584 : _M_f (__pf) {}
585
587 {
588 return (__p->*_M_f)(__x);
589 }
590
591 private:
592
594 };
595
596
597 template <class _Ret, class _Tp, class _Arg>
598 class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
599 {
600 public:
601
602 explicit mem_fun1_ref_t (_Ret (_Tp::*__pf) (_Arg))
603 : _M_f (__pf) {}
604
606 {
607 return (__r.*_M_f)(__x);
608 }
609
610 private:
611
613 };
614
615
616 template <class _Ret, class _Tp, class _Arg>
617 class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret>
618 {
619 public:
620
623
625 {
626 return (__r.*_M_f)(__x);
627 }
628
629 private:
630
632 };
633
634
635 template <class _Tp>
636 class mem_fun_t<void, _Tp> : public unary_function<_Tp*, void>
637 {
638 public:
639
640 explicit mem_fun_t (void (_Tp::*__pf)())
641 : _M_f (__pf) {}
642
643 void operator () (_Tp* __p) const
644 {
645 (__p->*_M_f)();
646 }
647
648 private:
649
650 void (_Tp::*_M_f)();
651 };
652
653
654 template <class _Tp>
655 class const_mem_fun_t<void, _Tp> : public unary_function<const _Tp*, void>
656 {
657 public:
658
659 explicit const_mem_fun_t (void (_Tp::*__pf)() const)
660 : _M_f (__pf) {}
661
662 void operator () (const _Tp* __p) const
663 {
664 (__p->*_M_f)();
665 }
666
667 private:
668
670 };
671
672
673 template <class _Tp>
674 class mem_fun_ref_t<void, _Tp> : public unary_function<_Tp, void>
675 {
676 public:
677
678 explicit mem_fun_ref_t (void (_Tp::*__pf)()) : _M_f (__pf) {}
679
680 void operator () (_Tp& __r) const
681 {
682 (__r.*_M_f)();
683 }
684
685 private:
686
687 void (_Tp::*_M_f)();
688 };
689
690
691 template <class _Tp>
692 class const_mem_fun_ref_t<void, _Tp> : public unary_function<_Tp, void>
693 {
694 public:
695
696 explicit const_mem_fun_ref_t (void (_Tp::*__pf) () const)
697 : _M_f (__pf) {}
698
699 void operator () (const _Tp& __r) const
700 {
701 (__r.*_M_f) ();
702 }
703
704 private:
705
707 };
708
709
710 template <class _Tp, class _Arg>
711 class mem_fun1_t<void, _Tp, _Arg> : public binary_function<_Tp*, _Arg, void>
712 {
713 public:
714
715 explicit mem_fun1_t(void (_Tp::*__pf) (_Arg)) : _M_f (__pf) {}
716
718 {
719 (__p->*_M_f)(__x);
720 }
721
722 private:
723
725 };
726
727
728 template <class _Tp, class _Arg>
730 : public binary_function<const _Tp*, _Arg, void>
731 {
732 public:
733
734 explicit const_mem_fun1_t (void (_Tp::*__pf) (_Arg) const) : _M_f (__pf) {}
735
736 void operator () (const _Tp* __p, _Arg __x) const
737 {
738 (__p->*_M_f)(__x);
739 }
740
741 private:
742
744 };
745
746
747 template <class _Tp, class _Arg>
749 : public binary_function<_Tp, _Arg, void>
750 {
751 public:
752
753 explicit mem_fun1_ref_t (void (_Tp::*__pf) (_Arg)) : _M_f (__pf) {}
754
756 {
757 (__r.*_M_f)(__x);
758 }
759
760 private:
761
763 };
764
765
766 template <class _Tp, class _Arg>
768 : public binary_function<_Tp, _Arg, void>
769 {
770 public:
771
772 explicit const_mem_fun1_ref_t (void (_Tp::*__pf) (_Arg) const)
773 : _M_f (__pf) {}
774
775 void operator () (const _Tp& __r, _Arg __x) const
776 {
777 (__r.*_M_f) (__x);
778 }
779
780 private:
781
783 };
784
785
786 template <class _Ret, class _Tp> inline
788 {
789 return mem_fun_t<_Ret, _Tp> (__f);
790 }
791
792 template <class _Ret, class _Tp> inline
797
798 template <class _Ret, class _Tp> inline
803
804 template <class _Ret, class _Tp> inline
809
810 template <class _Ret, class _Tp, class _Arg> inline
815
816 template <class _Ret, class _Tp, class _Arg> inline
821
822 template <class _Ret, class _Tp, class _Arg> inline
827
828 template <class _Ret, class _Tp, class _Arg> inline
834
835
847 template <class T, class Compare> inline
848bool less_than(const T & op1, const T & op2, Compare & cmp)
849{
850 return cmp (op1, op2);
851}
852
853
858 template <class T, class Compare> inline
859bool less_than(const T & op1, const T & op2, Compare && cmp = Compare())
860{
862}
863
864
876 template <class T, class Compare> inline
877bool less_or_equal_than(const T& op1, const T& op2, Compare & cmp)
878{
879 if (cmp(op1, op2))
880 return true;
881
882 if (cmp(op2, op1))
883 return false;
884
885 return true;
886}
887
888
893 template <class T, class Compare> inline
894bool less_or_equal_than(const T& op1, const T& op2, Compare && cmp = Compare())
895{
897}
898
899
908 template <class T, class Compare> inline
909bool greater_than(const T& op1, const T& op2, Compare && cmp = Compare())
910{
912 std::forward<Compare>(cmp));
913}
914
919 template <class T, class Compare> inline
920bool greater_than(const T& op1, const T& op2, Compare & cmp)
921{
923}
924
933 template <class T, class Compare> inline
934bool greater_or_equal_than(const T& op1, const T & op2,
935 Compare && cmp = Compare())
936{
937 return not less_than<T, Compare> (op1, op2, std::forward<Compare>(cmp));
938}
939
944 template <class T, class Compare> inline
945bool greater_or_equal_than(const T& op1, const T& op2, Compare & cmp)
946{
948}
949
958 template <class T, class Compare> inline
959bool no_equals(const T & op1, const T & op2, Compare && cmp = Compare())
960{
961 return cmp(op1, op2) or cmp(op2, op1);
962}
963
968 template <class T, class Compare> inline
969bool no_equals(const T & op1, const T & op2, Compare & cmp)
970{
971 return cmp(op1, op2) or cmp(op2, op1);
972}
973
982 template <class T, class Compare> inline
983bool are_equals(const T & op1, const T & op2, Compare && cmp = Compare())
984{
985 return not no_equals <T, Compare> (op1, op2, std::forward<Compare>(cmp));
986}
987
992 template <class T, class Compare> inline
993bool are_equals(const T & op1, const T & op2, Compare & cmp)
994{
996}
997
1008 template <class T, class Compare>
1010{
1011 const Compare & cmp;
1012
1013public:
1014
1015 Inversed_Compare(const Compare & __cmp) noexcept : cmp(__cmp) { /* empty */ }
1016
1017 Inversed_Compare(Compare && cmp = Compare()) noexcept
1019 { /* empty */ }
1020
1021 bool operator () (const T & op1, const T & op2) const noexcept
1022 {
1023 return cmp(op2, op1);
1024 }
1025};
1026
1031 template <class T, class Compare>
1033{
1034 bool operator () (const T & op1, const T & op2) const
1035 {
1036 if (Compare () (op1, op2))
1037 return true;
1038
1039 if (Compare () (op2, op1))
1040 return false;
1041
1042 return true;
1043 }
1044};
1045
1046} // namespace Aleph
1047
1048#endif /* AHFUNCTION_H */
1049
1050
Performs order reversal of Compare by swapping operands.
Inversed_Compare(const Compare &__cmp) noexcept
const Compare & cmp
Inversed_Compare(Compare &&cmp=Compare()) noexcept
bool operator()(const T &op1, const T &op2) const noexcept
bool operator()(const typename _Predicate::first_argument_type &__x, const typename _Predicate::second_argument_type &__y) const
Definition ahFunction.H:289
binary_negate(const _Predicate &__x)
Definition ahFunction.H:286
binder1st(const _Operation &__x, const typename _Operation::first_argument_type &__y)
Definition ahFunction.H:317
_Operation::first_argument_type value
Definition ahFunction.H:313
_Operation::result_type operator()(const typename _Operation::second_argument_type &__x) const
Definition ahFunction.H:322
_Operation op
Definition ahFunction.H:311
_Operation::second_argument_type value
Definition ahFunction.H:352
_Operation::result_type operator()(const typename _Operation::first_argument_type &__x) const
Definition ahFunction.H:361
binder2nd(const _Operation &__x, const typename _Operation::second_argument_type &__y)
Definition ahFunction.H:356
_Operation op
Definition ahFunction.H:350
const_mem_fun1_ref_t(void(_Tp::*__pf)(_Arg) const)
Definition ahFunction.H:772
_Ret(_Tp::* _M_f)(_Arg) const
Definition ahFunction.H:631
const_mem_fun1_ref_t(_Ret(_Tp::*__pf)(_Arg) const)
Definition ahFunction.H:621
_Ret operator()(const _Tp &__r, _Arg __x) const
Definition ahFunction.H:624
const_mem_fun1_t(void(_Tp::*__pf)(_Arg) const)
Definition ahFunction.H:734
_Ret operator()(const _Tp *__p, _Arg __x) const
Definition ahFunction.H:586
_Ret(_Tp::* _M_f)(_Arg) const
Definition ahFunction.H:593
const_mem_fun1_t(_Ret(_Tp::*__pf)(_Arg) const)
Definition ahFunction.H:583
const_mem_fun_ref_t(void(_Tp::*__pf)() const)
Definition ahFunction.H:696
_Ret operator()(const _Tp &__r) const
Definition ahFunction.H:548
const_mem_fun_ref_t(_Ret(_Tp::*__pf)() const)
Definition ahFunction.H:545
_Ret(_Tp::* _M_f)() const
Definition ahFunction.H:555
const_mem_fun_t(void(_Tp::*__pf)() const)
Definition ahFunction.H:659
const_mem_fun_t(_Ret(_Tp::*__pf)() const)
Definition ahFunction.H:507
_Ret(_Tp::* _M_f)() const
Definition ahFunction.H:517
_Ret operator()(const _Tp *__p) const
Definition ahFunction.H:510
mem_fun1_ref_t(void(_Tp::*__pf)(_Arg))
Definition ahFunction.H:753
_Ret(_Tp::* _M_f)(_Arg)
Definition ahFunction.H:612
_Ret operator()(_Tp &__r, _Arg __x) const
Definition ahFunction.H:605
mem_fun1_ref_t(_Ret(_Tp::*__pf)(_Arg))
Definition ahFunction.H:602
mem_fun1_t(void(_Tp::*__pf)(_Arg))
Definition ahFunction.H:715
_Ret operator()(_Tp *__p, _Arg __x) const
Definition ahFunction.H:567
_Ret(_Tp::* _M_f)(_Arg)
Definition ahFunction.H:574
mem_fun1_t(_Ret(_Tp::*__pf)(_Arg))
Definition ahFunction.H:564
mem_fun_ref_t(void(_Tp::*__pf)())
Definition ahFunction.H:678
_Ret(_Tp::* _M_f)()
Definition ahFunction.H:536
_Ret operator()(_Tp &__r) const
Definition ahFunction.H:529
mem_fun_ref_t(_Ret(_Tp::*__pf)())
Definition ahFunction.H:526
mem_fun_t(void(_Tp::*__pf)())
Definition ahFunction.H:640
_Ret operator()(_Tp *__p) const
Definition ahFunction.H:491
mem_fun_t(_Ret(_Tp::*__pf)())
Definition ahFunction.H:488
_Ret(_Tp::* _M_f)()
Definition ahFunction.H:498
pointer_to_binary_function(_Result(*__x)(_Arg1, _Arg2))
Definition ahFunction.H:423
_Result(* _M_ptr)(_Arg1, _Arg2)
Definition ahFunction.H:417
_Result operator()(_Arg1 __x, _Arg2 __y) const
Definition ahFunction.H:426
pointer_to_unary_function(_Result(*__x)(_Arg))
Definition ahFunction.H:394
_Result operator()(_Arg __x) const
Definition ahFunction.H:397
unary_negate(const _Predicate &__x)
Definition ahFunction.H:257
bool operator()(const typename _Predicate::argument_type &__x) const noexcept
Definition ahFunction.H:259
int cmp(const __gmp_expr< T, U > &expr1, const __gmp_expr< V, W > &expr2)
Definition gmpfrxx.h:4118
Main namespace for Aleph-w library functions.
Definition ah-arena.H:89
mem_fun_ref_t< _Ret, _Tp > mem_fun_ref(_Ret(_Tp::*__f)())
Definition ahFunction.H:799
bool less_than(const T &op1, const T &op2, Compare &cmp)
Determines if op1 is less than op2 using a comparison operator.
Definition ahFunction.H:848
mem_fun_t< _Ret, _Tp > mem_fun(_Ret(_Tp::*__f)())
Definition ahFunction.H:787
binder2nd< _Operation > bind2nd(const _Operation &__fn, const _Tp &__x)
Definition ahFunction.H:375
std::decay_t< typename HeadC::Item_Type > T
Definition ah-zip.H:107
bool greater_than(const T &op1, const T &op2, Compare &&cmp=Compare())
Determines if op1 is greater than op2 using a comparison operator.
Definition ahFunction.H:909
unary_negate< _Predicate > not1(const _Predicate &__pred)
Definition ahFunction.H:268
bool are_equals(const T &op1, const T &op2, Compare &&cmp=Compare())
Determines if operands are equal using a comparison operator.
Definition ahFunction.H:983
pointer_to_unary_function< _Arg, _Result > ptr_fun(_Result(*__x)(_Arg))
Definition ahFunction.H:405
binder1st< _Operation > bind1st(const _Operation &__fn, const _Tp &__x)
Definition ahFunction.H:336
bool less_or_equal_than(const T &op1, const T &op2, Compare &cmp)
Determines if op1 is less than or equal to op2 using a comparison operator.
Definition ahFunction.H:877
binary_negate< _Predicate > not2(const _Predicate &__pred)
Definition ahFunction.H:298
bool greater_or_equal_than(const T &op1, const T &op2, Compare &&cmp=Compare())
Determines if op1 is greater than or equal to op2 using a comparison operator.
Definition ahFunction.H:934
DynList< T > maps(const C &c, Op op)
Classic map operation.
bool no_equals(const T &op1, const T &op2, Compare &&cmp=Compare())
Determines if operands are not equal using a comparison operator.
Definition ahFunction.H:959
bool operator()(const T &op1, const T &op2) const
_Tp & operator()(_Tp &__x) const
Definition ahFunction.H:443
_Pair::first_type & operator()(_Pair &__x) const
Definition ahFunction.H:457
_Pair::second_type & operator()(_Pair &__x) const
Definition ahFunction.H:471
_Tp operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:130
bool operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:160
bool operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:200
bool operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:180
bool operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:210
bool operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:190
bool operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:220
bool operator()(const _Tp &__x) const noexcept
Definition ahFunction.H:240
bool operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:230
_Tp operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:110
_Tp operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:140
_Tp operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:120
_Tp operator()(const _Tp &__x) const noexcept
Definition ahFunction.H:150
bool operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:170
_Tp operator()(const _Tp &__x, const _Tp &__y) const noexcept
Definition ahFunction.H:100