From mboxrd@z Thu Jan 1 00:00:00 1970 From: jarl@diku.dk To: gcc-gnats@gcc.gnu.org Subject: libstdc++/3158: methods are wrongly implemented private in slice_array Date: Wed, 13 Jun 2001 00:06:00 -0000 Message-id: <20010613070322.10785.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00544.html List-Id: >Number: 3158 >Category: libstdc++ >Synopsis: methods are wrongly implemented private in slice_array >Confidential: no >Severity: serious >Priority: high >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Wed Jun 13 00:06:02 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jarl Friis >Release: Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specsgcc version 2.95.2 19991024 (release) >Organization: >Environment: AMD Athlon, KLinux 2.2.16 >Description: According to Stroustrups book slice_array assignment operator should be public, but it is implemented private, which makes legal code be rejected. Output: /usr/include/g++/std/slice_array.h:92: `class slice_array & slice_array::operator =(const slice_array &)' is private simple3.cc:21: within this context >How-To-Repeat: Use the slice_array::operator=(...) >Fix: convert Right-Hand-Side slice to valarray before assigment, using valarray constructor >Release-Note: >Audit-Trail: >Unformatted: >& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p <<= __e[__i]; } template inline void _Array_augmented_shift_left (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._M_da ta); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p <<= *__q; } template inline void _Array_augmented_shift_left (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp* __p =__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p <<= *__q; } template void _Array_augmented_shift_left (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p <<= __e[__i]; } template inline void _Array_augmented_shift_left (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n ; ++__j, ++__q) __a._M_data[*__j] <<= *__q; } template inline void _Array_augmented_shift_left (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) *__p <<= __b._M_data[*__j]; } template void _Array_augmented_shift_left (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++_ _k, ++__j) __a._M_data[*__j] <<= __e[__k]; } template void _Array_augmented_shift_left (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._ M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p <<= *__q; } } template void _Array_augmented_shift_left (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q (__b._M_data ); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p <<= *__q; } } template void _Array_augmented_shift_left (_Array<_Tp> __a, _Array __m, const _Expr<_Dom, _Tp>& _ _e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p <<= __e[__i]; } } template inline void _Array_augmented_shift_right (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p >>= __t; } template inline void _Array_augmented_shift_right (_Ar ray<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p >>= *__q; } template void _Array_augmented_shift_right (_Array<_Tp> __a, const _Expr<_Dom, _Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p >>= __e[__i]; } template inline void _Array_augmented_shift_right (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._ M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p >>= *__q; } template inline void _Array_augmented_shift_right (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp * __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p >>= *__q; } template void _Array_augmented_shift_right (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t _ _i=0; __i<__n; ++__i, __p+=__s) *__p >>= __e[__i]; } template inline void _Array_augmented_shift_right (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_d ata+__n; ++__j, ++__q) __a._M_data[*__j] >>= *__q; } template inline void _Array_augmented_shift_right (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_d ata+__n; ++__j, ++__p) *__p >>= __b._M_data[*__j]; } template void _Array_augmented_shift_right (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k <__n; ++__k, ++__j) __a._M_data[*__j] >>= __e[__k]; } template void _Array_augmented_shift_right (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p >>= *__q; } } template void _Array_augmented_shift_right (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q ( __b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p >>= *__q; } } template void _Array_augmented_shift_right (_Array<_Tp> __a, _Array __m, const _Expr<_ Dom, _Tp>& __e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p >>= __e[__i]; } } } # 1 "/usr/include/g++/std/valarray_array.tcc" 1 3 extern "C++" { template void __valarray_fill (_Array<_Tp> __a, size_t __n, _Array __m, const _Tp& __t) { _Tp* __p = __a._M_data; bool* __ok (__m._M_data); for (size_t __i=0; __i<__n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p = __t; } } template void __valarray_copy (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { _Tp* __p (__a._M_data); bool* __ok (__m._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__q = *__p; } } template void __valarray_copy (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { _Tp* __q (__b._M_data); bool* __ok (__m._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++__ok, ++__q) { while (! *__ok) { ++__ok; ++__q; } *__q = *__p; } } template void __valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p = __e[__i]; } template void __valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a, size_t __s) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p = __e[__i]; } template void __valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a, _Array __i) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] = __e[__k]; } template void __valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a, _Array __m) { bool* __ok (__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__ok, ++__p) { while (! *__ok) { ++__ok; ++__p; } *__p = __e[__i]; } } } # 339 "/usr/include/g++/std/valarray_array.h" 2 3 # 112 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/std/valarray_meta.h" 1 3 template class _Constant; template class _UnFunBase { public: typedef typename _Dom::value_type value_type; typedef value_type _Vt; _UnFunBase (const _Dom& __e, _Vt __f(_Vt)) : _M_expr(__e), _M_func(__f) {} _Vt operator[] (size_t __i) const { return _M_func(_M_expr[__i]); } size_t size () const { return _M_expr.size(); } private: const _Dom& _M_expr; _Vt (*_M_func)(_Vt); }; template class _Meta, class _Dom> class _UnFunClos; template struct _UnFunClos<_Expr,_Dom> : _UnFunBase<_Dom> { typedef _UnFunBase<_Dom> _Base; typedef typename _Base::value_type value_type; _UnFunClos (const _Dom& __e, value_type __f(value_type)) : _Base (__e, __f) {} }; template struct _UnFunClos<_ValArray,_Tp> : _UnFunBase > { typedef _UnFunBase > _Base; typedef typename _Base::value_type value_type; _UnFunClos (const valarray<_Tp>& __v, _Tp __f(_Tp)) : _Base (__v, __f) {} }; template class _Meta1, template class Meta2, class _Dom1, class _Dom2> class _BinFunClos; template class _BinFunBase { public: typedef typename _Dom1::value_type value_type; typedef value_type _Vt; _BinFunBase (const _Dom1& __e1, const _Dom2& __e2, _Vt __f (_Vt, _Vt)) : _M_expr1 (__e1), _M_expr2 (__e2), _M_func (__f) {} value_type operator[] (size_t __i) const { return _M_func (_M_expr1[__i], _M_expr2[__i]); } size_t size () const { return _M_expr1.size (); } private: const _Dom1& _M_expr1; const _Dom2& _M_expr2; _Vt (*_M_func)(_Vt, _Vt); }; template class _BinFunBase1 { public: typedef typename _Dom::value_type value_type ; typedef value_type _Vt; _BinFunBase1 (const _Vt& __c, const _Dom& __e, _Vt __f(_Vt, _Vt)) : _M_expr1 (__c), _M_expr2 (__e), _M_func (__f) {} value_type operator[] (size_t __i) const { return _M_func (_M_expr1, _M_expr2[__i]); } size_t size () const { return _M_expr2.size (); } private: const _Vt& _M_expr1; const _Dom& _M_expr2; _Vt (*_M_func)(_Vt, _Vt); }; template class _BinFunBase2 { public: typedef typename _Dom::value_type value_type; typedef value_type _Vt; _BinFunBase2 (const _Dom& __e, const _Vt& __c, _Vt __f(_Vt, _Vt)) : _M_expr1 (__e), _M_expr2 (__c), _M_func (__f) {} value_type operator[] (size_t __i) const { return _M_func (_M_expr1[__i], _M_expr2); } size_t size () const { return _M_expr1.size (); } private: const _Dom& _M_expr1; const _Vt& _M_expr2; _Vt (*_M_func)(_Vt, _Vt); }; template struct _BinFunClos<_Expr,_Expr,_Dom1,_Dom2> : _BinFunBase<_Dom1,_Dom2> { typedef _BinFunBase<_Dom1,_Dom2> _Base; typedef typename _Base::value_type value_type; typedef value_type _Tp; _BinFunClos (const _Dom1& __e1, const _Dom2& __e2, _Tp __f(_Tp, _Tp)) : _Base (__e1, __e2, __f) {} }; template struct _BinFunClos<_ValArray,_ValArray,_Tp,_Tp> : _BinFunBase, valarray<_Tp> > { typedef _BinFunBase, valarray<_Tp> > _Base; typedef _Tp value_type; _BinFunClos (const valarray<_Tp>& __v, const valarray<_Tp>& __w, _Tp __f(_Tp, _Tp)) : _Base (__v, __w, __f) {} }; template struct _BinFunClos<_Expr,_ValArray,_Dom,typename _Dom::value_type> : _BinFunBase<_Dom,valarray > { typedef typename _Dom::value_type _Tp; typedef _BinFunBase<_Dom,valarray<_Tp> > _Base; typedef _Tp value_type; _BinFunClos (const _Dom& __e, const valarray<_Tp>& __v, _Tp __f(_Tp, _Tp)) : _Base (__e, __v, __f) {} }; template struct _BinFunClos<_ValArray,_Expr,typename _Dom::value_type,_Dom> : _BinFunBase,_Dom> { typedef typename _Dom::value_type _Tp; typedef _BinFunBase<_Dom,valarray<_Tp> > _Base; typedef _Tp value_type; _BinFunClos (const valarray<_Tp>& __v, const _Dom& __e, _Tp __f(_Tp, _Tp)) : _Base (__v, __e, __f) {} }; template struct _BinFunClos<_Expr,_Constant,_Dom,typename _Dom::value_type> : _BinFunBase2<_Dom> { typedef typename _Dom::value_type _Tp; typedef _Tp value_type; typedef _BinFunBase2<_Dom> _Base; _BinFunClos (const _Dom& __e, const _Tp& __t, _Tp __f (_Tp, _Tp)) : _Base (__e, __t, __f) {} }; template struct _BinFunClos<_Constant,_Expr,_Dom,typename _Dom::value_type> : _BinFunBase1<_Dom> { typedef typename _Dom::value_type _Tp; typedef _Tp value_type; typedef _BinFunBase1<_Dom> _Base; _BinFunClos (const _Tp& __t, const _Dom& __e, _Tp __f (_Tp, _Tp)) : _Base (__t, __e, __f) {} }; template struct _BinFunClos<_ValArray,_Constant,_Tp,_Tp> : _BinFunBase2 > { typedef _BinFunBase2 > _Base; typedef _Tp value_type; _BinFunClos (const valarray<_Tp>& __v, const _Tp& __t, _Tp __f(_Tp, _Tp)) : _Base (__v, __t, __f) {} }; template struct _BinFunClos<_Constant,_ValArray,_Tp,_Tp> : _BinFunBase1 > { typedef _BinFunBase1 > _Base; typedef _Tp value_type; _BinFunClos (const _Tp& __t, const valarray<_Tp>& __v, _Tp __f (_Tp, _Tp)) : _Base (__t, __v, __f) {} }; template class _FunBase { public: typedef typename _Dom::value_type value_type; _FunBase (const _Dom& __e, value_type __f(_Arg)) : _M_expr (__e), _M_func (__f) {} value_type operator[] (size_t __i) const { return _M_func (_M_expr[__i]); } size_t size() const { return _M_expr.size ();} private: const _Dom& _M_expr; value_type (*_M_func)(_Arg); }; template struct _ValFunClos<_Expr,_Dom> : _FunBase<_Dom, typename _Dom::value_type> { typedef _FunBase<_Dom, typename _Dom::value_type> _Base; typedef typename _Base::value_type value_type; typedef value_type _Tp; _ValFunClos (const _Dom& __e, _Tp __f (_Tp)) : _Base (__e, __f) {} }; template struct _ValFunClos<_ValArray,_Tp> : _FunBase, _Tp> { typedef _FunBase, _Tp> _Base; typedef _Tp value_type; _ValFunClos (const valarray<_Tp>& __v, _Tp __f(_Tp)) : _Base (__v, __f) {} }; template struct _RefFunClos<_Expr,_Dom> : _FunBase<_Dom, const typename _Dom::value_type&> { typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base; typedef typename _Base::value_type value_type; typedef value_type _Tp; _RefFunClos (const _Dom& __e, _Tp __f (const _Tp&)) : _Base (__e, __f) {} }; template struct _RefFunClos<_ValArray,_Tp> : _FunBase, const _Tp&> { typedef _FunBase, const _Tp&> _Base; typedef _Tp value_type; _RefFunClos (const valarray<_Tp>& __v, _Tp __f(const _Tp&)) : _Base (__v, __f) {} }; template class _Oper, typename _Arg> class _UnBase { public: typedef _Oper _Op; typedef typename _Op::result_type value_type; _UnBase (const _Arg& __e) : _M_expr(__e) {} value_type operator[] (size_t) const; size_t size () const { return _M_expr.size (); } private: const _Arg& _M_expr; }; template class _Oper, typename _Arg> inline typename _UnBase<_Oper, _Arg>::value_type _UnBase<_Oper, _Arg>::operator[] (size_t __i) const { return _Op() (_M_expr[__i]); } template class _Oper, class _Dom> struct _UnClos<_Oper, _Expr, _Dom> : _UnBase<_Oper, _Dom> { typedef _Dom _Arg; typedef _UnBase<_Oper, _Dom> _Base; typedef typename _Base::value_type value_type; _UnClos (const _Arg& __e) : _Base(__e) {} }; template class _Oper, typename _Tp> struct _UnClos<_Oper, _ValArray, _Tp> : _UnBase<_Oper, valarray<_Tp> > { typedef valarray<_Tp> _Arg; typedef _UnBase<_Oper, valarray<_Tp> > _Base; typedef typename _Base::value_type value_type; _UnClos (const _Arg& __e) : _Base(__e) {} }; template class _Oper, typename _FirstArg, typename _SecondArg> class _BinBase { public: typedef _Oper _Op; typedef typename _Op::result_type value_type; _BinBase (const _FirstArg& __e1, const _SecondArg& __e2) : _M_expr1 (__e1), _M_expr2 (__e2) {} value_type operator[] (size_t) const; size_t size () const { return _M_expr1.size (); } private: const _FirstArg& _M_expr1; const _SecondArg& _M_expr2; }; template class _Oper, typename _FirstArg, typename _SecondArg> inline typename _BinBase<_Oper,_FirstArg,_SecondArg>::value_type _BinBase<_Oper,_FirstArg,_SecondArg>::operator[] (size_t __i) const { return _Op() (_M_expr1[__i], _M_expr2[__i]); } template class _Oper, class _Clos> class _BinBase2 { public: typedef typename _Clos::value_type _Vt; typedef _Oper<_Vt> _Op; typedef typename _Op::result_type value_type; _BinBase2 (const _Clos& __e, const _Vt& __t) : _M_expr1 (__e), _M_expr2 (__t) {} value_type operator[] (size_t) const; size_t size () const { return _M_expr1.size (); } private: const _Clos& _M_expr1; const _Vt& _M_expr2; }; template class _Oper, class _Clos> inline typename _BinBase2<_Oper,_Clos>::value_type _BinBase2<_Oper,_Clos>::operator[] (size_t __i) const { return _Op() (_M_expr1[__i], _M_expr2); } template class _Oper, class _Clos> class _BinBase1 { public: typedef typename _Clos::value_type _Vt; typedef _Oper<_Vt> _Op; typedef typename _Op::result_type value_type; _BinBase1 (const _Vt& __t, const _Clos& __e) : _M_expr1 (__t), _M_expr2 (__e) {} value_type operator[] (size_t) const; size_t size () const { return _M_expr2.size (); } private: const _Vt& _M_expr1; const _Clos& _M_expr2; }; template class _Oper, class _Clos> inline typename _BinBase1<_Oper,_Clos>::value_type _BinBase1<_Oper,_Clos>:: operator[] (size_t __i) const { return _Op() (_M_expr1, _M_expr2[__i]); } template class _Oper, class _Dom1, class _Dom2> struct _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2> : _BinBase<_Oper,_Dom1,_Dom2> { typedef _BinBase<_Oper,_Dom1,_Dom2> _Base; typedef typename _Base::value_type value_type; _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {} }; template class _Oper, typename _Tp> struct _BinClos<_Oper,_ValArray,_ValArray,_Tp,_Tp> : _BinBase<_Oper,valarray<_Tp>,valarray<_Tp> > { typedef _BinBase<_Oper,valarray<_Tp>,valarray<_Tp> > _Base; typedef _Tp value_type; _BinClos (const valarray<_Tp>& __v, const valarray<_Tp>& __w) : _Base (__v, __w) {} }; template class _Oper, class _Dom> struct _BinClos<_Oper,_Expr,_ValArray,_Dom,typename _Dom::value_type> : _BinBase<_Oper,_Dom,valarray > { typedef typename _Dom::value_type _Tp; typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base; typedef typename _Base::value_type value_type; _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2) : _Base (__e1, __e2) {} }; template class _Oper, class _Dom> struct _BinClos<_Oper,_ValArray,_Expr,typename _Dom::value_type,_Dom> : _BinBase<_Oper,valarray,_Dom> { typedef typename _Dom::value_type _Tp; typedef _BinBase<_Oper,valarray<_Tp>,_Dom> _Base; typedef typename _Base::value_type value_type; _BinClos (const valarray<_Tp>& __e1, const _Dom& __e2) : _Base (__e1, __e2) {} }; template class _Oper, class _Dom> struct _BinClos<_Oper,_Expr,_Constant,_Dom,typename _Dom::value_type> : _BinBase2<_Oper,_Dom> { typedef typename _Dom::value_type _Tp; typedef _BinBase2<_Oper,_Dom> _Base; typedef typename _Base::value_type value_type; _BinClos (const _Dom& __e1, const _Tp& __e2) : _Base (__e1, __e2) {} }; template class _Oper, class _Dom> struct _BinClos<_Oper,_Constant,_Expr,typename _Dom::value_type,_Dom> : _BinBase1<_Oper,_Dom> { typedef typename _Dom::value_type _Tp; typedef _BinBase1<_Oper,_Dom> _Base; typedef typename _Base::value_type value_type; _BinClos (const _Tp& __e1, const _Dom& __e2) : _Base (__e1, __e2) {} }; template class _Oper, typename _Tp> struct _BinClos<_Oper,_ValArray,_Constant,_Tp,_Tp> : _BinBase2<_Oper,valarray<_Tp> > { typedef _BinBase2<_Oper,valarray<_Tp> > _Base; typedef typename _Base::value_type value_type; _BinClos (const valarray<_Tp>& __v, const _Tp& __t) : _Base (__v, __t) {} }; template class _Oper, typename _Tp> struct _BinClos<_Oper,_Constant,_ValArray,_Tp,_Tp> : _BinBase1<_Oper,valarray<_Tp> > { typedef _BinBase1<_Oper,valarray<_Tp> > _Base; typedef typename _Base::value_type value_type; _BinClos (const _Tp& __t, const valarray<_Tp>& __v) : _Base (__t, __v) {} }; template class _SBase { public: typedef typename _Dom::value_type value_type; _SBase (const _Dom& __e, const slice& __s) : _M_expr (__e), _M_slice (__s) {} value_type operator[] (size_t __i) const { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; } size_t size() const { return _M_slice.size (); } private: const _Dom& _M_expr; const slice& _M_slice; }; template class _SBase<_Array<_Tp> > { public: typedef _Tp value_type; _SBase (_Array<_Tp> __a, const slice& __s) : _M_array (__a._M_data+__s.start()), _M_size (__s.size()), _M_stride (__s.stride()) {} value_type operator[] (size_t __i) const { return _M_array._M_data[__i * _M_stride]; } size_t size() const { return _M_size; } private: const _Array<_Tp> _M_array; const size_t _M_size; const size_t _M_stride; }; template struct _SClos<_Expr,_Dom> : _SBase<_Dom> { typedef _SBase<_Dom> _Base; typedef typename _Base::value_type value_type; _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {} }; template struct _SClos<_ValArray,_Tp> : _SBase<_Array<_Tp> > { typedef _SBase<_Array<_Tp> > _Base; typedef _Tp value_type; _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {} }; template class _GBase { public: typedef typename _Dom::value_type value_type; _GBase (const _Dom& __e, const valarray& __i) : _M_expr (__e), _M_index(__i) {} value_type operator[] (size_t __i) const { return _M_expr[_M_index[__i]]; } size_t size () const { return _M_index.size(); } private: const _Dom& _M_expr; const valarray& _M_index; }; template class _GBase<_Array<_Tp> > { public: typedef _Tp value_type; _GBase (_Array<_Tp> __a, const valarray& __i) : _M_array (__a), _M_index(__i) {} value_type operator[] (size_t __i) const { return _M_array._M_data[_M_index[__i]]; } size_t size () const { return _M_index.size(); } private: const _Array<_Tp> _M_array; const valarray& _M_index; }; template struct _GClos<_Expr,_Dom> : _GBase<_Dom> { typedef _GBase<_Dom> _Base; typedef typename _Base::value_type value_type; _GClos (const _Dom& __e, const valarray& __i) : _Base (__e, __i) {} }; template struct _GClos<_ValArray,_Tp> : _GBase<_Array<_Tp> > { typedef _GBase<_Array<_Tp> > _Base; typedef typename _Base::value_type value_type; _GClos (_Array<_Tp> __a, const valarray& __i) : _Base (__a, __i) {} }; template class _IBase { public: typedef typename _Dom::value_type value_type; _IBase (const _Dom& __e, const valarray& __i) : _M_expr (__e), _M_index (__i) {} value_type operator[] (size_t __i) const { return _M_expr[_M_index[__i]]; } size_t size() const { return _M_index.size(); } private: const _Dom& _M_expr; const valarray& _M_index; }; template struct _IClos<_Expr,_Dom> : _IBase<_Dom> { typedef _IBase<_Dom> _Base; typedef typename _Base::value_type value_type; _IClos (const _Dom& __e, const valarray& __i) : _Base (__e, __i) {} }; template struct _IClos<_ValArray,_Tp> : _IBase > { typedef _IBase > _Base; typedef _Tp value_type; _IClos (const valarray<_Tp>& __a, const valarray& __i) : _Base (__a, __i) {} }; template class _Expr { public: typedef _Tp value_type; _Expr (const _Clos&); const _Clos& operator() () const; value_type operator[] (size_t) const; valarray operator[] (slice) const; valarray operator[] (const gslice&) const; valarray operator[] (const valarray&) const; valarray operator[] (const valarray&) const; _Expr<_UnClos<_Unary_plus,_Expr,_Clos>, value_type> operator+ () const; _Expr<_UnClos, value_type> operator- () const; _Expr<_UnClos<_Bitwise_not,_Expr,_Clos>, value_type> operator~ () const; _Expr<_UnClos, bool> operator! () const; size_t size () const; value_type sum () const; valarray shift (int) const; valarray cshift (int) const; private: const _Clos _M_closure; }; template inline _Expr<_Clos,_Tp>::_Expr (const _Clos& __c) : _M_closure(__c) {} template inline const _Clos& _Expr<_Clos,_Tp>::operator() () const { return _M_closure; } template inline _Tp _Expr<_Clos,_Tp>::operator[] (size_t __i) const { return _M_closure[__i]; } template inline valarray<_Tp> _Expr<_Clos,_Tp>::operator[] (slice __s) const { return _M_closure[__s]; } template inline valarray<_Tp> _Expr<_Clos,_Tp>::operator[] (const gslice& __gs) const { return _M_closure[__gs]; } template inline valarray<_Tp> _Expr<_Clos,_Tp>::operator[] (const valarray& __m) const { return _M_closure[__m]; } template inline valarray<_Tp> _Expr<_Clos,_Tp>::operator[] (const valarray& __i) const { return _M_closure[__i]; } template inline size_t _Expr<_Clos,_Tp>::size () const { return _M_closure.size (); } template inline _Tp _Expr<_Clos,_Tp>::sum () const { _Tp __s(_Tp()); size_t __n (_M_closure.size ()); for (size_t __i=0; __i<__n; ++__i) __s += _M_closure[__i]; return __s; } template inline _Tp min (const _Expr<_Dom,_Tp>& __e) { size_t __s (__e.size ()); _Tp __m (__e[0]); for (size_t __i=1; __i<__s; ++__i) if (__m > __e[__i]) __m = __e[__i]; return __m; } template inline _Tp max (const _Expr<_Dom,_Tp>& __e) { size_t __s (__e.size()); _Tp __m (__e[0]); for (size_t __i=1; __i<__s; ++__i) if (__m < __e[__i]) __m = __e[__i]; return __m; } template inline _Expr<_UnClos, bool> _Expr<_Dom,_Tp>::operator! () const { typedef _UnClos _Closure; return _Expr<_Closure,_Tp> (_Closure(this->_M_closure)); } template inline _Expr<_UnClos< _Unary_plus ,_Expr,_Dom>,_Tp> _Expr<_Dom,_Tp>::operator+ () const { typedef _UnClos< _Unary_plus ,_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp> (_Closure (this->_M_closure)); } template inline _Expr<_UnClos< negate ,_Expr,_Dom>,_Tp> _Expr<_Dom,_Tp>::operator- () const { typedef _UnClos< negate ,_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp> (_Closure (this->_M_closure)); } template inline _Expr<_UnClos< _Bitwise_not ,_Expr,_Dom>,_Tp> _Expr<_Dom,_Tp>::operator~ () const { typedef _UnClos< _Bitwise_not ,_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp> (_Closure (this->_M_closure)); } # 831 "/usr/include/g++/std/valarray_meta.h" 3 template inline _Expr<_BinClos< plus ,_Expr,_Expr,_Dom1,_Dom2>, typename plus ::result_type> operator+ (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2::va lue_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename plus <_Arg>::result_type _Value; typedef _BinClos< plus ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __w ())); } template i nline _Expr<_BinClos< plus ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename plus ::result_type> operator+ (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename plus <_Arg>::result_type _Value; typedef _BinClos< plus ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __t)); } template inline _Expr<_BinClos< plus ,_Consta nt,_Expr,typename _Dom::value_type,_Dom>, typename plus ::result_type> operator+ (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef type name plus <_Arg>::result_type _Value; typedef _BinClos< plus ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< plus ,_Expr,_ValArray,_Dom,typename _Dom::value_t ype>, typename plus ::result_type> operator+ (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Arg; typedef typename plus <_Arg>::result _type _Value; typedef _BinClos< plus ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< plus ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, typename plus ::result_type> operator+ (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename plus <_Tp>::result_type _Value; typedef _BinC los< plus ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< minus ,_Expr,_Expr,_Dom1,_Dom2>, typename minus ::result_type> operator- (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2:: value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename minus <_Arg>::result_type _Value; typedef _BinClos< minus ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< minus ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename minus ::result_type> operator- (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef ty pename _Dom::value_type _Arg; typedef typename minus <_Arg>::result_type _Value; typedef _BinClos< minus ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __t)); } template inline _Expr<_BinClos< minus ,_Constant,_Expr,typename _Dom::value_type,_Dom>, typename minus ::result_type> operator- (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; ty pedef typename minus <_Arg>::result_type _Value; typedef _BinClos< minus ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< minus ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, typename minus ::result_type> operator- (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Arg; typedef typename minus <_Arg>::result_type _Value; typedef _BinClos< minus ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< minus ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, ty pename minus ::result_type> operator- (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename minus <_Tp>::result_type _V alue; typedef _BinClos< minus ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< multiplies ,_Expr,_Expr,_Dom1,_Dom2>, typename multiplies ::result_type> operator* (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typena me _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename multiplies <_Arg>::result_type _Value; typedef _BinClos< multiplies ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< multiplies ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename multiplies ::result_type> operator* (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom: :value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename multiplies <_Arg>::result_type _Value; typedef _BinClos< multiplies ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __t)); } template inline _Expr<_BinClos< multiplies ,_Constant,_Expr,typename _Dom::value_type,_Dom>, typename multiplies ::result_type> operator* (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename multiplies <_Arg>::result_type _Value; typedef _BinClos< multiplies ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ())); } template i nline _Expr<_BinClos< multiplies ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, typename multiplies ::result_type> operator* (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& _ _v) { typedef typename _Dom::value_type _Arg; typedef typename multiplies <_Arg>::result_type _Value; typedef _BinClos< multiplies ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } template in line _Expr<_BinClos< multiplies ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, typename multiplies ::result_type> operator* (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __ e) { typedef typename _Dom::value_type _Tp; typedef typename multiplies <_Tp>::result_type _Value; typedef _BinClos< multiplies ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< divides ,_Expr,_Expr,_Dom1,_Dom2>, typename divides ::result_type> operator/ (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Do m2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename divides <_Arg>::result_type _Value; typedef _BinClos< divides ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< divides ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename divides ::result_type> operator/ (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename divides <_Arg>::result_type _Value; typedef _BinClos< divides ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __t)); } template inline _Expr< _BinClos< divides ,_Constant,_Expr,typename _Dom::value_type,_Dom>, typename divides ::result_type> operator/ (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom: :value_type _Arg; typedef typename divides <_Arg>::result_type _Value; typedef _BinClos< divides ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< divides ,_Exp r,_ValArray,_Dom,typename _Dom::value_type>, typename divides ::result_type> operator/ (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _A rg; typedef typename divides <_Arg>::result_type _Value; typedef _BinClos< divides ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< divides ,_ValArray,_Expr,t ypename _Dom::value_type,_Dom>, typename divides ::result_type> operator/ (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef ty pename divides <_Tp>::result_type _Value; typedef _BinClos< divides ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< modulus ,_Expr,_Expr,_Dom1,_Dom2>, typename modulus ::result_type> operator% (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Do m2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename modulus <_Arg>::result_type _Value; typedef _BinClos< modulus ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< modulus ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename modulus ::result_type> operator% (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename modulus <_Arg>::result_type _Value; typedef _BinClos< modulus ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __t)); } template inline _Expr< _BinClos< modulus ,_Constant,_Expr,typename _Dom::value_type,_Dom>, typename modulus ::result_type> operator% (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom: :value_type _Arg; typedef typename modulus <_Arg>::result_type _Value; typedef _BinClos< modulus ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< modulus ,_Exp r,_ValArray,_Dom,typename _Dom::value_type>, typename modulus ::result_type> operator% (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _A rg; typedef typename modulus <_Arg>::result_type _Value; typedef _BinClos< modulus ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< modulus ,_ValArray,_Expr,t ypename _Dom::value_type,_Dom>, typename modulus ::result_type> operator% (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef ty pename modulus <_Tp>::result_type _Value; typedef _BinClos< modulus ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< _Bitwise_xor ,_Expr,_Expr,_Dom1,_Dom2>, typename _Bitwise_xor ::result_type> operator^ (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,ty pename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename _Bitwise_xor <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_xor ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __ w ())); } template inline _Expr<_BinClos< _Bitwise_xor ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename _Bitwise_xor ::result_type> operator^ (const _Expr<_Dom,typename _Dom::value_type>& __v, const ty pename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename _Bitwise_xor <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_xor ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __t )); } template inline _Expr<_BinClos< _Bitwise_xor ,_Constant,_Expr,typename _Dom::value_type,_Dom>, typename _Bitwise_xor ::result_type> operator^ (const typename _Dom::value_type& __t, const _Expr<_Dom,typenam e _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Bitwise_xor <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_xor ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< _Bitwise_xor ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, typename _Bitwise_xor ::result_type> operator^ (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Bitwise_xor <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_xor ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< _Bitwise_xor ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, typename _Bitwise_xor ::result_type> operator^ (const valarray& __v, const _Expr <_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename _Bitwise_xor <_Tp>::result_type _Value; typedef _BinClos< _Bitwise_xor ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< _Bitwise_and ,_Expr,_Expr,_Dom1,_Dom2>, typename _Bitwise_and ::result_type> operator& (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,ty pename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename _Bitwise_and <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_and ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __ w ())); } template inline _Expr<_BinClos< _Bitwise_and ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename _Bitwise_and ::result_type> operator& (const _Expr<_Dom,typename _Dom::value_type>& __v, const ty pename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename _Bitwise_and <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_and ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __t )); } template inline _Expr<_BinClos< _Bitwise_and ,_Constant,_Expr,typename _Dom::value_type,_Dom>, typename _Bitwise_and ::result_type> operator& (const typename _Dom::value_type& __t, const _Expr<_Dom,typenam e _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Bitwise_and <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_and ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< _Bitwise_and ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, typename _Bitwise_and ::result_type> operator& (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Bitwise_and <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_and ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< _Bitwise_and ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, typename _Bitwise_and ::result_type> operator& (const valarray& __v, const _Expr <_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename _Bitwise_and <_Tp>::result_type _Value; typedef _BinClos< _Bitwise_and ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< _Bitwise_or ,_Expr,_Expr,_Dom1,_Dom2>, typename _Bitwise_or ::result_type> operator| (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,type name _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename _Bitwise_or <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_or ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __w () )); } template inline _Expr<_BinClos< _Bitwise_or ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename _Bitwise_or ::result_type> operator| (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename _Bitwise_or <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_or ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __t)); } te mplate inline _Expr<_BinClos< _Bitwise_or ,_Constant,_Expr,typename _Dom::value_type,_Dom>, typename _Bitwise_or ::result_type> operator| (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::va lue_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Bitwise_or <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_or ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< _Bitwise_or ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, typename _Bitwise_or ::result_type> operator| (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Bitwise_or <_Arg>::result_type _Value; typedef _BinClos< _Bitwise_or ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } templat e inline _Expr<_BinClos< _Bitwise_or ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, typename _Bitwise_or ::result_type> operator| (const valarray& __v, const _Expr<_Dom,typename _Do m::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename _Bitwise_or <_Tp>::result_type _Value; typedef _BinClos< _Bitwise_or ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< _Shift_left ,_Expr,_Expr,_Dom1,_Dom2>, typename _Shift_left ::result_type> operator<< (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typ ename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename _Shift_left <_Arg>::result_type _Value; typedef _BinClos< _Shift_left ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __w ( ))); } template inline _Expr<_BinClos< _Shift_left ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename _Shift_left ::result_type> operator<< (const _Expr<_Dom,typename _Dom::value_type>& __v, const typena me _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename _Shift_left <_Arg>::result_type _Value; typedef _BinClos< _Shift_left ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), __t)); } template inline _Expr<_BinClos< _Shift_left ,_Constant,_Expr,typename _Dom::value_type,_Dom>, typename _Shift_left ::result_type> operator<< (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom: :value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Shift_left <_Arg>::result_type _Value; typedef _BinClos< _Shift_left ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ())); } templat e inline _Expr<_BinClos< _Shift_left ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, typename _Shift_left ::result_type> operator<< (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Shift_left <_Arg>::result_type _Value; typedef _BinClos< _Shift_left ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } tem plate inline _Expr<_BinClos< _Shift_left ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, typename _Shift_left ::result_type> operator<< (const valarray& __v, const _Expr<_Dom,typenam e _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename _Shift_left <_Tp>::result_type _Value; typedef _BinClos< _Shift_left ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< _Shift_right ,_Expr,_Expr,_Dom1,_Dom2>, typename _Shift_right ::result_type> operator>> (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,t ypename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef typename _Shift_right <_Arg>::result_type _Value; typedef _BinClos< _Shift_right ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), _ _w ())); } template inline _Expr<_BinClos< _Shift_right ,_Expr,_Constant,_Dom,typename _Dom::value_type>, typename _Shift_right ::result_type> operator>> (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef typename _Shift_right <_Arg>::result_type _Value; typedef _BinClos< _Shift_right ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__v (), _ _t)); } template inline _Expr<_BinClos< _Shift_right ,_Constant,_Expr,typename _Dom::value_type,_Dom>, typename _Shift_right ::result_type> operator>> (const typename _Dom::value_type& __t, const _Expr<_Dom,type name _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Shift_right <_Arg>::result_type _Value; typedef _BinClos< _Shift_right ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure (__t, __v ()) ); } template inline _Expr<_BinClos< _Shift_right ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, typename _Shift_right ::result_type> operator>> (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarr ay& __v) { typedef typename _Dom::value_type _Arg; typedef typename _Shift_right <_Arg>::result_type _Value; typedef _BinClos< _Shift_right ,_Expr,_ValArray,_Dom,_Arg> _Closure; return _Expr<_Closure,_Value> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< _Shift_right ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, typename _Shift_right ::result_type> operator>> (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef typename _Shift_right <_Tp>::result_type _Value; typedef _BinClos< _Shift_right ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Value> (_Closure ( __v, __e ())); } # 899 "/usr/include/g++/std/valarray_meta.h" 3 template inline _Expr<_BinClos< logical_and ,_Expr,_Expr,_Dom1,_Dom2>, bool> operator&& (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2::value_type>& __w) { typedef typename _Dom1::val ue_type _Arg; typedef _BinClos< logical_and ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< logical_and ,_Expr,_Constant,_Dom,typename _Dom::value_type>, bool> o perator&& (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef _BinClos< logical_and ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __t)); } template inline _Expr<_BinClos< logical_and ,_Constant,_Expr,typename _Dom::value_type,_Dom>, bool> operator&& (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom::va lue_type _Arg; typedef _BinClos< logical_and ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< logical_and ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, bool> o perator&& (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos< logical_and ,_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Closure,bool> (_Clos ure (__e (), __v)); } template inline _Expr<_BinClos< logical_and ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, bool> operator&& (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typede f typename _Dom::value_type _Tp; typedef _BinClos< logical_and ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< logical_or ,_Expr,_Expr,_Dom1,_Dom2>, bool> operator|| (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2::value_type>& __w) { typedef typename _Dom1::valu e_type _Arg; typedef _BinClos< logical_or ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< logical_or ,_Expr,_Constant,_Dom,typename _Dom::value_type>, bool> oper ator|| (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef _BinClos< logical_or ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __t)); } template inline _Expr<_BinClos< logical_or ,_Constant,_Expr,typename _Dom::value_type,_Dom>, bool> operator|| (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom::value_t ype _Arg; typedef _BinClos< logical_or ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< logical_or ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, bool> operator || (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos< logical_or ,_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Closure,bool> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< logical_or ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, bool> operator|| (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typenam e _Dom::value_type _Tp; typedef _BinClos< logical_or ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< equal_to ,_Expr,_Expr,_Dom1,_Dom2>, bool> operator== (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_ type _Arg; typedef _BinClos< equal_to ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< equal_to ,_Expr,_Constant,_Dom,typename _Dom::value_type>, bool> operator== (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef _BinClos< equal_to ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __t)); } template inline _Expr<_BinClos< equal_to ,_Constant,_Expr,typename _Dom::value_type,_Dom>, bool> operator== (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef _BinClos< equal_to ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< equal_to ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, bool> operator== (const _Ex pr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos< equal_to ,_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Closure,bool> (_Closure (__e (), __v)); } te mplate inline _Expr<_BinClos< equal_to ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, bool> operator== (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinClos< equal_to ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< not_equal_to ,_Expr,_Expr,_Dom1,_Dom2>, bool> operator!= (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2::value_type>& __w) { typedef typename _Dom1::va lue_type _Arg; typedef _BinClos< not_equal_to ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< not_equal_to ,_Expr,_Constant,_Dom,typename _Dom::value_type>, bool > operator!= (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef _BinClos< not_equal_to ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,bool> (_Closure ( __v (), __t)); } template inline _Expr<_BinClos< not_equal_to ,_Constant,_Expr,typename _Dom::value_type,_Dom>, bool> operator!= (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Do m::value_type _Arg; typedef _BinClos< not_equal_to ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< not_equal_to ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, bool> operator!= (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos< not_equal_to ,_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Closure,bool > (_Closure (__e (), __v)); } template inline _Expr<_BinClos< not_equal_to ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, bool> operator!= (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinClos< not_equal_to ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< less ,_Expr,_Expr,_Dom1,_Dom2>, bool> operator< (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_type _Arg; typedef _BinClos< less ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< less ,_Expr,_Constant,_Dom,typename _Dom::value_type>, bool> operator< (const _Expr <_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef _BinClos< less ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __t)); } template inline _Expr<_BinClos< less ,_Constant,_Expr,typename _Dom::value_type,_Dom>, bool> operator< (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef _BinClos< less ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< less ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, bool> operator< (const _Expr<_Dom,typename _Dom::value_typ e>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos< less ,_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Closure,bool> (_Closure (__e (), __v)); } template inline _Expr<_Bin Clos< less ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, bool> operator< (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinClos< less ,_ValArray, _Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< greater ,_Expr,_Expr,_Dom1,_Dom2>, bool> operator> (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2::value_type>& __w) { typedef typename _Dom1::value_ty pe _Arg; typedef _BinClos< greater ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< greater ,_Expr,_Constant,_Dom,typename _Dom::value_type>, bool> operator> (co nst _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef _BinClos< greater ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __t)); } templ ate inline _Expr<_BinClos< greater ,_Constant,_Expr,typename _Dom::value_type,_Dom>, bool> operator> (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom::value_type _Arg; typedef _BinClos< greater ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< greater ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, bool> operator> (const _Expr<_Dom,typ ename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos< greater ,_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Closure,bool> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< greater ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, bool> operator> (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinClos< greater ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< less_equal ,_Expr,_Expr,_Dom1,_Dom2>, bool> operator<= (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2::value_type>& __w) { typedef typename _Dom1::valu e_type _Arg; typedef _BinClos< less_equal ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< less_equal ,_Expr,_Constant,_Dom,typename _Dom::value_type>, bool> oper ator<= (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef _BinClos< less_equal ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __t)); } template inline _Expr<_BinClos< less_equal ,_Constant,_Expr,typename _Dom::value_type,_Dom>, bool> operator<= (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typename _Dom::value_t ype _Arg; typedef _BinClos< less_equal ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< less_equal ,_Expr,_ValArray,_Dom,typename _Dom::value_type>, bool> operator <= (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos< less_equal ,_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Closure,bool> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< less_equal ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, bool> operator<= (const valarray& __v, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typenam e _Dom::value_type _Tp; typedef _BinClos< less_equal ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__v, __e ())); } template inline _Expr<_BinClos< greater_equal ,_Expr,_Expr,_Dom1,_Dom2>, bool> operator>= (const _Expr<_Dom1,typename _Dom1::value_type>& __v, const _Expr<_Dom2,typename _Dom2::value_type>& __w) { typedef typename _Dom1::v alue_type _Arg; typedef _BinClos< greater_equal ,_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,bool> (_Closure (__v (), __w ())); } template inline _Expr<_BinClos< greater_equal ,_Expr,_Constant,_Dom,typename _Dom::value_type>, b ool> operator>= (const _Expr<_Dom,typename _Dom::value_type>& __v, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Arg; typedef _BinClos< greater_equal ,_Expr,_Constant,_Dom,_Arg> _Closure; return _Expr<_Closure,bool> (_Closu re (__v (), __t)); } template inline _Expr<_BinClos< greater_equal ,_Constant,_Expr,typename _Dom::value_type,_Dom>, bool> operator>= (const typename _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __v) { typedef typenam e _Dom::value_type _Arg; typedef _BinClos< greater_equal ,_Constant,_Expr,_Arg,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__t, __v ())); } template inline _Expr<_BinClos< greater_equal ,_Expr,_ValArray,_Dom,typename _Dom::value_ type>, bool> operator>= (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinClos< greater_equal ,_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Clos ure,bool> (_Closure (__e (), __v)); } template inline _Expr<_BinClos< greater_equal ,_ValArray,_Expr,typename _Dom::value_type,_Dom>, bool> operator>= (const valarray& __v, const _Expr<_Dom,typename _Dom::value_ty pe>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinClos< greater_equal ,_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,bool> (_Closure (__v, __e ())); } # 930 "/usr/include/g++/std/valarray_meta.h" 3 template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> abs (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>(_ Closure(__e(), (_Tp(*)(_Tp))(& abs ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> abs (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& abs ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> cos (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>(_ Closure(__e(), (_Tp(*)(_Tp))(& cos ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> cos (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& cos ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> acos (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>( _Closure(__e(), (_Tp(*)(_Tp))(& acos ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> acos (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& acos ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> cosh (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>( _Closure(__e(), (_Tp(*)(_Tp))(& cosh ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> cosh (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& cosh ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> sin (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>(_ Closure(__e(), (_Tp(*)(_Tp))(& sin ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> sin (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& sin ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> asin (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>( _Closure(__e(), (_Tp(*)(_Tp))(& asin ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> asin (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& asin ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> sinh (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>( _Closure(__e(), (_Tp(*)(_Tp))(& sinh ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> sinh (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& sinh ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> tan (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>(_ Closure(__e(), (_Tp(*)(_Tp))(& tan ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> tan (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& tan ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> tanh (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>( _Closure(__e(), (_Tp(*)(_Tp))(& tanh ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> tanh (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& tanh ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> atan (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>( _Closure(__e(), (_Tp(*)(_Tp))(& atan ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> atan (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& atan ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> exp (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>(_ Closure(__e(), (_Tp(*)(_Tp))(& exp ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> exp (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& exp ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> log (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>(_ Closure(__e(), (_Tp(*)(_Tp))(& log ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> log (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& log ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> log10 (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp> (_Closure(__e(), (_Tp(*)(_Tp))(& log10 ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> log10 (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& lo g10 ))); } template inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type> sqrt (const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _UnFunClos<_Expr,_Dom> _Closure; return _Expr<_Closure,_Tp>( _Closure(__e(), (_Tp(*)(_Tp))(& sqrt ))); } template inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp> sqrt (const valarray<_Tp>& __v) { typedef _UnFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(& sqrt ))); } # 1036 "/usr/include/g++/std/valarray_meta.h" 3 template inline _Expr<_BinFunClos<_Expr,_Expr,_Dom1,_Dom2>,typename _Dom1::value_type> atan2 (const _Expr<_Dom1,typename _Dom1::value_type>& __e1, const _Expr<_Dom2,typename _Dom2::value_type>& __e2) { typedef typename _Dom1::v alue_type _Tp; typedef _BinFunClos<_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Tp> (_Closure (__e1 (), __e2 (), (_Tp(*)(_Tp, _Tp))(& atan2 ))); } template inline _Expr<_BinFunClos<_Expr,_ValArray,_Dom,typename _Dom::value_type>, typename _Dom::value_type> atan2 (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinFunClos<_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__e (), __v, (_Tp(*)(_Tp, _Tp))(& atan2 ))); } template inline _Expr<_BinFunClos<_ValArray,_Expr,typename _Dom::value_type,_Dom>, typename _Dom::value_type> atan2 (const valarray& __v, const _Expr<_D om,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinFunClos<_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, __e (), (_Tp(*)(_Tp, _Tp))(& atan2 ))); } template inline _Expr<_B inFunClos<_Expr,_Constant,_Dom,typename _Dom::value_type>, typename _Dom::value_type> atan2 (const _Expr<_Dom, typename _Dom::value_type>& __e, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Tp; typedef _BinFunClos<_Expr,_Co nstant,_Dom,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__e (), __t, (_Tp(*)(_Tp, _Tp))(& atan2 ))); } template inline _Expr<_BinFunClos<_Constant,_Expr,typename _Dom::value_type,_Dom>, typename _Dom::value_type> atan2 (const typen ame _Dom::value_type& __t, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinFunClos<_Constant,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Tp> (_Closure (__t, __e (), (_Tp(*)(_Tp, _Tp))(& atan2 )) ); } template inline _Expr<_BinFunClos<_ValArray,_ValArray,_Tp,_Tp>, _Tp> atan2 (const valarray<_Tp>& __v, const valarray<_Tp>& __w) { typedef _BinFunClos<_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, _ _w, (_Tp(*)(_Tp,_Tp))(& atan2 ))); } template inline _Expr<_BinFunClos<_ValArray,_Constant,_Tp,_Tp>,_Tp> atan2 (const valarray<_Tp>& __v, const _Tp& __t) { typedef _BinFunClos<_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Closure,_ Tp> (_Closure (__v, __t, (_Tp(*)(_Tp,_Tp))(& atan2 ))); } template inline _Expr<_BinFunClos<_Constant,_ValArray,_Tp,_Tp>,_Tp> atan2 (const _Tp& __t, const valarray<_Tp>& __v) { typedef _BinFunClos<_Constant,_ValArray,_Tp,_Tp> _Closure; re turn _Expr<_Closure,_Tp> (_Closure (__t, __v, (_Tp(*)(_Tp,_Tp))(& atan2 ))); } template inline _Expr<_BinFunClos<_Expr,_Expr,_Dom1,_Dom2>,typename _Dom1::value_type> pow (const _Expr<_Dom1,typename _Dom1::value_type>& __e1, const _Expr<_Dom2,typename _Dom2::value_type>& __e2) { typedef typename _Dom1::val ue_type _Tp; typedef _BinFunClos<_Expr,_Expr,_Dom1,_Dom2> _Closure; return _Expr<_Closure,_Tp> (_Closure (__e1 (), __e2 (), (_Tp(*)(_Tp, _Tp))(& pow ))); } template inline _Expr<_BinFunClos<_Expr,_ValArray,_Dom,typename _Dom::value_type>, typ ename _Dom::value_type> pow (const _Expr<_Dom,typename _Dom::value_type>& __e, const valarray& __v) { typedef typename _Dom::value_type _Tp; typedef _BinFunClos<_Expr,_ValArray,_Dom,_Tp> _Closure; return _Expr<_Closure,_Tp> ( _Closure (__e (), __v, (_Tp(*)(_Tp, _Tp))(& pow ))); } template inline _Expr<_BinFunClos<_ValArray,_Expr,typename _Dom::value_type,_Dom>, typename _Dom::value_type> pow (const valarray& __v, const _Expr<_Dom,typenam e _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinFunClos<_ValArray,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, __e (), (_Tp(*)(_Tp, _Tp))(& pow ))); } template inline _Expr<_BinFunClos<_E xpr,_Constant,_Dom,typename _Dom::value_type>, typename _Dom::value_type> pow (const _Expr<_Dom, typename _Dom::value_type>& __e, const typename _Dom::value_type& __t) { typedef typename _Dom::value_type _Tp; typedef _BinFunClos<_Expr,_Constant,_Dom,_T p> _Closure; return _Expr<_Closure,_Tp> (_Closure (__e (), __t, (_Tp(*)(_Tp, _Tp))(& pow ))); } template inline _Expr<_BinFunClos<_Constant,_Expr,typename _Dom::value_type,_Dom>, typename _Dom::value_type> pow (const typename _Dom::value_ty pe& __t, const _Expr<_Dom,typename _Dom::value_type>& __e) { typedef typename _Dom::value_type _Tp; typedef _BinFunClos<_Constant,_Expr,_Tp,_Dom> _Closure; return _Expr<_Closure,_Tp> (_Closure (__t, __e (), (_Tp(*)(_Tp, _Tp))(& pow ))); } template inline _Expr<_BinFunClos<_ValArray,_ValArray,_Tp,_Tp>, _Tp> pow (const valarray<_Tp>& __v, const valarray<_Tp>& __w) { typedef _BinFunClos<_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, __w, (_Tp(*)(_Tp,_Tp))( & pow ))); } template inline _Expr<_BinFunClos<_ValArray,_Constant,_Tp,_Tp>,_Tp> pow (const valarray<_Tp>& __v, const _Tp& __t) { typedef _BinFunClos<_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (__v, __t, ( _Tp(*)(_Tp,_Tp))(& pow ))); } template inline _Expr<_BinFunClos<_Constant,_ValArray,_Tp,_Tp>,_Tp> pow (const _Tp& __t, const valarray<_Tp>& __v) { typedef _BinFunClos<_Constant,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Clo sure (__t, __v, (_Tp(*)(_Tp,_Tp))(& pow ))); } # 113 "/usr/include/g++/std/std_valarray.h" 2 3 extern "C++" { template class valarray { public: typedef _Tp value_type; valarray(); explicit valarray(size_t); valarray(const _Tp&, size_t); valarray(const _Tp* __restrict__, size_t); valarray(const valarray&); valarray(const slice_array<_Tp>&); valarray(const gslice_array<_Tp>&); valarray(const mask_array<_Tp>&); valarray(const indirect_array<_Tp>&); template valarray(const _Expr<_Dom,_Tp>& __e); ~valarray(); valarray<_Tp>& operator=(const valarray<_Tp>&); valarray<_Tp>& operator=(const _Tp&); valarray<_Tp>& operator=(const slice_array<_Tp>&); valarray<_Tp>& operator=(const gslice_array<_Tp>&); valarray<_Tp>& operator=(const mask_array<_Tp>&); valarray<_Tp>& operator=(const indirect_array<_Tp>&); template valarray<_Tp>& operator= (const _Expr<_Dom,_Tp>&); _Tp operator[](size_t) const; _Tp& operator[](size_t); _Expr<_SClos<_ValArray,_Tp>, _Tp> operator[](slice) const; slice_array<_Tp> operator[](slice); _Expr<_GClos<_ValArray,_Tp>, _Tp> operator[](const gslice&) const; gslice_array<_Tp> operator[](const gslice&); valarray<_Tp> operator[](const valarray&) const; mask_array<_Tp> operator[](const valarray&); _Expr<_IClos<_ValArray, _Tp>, _Tp> operator[](const valarray&) const; indirect_array<_Tp> operator[](const valarray&); _Expr<_UnClos<_Unary_plus,_ValArray,_Tp>,_Tp> operator+ () const; _Expr<_UnClos,_Tp> operator- () const; _Expr<_UnClos<_Bitwise_not,_ValArray,_Tp>,_Tp> operator~ () const; _Expr<_UnClos,bool> operator! () const; valarray<_Tp>& operator*= (const _Tp&); valarray<_Tp>& operator/= (const _Tp&); valarray<_Tp>& operator%= (const _Tp&); valarray<_Tp>& operator+= (const _Tp&); valarray<_Tp>& operator-= (const _Tp&); valarray<_Tp>& operator^= (const _Tp&); valarray<_Tp>& operator&= (const _Tp&); valarray<_Tp>& operator|= (const _Tp&); valarray<_Tp>& operator<<=(const _Tp&); valarray<_Tp>& operator>>=(const _Tp&); valarray<_Tp>& operator*= (const valarray<_Tp>&); valarray<_Tp>& operator/= (const valarray<_Tp>&); valarray<_Tp>& operator%= (const valarray<_Tp>&); valarray<_Tp>& operator+= (const valarray<_Tp>&); valarray<_Tp>& operator-= (const valarray<_Tp>&); valarray<_Tp>& operator^= (const valarray<_Tp>&); valarray<_Tp>& operator|= (const valarray<_Tp>&); valarray<_Tp>& operator&= (const valarray<_Tp>&); valarray<_Tp>& operator<<=(const valarray<_Tp>&); valarray<_Tp>& operator>>=(const valarray<_Tp>&); template valarray<_Tp>& operator*= (const _Expr<_Dom,_Tp>&); template valarray<_Tp>& operator/= (const _Expr<_Dom,_Tp>&); template valarray<_Tp>& operator%= (const _Expr<_Dom,_Tp>&); template valarray<_Tp>& operator+= (const _Expr<_Dom,_Tp>&); template valarray<_Tp>& operator-= (const _Expr<_Dom,_Tp>&); template valarray<_Tp>& operator^= (const _Expr<_Dom,_Tp>&); template valarray<_Tp>& operator|= (const _Expr<_Dom,_Tp>&); template valarray<_Tp>& operator&= (const _Expr<_Dom,_Tp>&); template valarray<_Tp>& operator<<=(const _Expr<_Dom,_Tp>&); template valarray<_Tp>& operator>>=(const _Expr<_Dom,_Tp>&); size_t size() const; _Tp sum() const; _Tp min() const; _Tp max() const; _Tp product () const; valarray<_Tp> shift (int) const; valarray<_Tp> cshift(int) const; _Expr<_ValFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(_Tp)) const; _Expr<_RefFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(const _Tp&)) const; void resize(size_t __size, _Tp __c = _Tp()); private: size_t _M_size; _Tp* __restrict__ _M_data; friend class _Array<_Tp>; }; template struct _Unary_plus : unary_function<_Tp,_Tp> { _Tp operator() (const _Tp& __t) const { return __t; } }; template struct _Bitwise_and : binary_function<_Tp,_Tp,_Tp> { _Tp operator() (_Tp __x, _Tp __y) const { return __x & __y; } }; template struct _Bitwise_or : binary_function<_Tp,_Tp,_Tp> { _Tp operator() (_Tp __x, _Tp __y) const { return __x | __y; } }; template struct _Bitwise_xor : binary_function<_Tp,_Tp,_Tp> { _Tp operator() (_Tp __x, _Tp __y) const { return __x ^ __y; } }; template struct _Bitwise_not : unary_function<_Tp,_Tp> { _Tp operator() (_Tp __t) const { return ~__t; } }; template struct _Shift_left : unary_function<_Tp,_Tp> { _Tp operator() (_Tp __x, _Tp __y) const { return __x << __y; } }; template struct _Shift_right : unary_function<_Tp,_Tp> { _Tp operator() (_Tp __x, _Tp __y) const { return __x >> __y; } }; template inline _Tp valarray<_Tp>::operator[] (size_t __i) const { return _M_data[__i]; } template inline _Tp& valarray<_Tp>::operator[] (size_t __i) { return _M_data[__i]; } } # 1 "/usr/include/g++/std/slice.h" 1 3 extern "C++" { class slice { public: slice (); slice (size_t, size_t, size_t); size_t start () const; size_t size () const; size_t stride () const; private: size_t _M_off; size_t _M_sz; size_t _M_st; }; inline slice::slice () {} inline slice::slice (size_t __o, size_t __d, size_t __s) : _M_off (__o), _M_sz (__d), _M_st (__s) {} inline size_t slice::start () const { return _M_off; } inline size_t slice::size () const { return _M_sz; } inline size_t slice::stride () const { return _M_st; } } # 275 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/std/slice_array.h" 1 3 extern "C++" { template class slice_array { public: typedef _T value_type; void operator= (const valarray<_T>&) const; void operator*= (const valarray<_T>&) const; void operator/= (const valarray<_T>&) const; void operator%= (const valarray<_T>&) const; void operator+= (const valarray<_T>&) const; void operator-= (const valarray<_T>&) const; void operator^= (const valarray<_T>&) const; void operator&= (const valarray<_T>&) const; void operator|= (const valarray<_T>&) const; void operator<<= (const valarray<_T>&) const; void operator>>= (const valarray<_T>&) const; void operator= (const _T &); template void operator= (const _Expr<_Dom,_T>&) const; template void operator*= (const _Expr<_Dom,_T>&) const; template void operator/= (const _Expr<_Dom,_T>&) const; template void operator%= (const _Expr<_Dom,_T>&) const; template void operator+= (const _Expr<_Dom,_T>&) const; template void operator-= (const _Expr<_Dom,_T>&) const; template void operator^= (const _Expr<_Dom,_T>&) const; template void operator&= (const _Expr<_Dom,_T>&) const; template void operator|= (const _Expr<_Dom,_T>&) const; template void operator<<= (const _Expr<_Dom,_T>&) const; template void operator>>= (const _Expr<_Dom,_T>&) const; private: friend class valarray<_T>; slice_array(_Array<_T>, const slice&); const size_t _M_sz; const size_t _M_stride; const _Array<_T> _M_array; slice_array (const slice_array&); slice_array (); slice_array& operator= (const slice_array&); }; template inline slice_array<_T>::slice_array (_Array<_T> __a, const slice& __s) : _M_sz (__s.size ()), _M_stride (__s.stride ()), _M_array (__a.begin () + __s.start ()) {} template inline slice_array<_Tp>::slice_array(const slice_array<_Tp>& a) : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {} template inline void slice_array<_T>::operator= (const _T& __t) { __valarray_fill (_M_array, _M_sz, _M_stride, __t); } template inline void slice_array<_T>::operator= (const valarray<_T>& __v) const { __valarray_copy (_Array<_T> (__v), _M_array, _M_sz, _M_stride); } template template inline void slice_array<_T>::operator= (const _Expr<_Dom,_T>& __e) const { __valarray_copy (__e, _M_sz, _M_array, _M_stride); } # 135 "/usr/include/g++/std/slice_array.h" 3 template inline void slice_array<_T>::operator*= (const valarray<_T>& __v) const { _Array_augmented_multiplies (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operator *= (const _Expr<_Dom,_T>& __e) const { _Array_augmented_multiplies (_M_array, _M_stride, __e, _M_sz); } template inline void slice_array<_T>::operator/= (const valarray<_T>& __v) const { _Array_augmented_divides (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operator/= (const _Expr<_Dom,_T>& __e) const { _Array_augmented_divides (_M_array, _M_stride, __e, _M_sz); } template inline void slice_array<_T>::operator%= (const valarray<_T>& __v) const { _Array_augmented_modulus (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operator%= (const _Expr<_Dom,_T>& __e) const { _Array_augmented_modulus (_M_array, _M_stride, __e, _M_sz); } template inline void slice_array<_T>::operator+= (const valarray<_T>& __v) const { _Array_augmented_plus (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operator+= (co nst _Expr<_Dom,_T>& __e) const { _Array_augmented_plus (_M_array, _M_stride, __e, _M_sz); } template inline void slice_array<_T>::operator-= (const valarray<_T>& __v) const { _Array_augmented_minus (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operator-= (c onst _Expr<_Dom,_T>& __e) const { _Array_augmented_minus (_M_array, _M_stride, __e, _M_sz); } template inline void slice_array<_T>::operator^= (const valarray<_T>& __v) const { _Array_augmented_xor (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operator^= (con st _Expr<_Dom,_T>& __e) const { _Array_augmented_xor (_M_array, _M_stride, __e, _M_sz); } template inline void slice_array<_T>::operator&= (const valarray<_T>& __v) const { _Array_augmented_and (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operator&= (con st _Expr<_Dom,_T>& __e) const { _Array_augmented_and (_M_array, _M_stride, __e, _M_sz); } template inline void slice_array<_T>::operator|= (const valarray<_T>& __v) const { _Array_augmented_or (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operator|= (cons t _Expr<_Dom,_T>& __e) const { _Array_augmented_or (_M_array, _M_stride, __e, _M_sz); } template inline void slice_array<_T>::operator<<= (const valarray<_T>& __v) const { _Array_augmented_shift_left (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operato r<<= (const _Expr<_Dom,_T>& __e) const { _Array_augmented_shift_left (_M_array, _M_stride, __e, _M_sz); } template inline void slice_array<_T>::operator>>= (const valarray<_T>& __v) const { _Array_augmented_shift_right (_M_array, _M_sz, _M_stride, _Array<_T> (__v));} template template inline void slice_array<_T>::operat or>>= (const _Expr<_Dom,_T>& __e) const { _Array_augmented_shift_right (_M_array, _M_stride, __e, _M_sz); } } # 276 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/std/gslice.h" 1 3 extern "C++" { struct _Indexer { size_t _M_count; size_t _M_start; valarray _M_size; valarray _M_stride; valarray _M_index; _Indexer(size_t, const valarray&, const valarray&); void _M_increment_use() { ++_M_count; } size_t _M_decrement_use() { return --_M_count; } }; class gslice { public: gslice (); gslice (size_t, const valarray&, const valarray&); gslice(const gslice&); ~gslice(); gslice& operator= (const gslice&); size_t start () const; valarray size () const; valarray stride () const; private: _Indexer* _M_index; template friend class valarray; }; inline size_t gslice::start () const { return _M_index ? _M_index->_M_start : 0; } inline valarray gslice::size () const { return _M_index ? _M_index->_M_size : valarray(); } inline valarray gslice::stride () const { return _M_index ? _M_index->_M_stride : valarray(); } inline gslice::gslice () : _M_index(0) {} inline gslice::gslice(size_t __o, const valarray& __l, const valarray& __s) : _M_index(new _Indexer(__o, __l, __s)) {} inline gslice::gslice(const gslice& __g) : _M_index(__g._M_index) { if (_M_index) _M_index->_M_increment_use(); } inline gslice::~gslice() { if (_M_index && _M_index->_M_decrement_use() == 0) delete _M_index; } inline gslice& gslice::operator= (const gslice& __g) { if (__g._M_index) __g._M_index->_M_increment_use(); if (_M_index && _M_index->_M_decrement_use() == 0) delete _M_index; _M_index = __g._M_index; return *this; } } # 277 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/std/gslice_array.h" 1 3 extern "C++" { template class gslice_array { public: typedef _Tp value_type; void operator= (const valarray<_Tp>&) const; void operator*= (const valarray<_Tp>&) const; void operator/= (const valarray<_Tp>&) const; void operator%= (const valarray<_Tp>&) const; void operator+= (const valarray<_Tp>&) const; void operator-= (const valarray<_Tp>&) const; void operator^= (const valarray<_Tp>&) const; void operator&= (const valarray<_Tp>&) const; void operator|= (const valarray<_Tp>&) const; void operator<<=(const valarray<_Tp>&) const; void operator>>=(const valarray<_Tp>&) const; void operator=(const _Tp&); template void operator= (const _Expr<_Dom,_Tp>&) const; template void operator*= (const _Expr<_Dom,_Tp>&) const; template void operator/= (const _Expr<_Dom,_Tp>&) const; template void operator%= (const _Expr<_Dom,_Tp>&) const; template void operator+= (const _Expr<_Dom,_Tp>&) const; template void operator-= (const _Expr<_Dom,_Tp>&) const; template void operator^= (const _Expr<_Dom,_Tp>&) const; template void operator&= (const _Expr<_Dom,_Tp>&) const; template void operator|= (const _Expr<_Dom,_Tp>&) const; template void operator<<= (const _Expr<_Dom,_Tp>&) const; template void operator>>= (const _Expr<_Dom,_Tp>&) const; private: _Array<_Tp> _M_array; const valarray& _M_index; friend class valarray<_Tp>; gslice_array (_Array<_Tp>, const valarray&); gslice_array (const gslice_array&); gslice_array(); gslice_array& operator= (const gslice_array&); }; template inline gslice_array<_Tp>::gslice_array (_Array<_Tp> __a, const valarray& __i) : _M_array (__a), _M_index (__i) {} template inline gslice_array<_Tp>::gslice_array (const gslice_array<_Tp>& __a) : _M_array (__a._M_array), _M_index (__a._M_index) {} template inline void gslice_array<_Tp>::operator= (const _Tp& __t) { __valarray_fill (_M_array, _Array(_M_index), _M_index.size(), __t); } template inline void gslice_array<_Tp>::operator= (const valarray<_Tp>& __v) const { __valarray_copy (_Array<_Tp> (__v), __v.size (), _M_array, _Array(_M_index)); } template template inline void gslice_array<_Tp>::operator= (const _Expr& __e) const { __valarray_copy (__e, _M_index.size(), _M_array, _Array(_M_index)); } # 149 "/usr/include/g++/std/gslice_array.h" 3 template inline void gslice_array<_Tp>::operator*= (const valarray<_Tp>& __v) const { _Array_augmented_multiplies (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline void gslice_array<_Tp>::operator*= (const _Expr& __e) const { _Array_augmented_multiplies (_M_array, _Array(_M_index), __e, _M_index.size()); } template inline void gslice_array<_Tp>::operator/= (const valarray<_Tp>& __v) const { _Array_augmented_divides (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline void gsl ice_array<_Tp>::operator/= (const _Expr& __e) const { _Array_augmented_divides (_M_array, _Array(_M_index), __e, _M_index.size()); } template inline void gslice_array<_Tp>::operator%= (const valarray<_Tp>& __v) const { _Array_augmented_modulus (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline void gsl ice_array<_Tp>::operator%= (const _Expr& __e) const { _Array_augmented_modulus (_M_array, _Array(_M_index), __e, _M_index.size()); } template inline void gslice_array<_Tp>::operator+= (const valarray<_Tp>& __v) const { _Array_augmented_plus (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline void gslice _array<_Tp>::operator+= (const _Expr& __e) const { _Array_augmented_plus (_M_array, _Array(_M_index), __e, _M_index.size()); } template inline void gslice_array<_Tp>::operator-= (const valarray<_Tp>& __v) const { _Array_augmented_minus (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline void gslic e_array<_Tp>::operator-= (const _Expr& __e) const { _Array_augmented_minus (_M_array, _Array(_M_index), __e, _M_index.size()); } template inline void gslice_array<_Tp>::operator^= (const valarray<_Tp>& __v) const { _Array_augmented_xor (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline void gslice_ array<_Tp>::operator^= (const _Expr& __e) const { _Array_augmented_xor (_M_array, _Array(_M_index), __e, _M_index.size()); } template inline void gslice_array<_Tp>::operator&= (const valarray<_Tp>& __v) const { _Array_augmented_and (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline void gslice_ array<_Tp>::operator&= (const _Expr& __e) const { _Array_augmented_and (_M_array, _Array(_M_index), __e, _M_index.size()); } template inline void gslice_array<_Tp>::operator|= (const valarray<_Tp>& __v) const { _Array_augmented_or (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline void gslice_a rray<_Tp>::operator|= (const _Expr& __e) const { _Array_augmented_or (_M_array, _Array(_M_index), __e, _M_index.size()); } template inline void gslice_array<_Tp>::operator<<= (const valarray<_Tp>& __v) const { _Array_augmented_shift_left (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline void gslice_array<_Tp>::operator<<= (const _Expr& __e) const { _Array_augmented_shift_left (_M_array, _Array(_M_index), __e, _M_index.size()); } template inline void gslice_array<_Tp>::operator>>= (const valarray<_Tp>& __v) const { _Array_augmented_shift_right (_M_array, _Array(_M_index), _Array<_Tp> (__v), __v.size ()); } template template inline voi d gslice_array<_Tp>::operator>>= (const _Expr& __e) const { _Array_augmented_shift_right (_M_array, _Array(_M_index), __e, _M_index.size()); } } # 278 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/std/mask_array.h" 1 3 extern "C++" { template class mask_array { public: typedef _T value_type; void operator= (const valarray<_T>&) const; void operator*= (const valarray<_T>&) const; void operator/= (const valarray<_T>&) const; void operator%= (const valarray<_T>&) const; void operator+= (const valarray<_T>&) const; void operator-= (const valarray<_T>&) const; void operator^= (const valarray<_T>&) const; void operator&= (const valarray<_T>&) const; void operator|= (const valarray<_T>&) const; void operator<<=(const valarray<_T>&) const; void operator>>=(const valarray<_T>&) const; void operator= (const _T&); template void operator= (const _Expr<_Dom,_T>&) const; template void operator*= (const _Expr<_Dom,_T>&) const; template void operator/= (const _Expr<_Dom,_T>&) const; template void operator%= (const _Expr<_Dom,_T>&) const; template void operator+= (const _Expr<_Dom,_T>&) const; template void operator-= (const _Expr<_Dom,_T>&) const; template void operator^= (const _Expr<_Dom,_T>&) const; template void operator&= (const _Expr<_Dom,_T>&) const; template void operator|= (const _Expr<_Dom,_T>&) const; template void operator<<=(const _Expr<_Dom,_T>&) const; template void operator>>=(const _Expr<_Dom,_T>&) const; private: mask_array (_Array<_T>, size_t, _Array); friend class valarray<_T>; const size_t _M_sz; const _Array _M_mask; const _Array<_T> _M_array; mask_array (const mask_array&); mask_array (); mask_array& operator= (const mask_array&); }; template inline mask_array<_Tp>::mask_array (const mask_array<_Tp>& a) : _M_sz (a._M_sz), _M_mask (a._M_mask), _M_array (a._M_array) {} template inline mask_array<_T>::mask_array (_Array<_T> __a, size_t __s, _Array __m) : _M_sz (__s), _M_mask (__m), _M_array (__a) {} template inline void mask_array<_T>::operator= (const _T& __t) { __valarray_fill (_M_array, _M_sz, _M_mask, __t); } template inline void mask_array<_T>::operator= (const valarray<_T>& __v) const { __valarray_copy (_Array<_T> (__v), __v.size (), _M_array, _M_mask); } template template inline void mask_array<_T>::operator= (const _Expr& __e) const { __valarray_copy (__e, __e.size (), _M_array, _M_mask); } # 134 "/usr/include/g++/std/mask_array.h" 3 template inline void mask_array<_T>::operator*= (const valarray<_T>& __v) const { _Array_augmented_multiplies (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operator *= (const _Expr& __e) const { _Array_augmented_multiplies (_M_array, _M_mask, __e, __e.size ()); } template inline void mask_array<_T>::operator/= (const valarray<_T>& __v) const { _Array_augmented_divides (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operator/= (const _Expr& __e) const { _Array_augmented_divides (_M_array, _M_mask, __e, __e.size ()); } template inline void mask_array<_T>::operator%= (const valarray<_T>& __v) const { _Array_augmented_modulus (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operator%= (const _Expr& __e) const { _Array_augmented_modulus (_M_array, _M_mask, __e, __e.size ()); } template inline void mask_array<_T>::operator+= (const valarray<_T>& __v) const { _Array_augmented_plus (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operator+= (co nst _Expr& __e) const { _Array_augmented_plus (_M_array, _M_mask, __e, __e.size ()); } template inline void mask_array<_T>::operator-= (const valarray<_T>& __v) const { _Array_augmented_minus (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operator-= (c onst _Expr& __e) const { _Array_augmented_minus (_M_array, _M_mask, __e, __e.size ()); } template inline void mask_array<_T>::operator^= (const valarray<_T>& __v) const { _Array_augmented_xor (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operator^= (con st _Expr& __e) const { _Array_augmented_xor (_M_array, _M_mask, __e, __e.size ()); } template inline void mask_array<_T>::operator&= (const valarray<_T>& __v) const { _Array_augmented_and (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operator&= (con st _Expr& __e) const { _Array_augmented_and (_M_array, _M_mask, __e, __e.size ()); } template inline void mask_array<_T>::operator|= (const valarray<_T>& __v) const { _Array_augmented_or (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operator|= (cons t _Expr& __e) const { _Array_augmented_or (_M_array, _M_mask, __e, __e.size ()); } template inline void mask_array<_T>::operator<<= (const valarray<_T>& __v) const { _Array_augmented_shift_left (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operato r<<= (const _Expr& __e) const { _Array_augmented_shift_left (_M_array, _M_mask, __e, __e.size ()); } template inline void mask_array<_T>::operator>>= (const valarray<_T>& __v) const { _Array_augmented_shift_right (_M_array, _M_mask, _Array<_T> (__v), __v.size ()); } template template inline void mask_array<_T>::operat or>>= (const _Expr& __e) const { _Array_augmented_shift_right (_M_array, _M_mask, __e, __e.size ()); } } # 279 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/std/indirect_array.h" 1 3 extern "C++" { template class indirect_array { public: typedef _Tp value_type; void operator= (const valarray<_Tp>&) const; void operator*= (const valarray<_Tp>&) const; void operator/= (const valarray<_Tp>&) const; void operator%= (const valarray<_Tp>&) const; void operator+= (const valarray<_Tp>&) const; void operator-= (const valarray<_Tp>&) const; void operator^= (const valarray<_Tp>&) const; void operator&= (const valarray<_Tp>&) const; void operator|= (const valarray<_Tp>&) const; void operator<<= (const valarray<_Tp>&) const; void operator>>= (const valarray<_Tp>&) const; void operator= (const _Tp&); template void operator= (const _Expr<_Dom, _Tp>&) const; template void operator*= (const _Expr<_Dom, _Tp>&) const; template void operator/= (const _Expr<_Dom, _Tp>&) const; template void operator%= (const _Expr<_Dom, _Tp>&) const; template void operator+= (const _Expr<_Dom, _Tp>&) const; template void operator-= (const _Expr<_Dom, _Tp>&) const; template void operator^= (const _Expr<_Dom, _Tp>&) const; template void operator&= (const _Expr<_Dom, _Tp>&) const; template void operator|= (const _Expr<_Dom, _Tp>&) const; template void operator<<= (const _Expr<_Dom, _Tp>&) const; template void operator>>= (const _Expr<_Dom, _Tp>&) const; private: indirect_array (const indirect_array&); indirect_array (_Array<_Tp>, size_t, _Array); friend class valarray<_Tp>; friend class gslice_array<_Tp>; const size_t _M_sz; const _Array _M_index; const _Array<_Tp> _M_array; indirect_array (); indirect_array& operator= (const indirect_array&); }; template inline indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a) : _M_sz (__a._M_sz), _M_index (__a._M_index), _M_array (__a._M_array) {} template inline indirect_array<_Tp>::indirect_array (_Array<_Tp> __a, size_t __s, _Array __i) : _M_sz (__s), _M_index (__i), _M_array (__a) {} template inline void indirect_array<_Tp>::operator= (const _Tp& __t) { __valarray_fill(_M_array, _M_index, _M_sz, __t); } template inline void indirect_array<_Tp>::operator= (const valarray<_Tp>& __v) const { __valarray_copy (_Array<_Tp> (__v), _M_sz, _M_array, _M_index); } template template inline void indirect_array<_Tp>::operator= (const _Expr<_Dom,_Tp>& __e) const { __valarray_copy (__e, _M_sz, _M_array, _M_index); } # 137 "/usr/include/g++/std/indirect_array.h" 3 template inline void indirect_array<_Tp>::operator*= (const valarray<_Tp>& __v) const { _Array_augmented_multiplies (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array<_T p>::operator*= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_multiplies (_M_array, _M_index, __e, _M_sz); } template inline void indirect_array<_Tp>::operator/= (const valarray<_Tp>& __v) const { _Array_augmented_divides (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array<_Tp>: :operator/= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_divides (_M_array, _M_index, __e, _M_sz); } template inline void indirect_array<_Tp>::operator%= (const valarray<_Tp>& __v) const { _Array_augmented_modulus (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array<_Tp>: :operator%= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_modulus (_M_array, _M_index, __e, _M_sz); } template inline void indirect_array<_Tp>::operator+= (const valarray<_Tp>& __v) const { _Array_augmented_plus (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array<_Tp>::op erator+= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_plus (_M_array, _M_index, __e, _M_sz); } template inline void indirect_array<_Tp>::operator-= (const valarray<_Tp>& __v) const { _Array_augmented_minus (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array<_Tp>::o perator-= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_minus (_M_array, _M_index, __e, _M_sz); } template inline void indirect_array<_Tp>::operator^= (const valarray<_Tp>& __v) const { _Array_augmented_xor (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array<_Tp>::ope rator^= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_xor (_M_array, _M_index, __e, _M_sz); } template inline void indirect_array<_Tp>::operator&= (const valarray<_Tp>& __v) const { _Array_augmented_and (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array<_Tp>::ope rator&= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_and (_M_array, _M_index, __e, _M_sz); } template inline void indirect_array<_Tp>::operator|= (const valarray<_Tp>& __v) const { _Array_augmented_or (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array<_Tp>::oper ator|= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_or (_M_array, _M_index, __e, _M_sz); } template inline void indirect_array<_Tp>::operator<<= (const valarray<_Tp>& __v) const { _Array_augmented_shift_left (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array<_ Tp>::operator<<= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_shift_left (_M_array, _M_index, __e, _M_sz); } template inline void indirect_array<_Tp>::operator>>= (const valarray<_Tp>& __v) const { _Array_augmented_shift_right (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); } template template inline void indirect_array< _Tp>::operator>>= (const _Expr<_Dom,_Tp>& __e) const { _Array_augmented_shift_right (_M_array, _M_index, __e, _M_sz); } } # 280 "/usr/include/g++/std/std_valarray.h" 2 3 extern "C++" { template inline valarray<_Tp>::valarray () : _M_size (0), _M_data (0) {} template inline valarray<_Tp>::valarray (size_t __n) : _M_size (__n), _M_data (new _Tp[__n]) {} template inline valarray<_Tp>::valarray (const _Tp& __t, size_t __n) : _M_size (__n), _M_data (new _Tp[__n]) { __valarray_fill (_M_data, _M_size, __t); } template inline valarray<_Tp>::valarray (const _Tp* __restrict__ __pT, size_t __n) : _M_size (__n), _M_data (new _Tp[__n]) { __valarray_copy (__pT, __n, _M_data); } template inline valarray<_Tp>::valarray (const valarray<_Tp>& __v) : _M_size (__v._M_size), _M_data (new _Tp[__v._M_size]) { __valarray_copy (__v._M_data, _M_size, _M_data); } template inline valarray<_Tp>::valarray (const slice_array<_Tp>& __sa) : _M_size (__sa._M_sz), _M_data (new _Tp[__sa._M_sz]) { __valarray_copy (__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data)); } template inline valarray<_Tp>::valarray (const gslice_array<_Tp>& __ga) : _M_size (__ga._M_index.size()), _M_data (new _Tp[_M_size]) { __valarray_copy (__ga._M_array, _Array(__ga._M_index), _Array<_Tp>(_M_data), _M_size); } template inline valarray<_Tp>::valarray (const mask_array<_Tp>& __ma) : _M_size (__ma._M_sz), _M_data (new _Tp[__ma._M_sz]) { __valarray_copy (__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size); } template inline valarray<_Tp>::valarray (const indirect_array<_Tp>& __ia) : _M_size (__ia._M_sz), _M_data (new _Tp[__ia._M_sz]) { __valarray_copy (__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size); } template template inline valarray<_Tp>::valarray (const _Expr<_Dom, _Tp>& __e) : _M_size (__e.size ()), _M_data (new _Tp[_M_size]) { __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data)); } template inline valarray<_Tp>::~valarray () { delete[] _M_data; } template inline valarray<_Tp>& valarray<_Tp>::operator= (const valarray<_Tp>& __v) { __valarray_copy(__v._M_data, _M_size, _M_data); return *this; } template inline valarray<_Tp>& valarray<_Tp>::operator= (const _Tp& __t) { __valarray_fill (_M_data, _M_size, __t); return *this; } template inline valarray<_Tp>& valarray<_Tp>::operator= (const slice_array<_Tp>& __sa) { __valarray_copy (__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data)); return *this; } template inline valarray<_Tp>& valarray<_Tp>::operator= (const gslice_array<_Tp>& __ga) { __valarray_copy (__ga._M_array, _Array(__ga._M_index), _Array<_Tp>(_M_data), _M_size); return *this; } template inline valarray<_Tp>& valarray<_Tp>::operator= (const mask_array<_Tp>& __ma) { __valarray_copy (__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size); return *this; } template inline valarray<_Tp>& valarray<_Tp>::operator= (const indirect_array<_Tp>& __ia) { __valarray_copy (__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size); return *this; } template template inline valarray<_Tp>& valarray<_Tp>::operator= (const _Expr<_Dom, _Tp>& __e) { __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data)); return *this; } template inline _Expr<_SClos<_ValArray,_Tp>, _Tp> valarray<_Tp>::operator[] (slice __s) const { typedef _SClos<_ValArray,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (_Array<_Tp>(_M_data), __s)); } template inline slice_array<_Tp> valarray<_Tp>::operator[] (slice __s) { return slice_array<_Tp> (_Array<_Tp>(_M_data), __s); } template inline _Expr<_GClos<_ValArray,_Tp>, _Tp> valarray<_Tp>::operator[] (const gslice& __gs) const { typedef _GClos<_ValArray,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (_Array<_Tp>(_M_data), __gs._M_index->_M_index)); } template inline gslice_array<_Tp> valarray<_Tp>::operator[] (const gslice& __gs) { return gslice_array<_Tp> (_Array<_Tp>(_M_data), __gs._M_index->_M_index); } template inline valarray<_Tp> valarray<_Tp>::operator[] (const valarray& __m) const { size_t __s (0); size_t __e (__m.size ()); for (size_t __i=0; __i<__e; ++__i) if (__m[__i]) ++__s; return valarray<_Tp> (mask_array<_Tp> (_Array<_Tp>(_M_data), __s, _Array (__m))); } template inline mask_array<_Tp> valarray<_Tp>::operator[] (const valarray& __m) { size_t __s (0); size_t __e (__m.size ()); for (size_t __i=0; __i<__e; ++__i) if (__m[__i]) ++__s; return mask_array<_Tp> (_Array<_Tp>(_M_data), __s, _Array (__m)); } template inline _Expr<_IClos<_ValArray,_Tp>, _Tp> valarray<_Tp>::operator[] (const valarray& __i) const { typedef _IClos<_ValArray,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (*this, __i)); } template inline indirect_array<_Tp> valarray<_Tp>::operator[] (const valarray& __i) { return indirect_array<_Tp> (_Array<_Tp>(_M_data), __i.size(), _Array (__i)); } template inline size_t valarray<_Tp>::size () const { return _M_size; } template inline _Tp valarray<_Tp>::sum () const { return accumulate (_M_data, _M_data + _M_size, _Tp ()); } template inline _Tp valarray<_Tp>::product () const { return accumulate (_M_data, _M_data+_M_size, _Tp(1), multiplies<_Tp> ()); } template inline valarray<_Tp> valarray<_Tp>::shift (int __n) const { _Tp* const __a = static_cast<_Tp*> (__builtin_alloca ( sizeof(_Tp) * _M_size ) ); if (! __n) __valarray_copy (_M_data, _M_size, __a); else if (__n > 0) { if (__n > _M_size) __valarray_fill(__a, __n, _Tp()); else { __valarray_copy (_M_data+__n, _M_size-__n, __a); __valarray_fill (__a+_M_size-__n, __n, _Tp()); } } else { __valarray_copy (_M_data, _M_size+__n, __a-__n); __valarray_fill(__a, -__n, _Tp()); } return valarray<_Tp> (__a, _M_size); } template inline valarray<_Tp> valarray<_Tp>::cshift (int __n) const { _Tp* const __a = static_cast<_Tp*> (__builtin_alloca ( sizeof(_Tp) * _M_size ) ); if (! __n) __valarray_copy(_M_data, _M_size, __a); else if (__n > 0) { __valarray_copy (_M_data, __n, __a + _M_size-__n); __valarray_copy (_M_data + __n, _M_size-__n, __a); } else { __valarray_copy (_M_data + _M_size + __n, -__n, __a); __valarray_copy (_M_data, _M_size + __n, __a - __n); } return valarray<_Tp> (__a, _M_size); } template inline void valarray<_Tp>::resize (size_t __n, _Tp __c) { if (_M_size != __n) { delete[] _M_data; _M_size = __n; _M_data = new _Tp[_M_size]; } __valarray_fill (_M_data, _M_size, __c); } template inline _Tp valarray<_Tp>::min() const { return *min_element (_M_data, _M_data+_M_size); } template inline _Tp valarray<_Tp>::max() const { return *max_element (_M_data, _M_data+_M_size); } template inline _Expr<_ValFunClos<_ValArray,_Tp>,_Tp> valarray<_Tp>::apply (_Tp func (_Tp)) const { typedef _ValFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (*this, func)); } template inline _Expr<_RefFunClos<_ValArray,_Tp>,_Tp> valarray<_Tp>::apply (_Tp func (const _Tp &)) const { typedef _RefFunClos<_ValArray,_Tp> _Closure; return _Expr<_Closure,_Tp> (_Closure (*this, func)); } template inline _Expr<_UnClos< _Unary_plus ,_ValArray,_Tp>, _Tp> valarray<_Tp>::operator+ () const { typedef _UnClos< _Unary_plus ,_ValArray,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (*this)); } template inline _Expr<_UnClos< negate ,_ValArray,_Tp>, _Tp> valarray<_Tp>::operator- () const { typedef _UnClos< negate ,_ValArray,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (*this)); } template inline _Expr<_UnClos< _Bitwise_not ,_ValArray,_Tp>, _Tp> valarray<_Tp>::operator~ () const { typedef _UnClos< _Bitwise_not ,_ValArray,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (*this)); } template inline _Expr<_UnClos, bool> valarray<_Tp>::operator!() const { typedef _UnClos _Closure; return _Expr<_Closure, bool> (_Closure (*this)); } # 608 "/usr/include/g++/std/std_valarray.h" 3 template inline valarray<_Tp> & valarray<_Tp>::operator+= (const _Tp &__t) { _Array_augmented_plus (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator+= (const valarray<_Tp> &__v) { _Array_augmented_plus (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator-= (const _Tp &__t) { _Array_augmented_minus (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator-= (const valarray<_Tp > &__v) { _Array_augmented_minus (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator*= (const _Tp &__t) { _Array_augmented_multiplies (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator*= (const valarra y<_Tp> &__v) { _Array_augmented_multiplies (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator/= (const _Tp &__t) { _Array_augmented_divides (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator/= (const valarray<_ Tp> &__v) { _Array_augmented_divides (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator%= (const _Tp &__t) { _Array_augmented_modulus (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator%= (const valarray<_ Tp> &__v) { _Array_augmented_modulus (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator^= (const _Tp &__t) { _Array_augmented_xor (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator^= (const valarray<_Tp> &__v) { _Array_augmented_xor (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator&= (const _Tp &__t) { _Array_augmented_and (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator&= (const valarray<_Tp> &__v) { _Array_augmented_and (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator|= (const _Tp &__t) { _Array_augmented_or (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator|= (const valarray<_Tp> & __v) { _Array_augmented_or (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator<<= (const _Tp &__t) { _Array_augmented_shift_left (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator<<= (const valar ray<_Tp> &__v) { _Array_augmented_shift_left (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator>>= (const _Tp &__t) { _Array_augmented_shift_right (_Array<_Tp>(_M_data), _M_size, __t); return *this; } template inline valarray<_Tp> & valarray<_Tp>::operator>>= (const vala rray<_Tp> &__v) { _Array_augmented_shift_right (_Array<_Tp>(_M_data), _M_size, _Array<_Tp>(__v._M_data)); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator+= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_plus (_Array<_Tp>(_M_data), __e, _M_size); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator-= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_minus (_Array<_Tp>(_M_data), __e, _M_size); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator*= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_multiplies (_Array<_Tp>(_M_data), __e, _M_size); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator/= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_divides (_Array<_Tp>(_M_data), __e, _M_size); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator%= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_modulus (_Array<_Tp>(_M_data), __e, _M_size); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator^= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_xor (_Array<_Tp>(_M_data), __e, _M_size); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator&= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_and (_Array<_Tp>(_M_data), __e, _M_size); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator|= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_or (_Array<_Tp>(_M_data), __e, _M_size); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator<<= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_shift_left (_Array<_Tp>(_M_data), __e, _M_size); return *this; } template template inline valarray<_Tp> & valarray<_Tp>::operator>>= (const _Expr<_Dom,_Tp> &__e) { _Array_augmented_shift_right (_Array<_Tp>(_M_data), __e, _M_size); return *this; } # 670 "/usr/include/g++/std/std_valarray.h" 3 template inline _Expr<_BinClos< plus ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator+ (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< plus ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closur e (__v, __w)); } template inline _Expr<_BinClos< plus ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator+ (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< plus ,_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_ Closure (__v, __t)); } template inline _Expr<_BinClos< plus ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator+ (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< plus ,_Constant,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _ Tp> (_Closure (__t, __v)); } template inline _Expr<_BinClos< minus ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator- (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< minus ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Clos ure (__v, __w)); } template inline _Expr<_BinClos< minus ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator- (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< minus ,_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp > (_Closure (__v, __t)); } template inline _Expr<_BinClos< minus ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator- (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< minus ,_Constant,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Clos ure, _Tp> (_Closure (__t, __v)); } template inline _Expr<_BinClos< multiplies ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator* (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< multiplies ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _ Tp> (_Closure (__v, __w)); } template inline _Expr<_BinClos< multiplies ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator* (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< multiplies ,_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__v, __t)); } template inline _Expr<_BinClos< multiplies ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator* (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< multiplies ,_Constant,_ValArray,_Tp,_Tp > _Closure; return _Expr<_Closure, _Tp> (_Closure (__t, __v)); } template inline _Expr<_BinClos< divides ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator/ (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< divides ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_ Closure (__v, __w)); } template inline _Expr<_BinClos< divides ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator/ (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< divides ,_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Clos ure, _Tp> (_Closure (__v, __t)); } template inline _Expr<_BinClos< divides ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator/ (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< divides ,_Constant,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__t, __v)); } template inline _Expr<_BinClos< modulus ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator% (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< modulus ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_ Closure (__v, __w)); } template inline _Expr<_BinClos< modulus ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator% (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< modulus ,_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Clos ure, _Tp> (_Closure (__v, __t)); } template inline _Expr<_BinClos< modulus ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator% (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< modulus ,_Constant,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__t, __v)); } template inline _Expr<_BinClos< _Bitwise_xor ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator^ (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< _Bitwise_xor ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closur e, _Tp> (_Closure (__v, __w)); } template inline _Expr<_BinClos< _Bitwise_xor ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator^ (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< _Bitwise_xor ,_ValArray,_Constant,_Tp,_Tp> _Closure ; return _Expr<_Closure, _Tp> (_Closure (__v, __t)); } template inline _Expr<_BinClos< _Bitwise_xor ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator^ (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< _Bitwise_xor ,_Constant,_ValA rray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__t, __v)); } template inline _Expr<_BinClos< _Bitwise_and ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator& (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< _Bitwise_and ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closur e, _Tp> (_Closure (__v, __w)); } template inline _Expr<_BinClos< _Bitwise_and ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator& (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< _Bitwise_and ,_ValArray,_Constant,_Tp,_Tp> _Closure ; return _Expr<_Closure, _Tp> (_Closure (__v, __t)); } template inline _Expr<_BinClos< _Bitwise_and ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator& (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< _Bitwise_and ,_Constant,_ValA rray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__t, __v)); } template inline _Expr<_BinClos< _Bitwise_or ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator| (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< _Bitwise_or ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__v, __w)); } template inline _Expr<_BinClos< _Bitwise_or ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator| (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< _Bitwise_or ,_ValArray,_Constant,_Tp,_Tp> _Closure; re turn _Expr<_Closure, _Tp> (_Closure (__v, __t)); } template inline _Expr<_BinClos< _Bitwise_or ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator| (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< _Bitwise_or ,_Constant,_ValArray,_ Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__t, __v)); } template inline _Expr<_BinClos< _Shift_left ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator<< (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< _Shift_left ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure , _Tp> (_Closure (__v, __w)); } template inline _Expr<_BinClos< _Shift_left ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator<< (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< _Shift_left ,_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__v, __t)); } template inline _Expr<_BinClos< _Shift_left ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator<< (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< _Shift_left ,_Constant,_ValArra y,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__t, __v)); } template inline _Expr<_BinClos< _Shift_right ,_ValArray,_ValArray,_Tp,_Tp>, _Tp> operator>> (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< _Shift_right ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closu re, _Tp> (_Closure (__v, __w)); } template inline _Expr<_BinClos< _Shift_right ,_ValArray,_Constant,_Tp,_Tp>,_Tp> operator>> (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< _Shift_right ,_ValArray,_Constant,_Tp,_Tp> _Closu re; return _Expr<_Closure, _Tp> (_Closure (__v, __t)); } template inline _Expr<_BinClos< _Shift_right ,_Constant,_ValArray,_Tp,_Tp>,_Tp> operator>> (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< _Shift_right ,_Constant,_V alArray,_Tp,_Tp> _Closure; return _Expr<_Closure, _Tp> (_Closure (__t, __v)); } # 708 "/usr/include/g++/std/std_valarray.h" 3 template inline _Expr<_BinClos< logical_and ,_ValArray,_ValArray,_Tp,_Tp>,bool> operator&& (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< logical_and ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure , bool> (_Closure (__v, __w)); } template inline _Expr<_BinClos< logical_and ,_ValArray,_Constant,_Tp,_Tp>,bool> operator&& (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< logical_and ,_ValArray,_Constant,_Tp,_Tp> _Closure; r eturn _Expr<_Closure, bool> (_Closure (__v, __t)); } template inline _Expr<_BinClos< logical_and ,_Constant,_ValArray,_Tp,_Tp>,bool> operator&& (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< logical_and ,_Constant,_ValArray, _Tp,_Tp> _Closure; return _Expr<_Closure, bool> (_Closure (__t, __v)); } template inline _Expr<_BinClos< logical_or ,_ValArray,_ValArray,_Tp,_Tp>,bool> operator|| (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< logical_or ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, bool> (_Closure (__v, __w)); } template inline _Expr<_BinClos< logical_or ,_ValArray,_Constant,_Tp,_Tp>,bool> operator|| (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< logical_or ,_ValArray,_Constant,_Tp,_Tp> _Closure; retur n _Expr<_Closure, bool> (_Closure (__v, __t)); } template inline _Expr<_BinClos< logical_or ,_Constant,_ValArray,_Tp,_Tp>,bool> operator|| (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< logical_or ,_Constant,_ValArray,_Tp,_T p> _Closure; return _Expr<_Closure, bool> (_Closure (__t, __v)); } template inline _Expr<_BinClos< equal_to ,_ValArray,_ValArray,_Tp,_Tp>,bool> operator== (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< equal_to ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, bool > (_Closure (__v, __w)); } template inline _Expr<_BinClos< equal_to ,_ValArray,_Constant,_Tp,_Tp>,bool> operator== (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< equal_to ,_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr< _Closure, bool> (_Closure (__v, __t)); } template inline _Expr<_BinClos< equal_to ,_Constant,_ValArray,_Tp,_Tp>,bool> operator== (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< equal_to ,_Constant,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, bool> (_Closure (__t, __v)); } template inline _Expr<_BinClos< not_equal_to ,_ValArray,_ValArray,_Tp,_Tp>,bool> operator!= (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< not_equal_to ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closu re, bool> (_Closure (__v, __w)); } template inline _Expr<_BinClos< not_equal_to ,_ValArray,_Constant,_Tp,_Tp>,bool> operator!= (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< not_equal_to ,_ValArray,_Constant,_Tp,_Tp> _Closur e; return _Expr<_Closure, bool> (_Closure (__v, __t)); } template inline _Expr<_BinClos< not_equal_to ,_Constant,_ValArray,_Tp,_Tp>,bool> operator!= (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< not_equal_to ,_Constant,_Val Array,_Tp,_Tp> _Closure; return _Expr<_Closure, bool> (_Closure (__t, __v)); } template inline _Expr<_BinClos< less ,_ValArray,_ValArray,_Tp,_Tp>,bool> operator< (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< less ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, bool> (_Closu re (__v, __w)); } template inline _Expr<_BinClos< less ,_ValArray,_Constant,_Tp,_Tp>,bool> operator< (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< less ,_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Closure, bool> (_ Closure (__v, __t)); } template inline _Expr<_BinClos< less ,_Constant,_ValArray,_Tp,_Tp>,bool> operator< (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< less ,_Constant,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, boo l> (_Closure (__t, __v)); } template inline _Expr<_BinClos< greater ,_ValArray,_ValArray,_Tp,_Tp>,bool> operator> (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< greater ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, bool> ( _Closure (__v, __w)); } template inline _Expr<_BinClos< greater ,_ValArray,_Constant,_Tp,_Tp>,bool> operator> (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< greater ,_ValArray,_Constant,_Tp,_Tp> _Closure; return _Expr<_Closu re, bool> (_Closure (__v, __t)); } template inline _Expr<_BinClos< greater ,_Constant,_ValArray,_Tp,_Tp>,bool> operator> (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< greater ,_Constant,_ValArray,_Tp,_Tp> _Closure; return _ Expr<_Closure, bool> (_Closure (__t, __v)); } template inline _Expr<_BinClos< less_equal ,_ValArray,_ValArray,_Tp,_Tp>,bool> operator<= (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< less_equal ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, bool> (_Closure (__v, __w)); } template inline _Expr<_BinClos< less_equal ,_ValArray,_Constant,_Tp,_Tp>,bool> operator<= (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< less_equal ,_ValArray,_Constant,_Tp,_Tp> _Closure; retur n _Expr<_Closure, bool> (_Closure (__v, __t)); } template inline _Expr<_BinClos< less_equal ,_Constant,_ValArray,_Tp,_Tp>,bool> operator<= (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< less_equal ,_Constant,_ValArray,_Tp,_T p> _Closure; return _Expr<_Closure, bool> (_Closure (__t, __v)); } template inline _Expr<_BinClos< greater_equal ,_ValArray,_ValArray,_Tp,_Tp>,bool> operator>= (const valarray<_Tp> &__v, const valarray<_Tp> &__w) { typedef _BinClos< greater_equal ,_ValArray,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Clo sure, bool> (_Closure (__v, __w)); } template inline _Expr<_BinClos< greater_equal ,_ValArray,_Constant,_Tp,_Tp>,bool> operator>= (const valarray<_Tp> &__v, const _Tp &__t) { typedef _BinClos< greater_equal ,_ValArray,_Constant,_Tp,_Tp> _Cl osure; return _Expr<_Closure, bool> (_Closure (__v, __t)); } template inline _Expr<_BinClos< greater_equal ,_Constant,_ValArray,_Tp,_Tp>,bool> operator>= (const _Tp &__t, const valarray<_Tp> &__v) { typedef _BinClos< greater_equal ,_Constan t,_ValArray,_Tp,_Tp> _Closure; return _Expr<_Closure, bool> (_Closure (__t, __v)); } } # 6 "/usr/include/g++/valarray" 2 3 # 1 "simple3.cc" 2 # 1 "/usr/include/g++/iostream" 1 3 # 2 "simple3.cc" 2 using namespace std; typedef int N; int main(){ N v[] = {11,22,33}; N dest[] = {0,0,0}; valarray va(v, 3); valarray destv1(dest, 3); slice s(0,1,1); destv1[s] = va[s]; } ----gnatsweb-attachment---- Content-Type: text/plain; name="simple3.ii" Content-Disposition: inline; filename="simple3.ii" # 1 "simple3.cc" # 1 "/usr/include/g++/valarray" 1 3 # 1 "/usr/include/g++/std/std_valarray.h" 1 3 # 1 "/usr/include/g++/cstddef" 1 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 61 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 typedef int ptrdiff_t; typedef unsigned int size_t; typedef unsigned int wint_t; # 317 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 6 "/usr/include/g++/cstddef" 2 3 # 36 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/cmath" 1 3 # 1 "/usr/include/_G_config.h" 1 3 # 1 "/usr/include/bits/types.h" 1 3 # 1 "/usr/include/features.h" 1 3 # 138 "/usr/include/features.h" 3 # 196 "/usr/include/features.h" 3 # 1 "/usr/include/sys/cdefs.h" 1 3 # 71 "/usr/include/sys/cdefs.h" 3 # 103 "/usr/include/sys/cdefs.h" 3 # 250 "/usr/include/features.h" 2 3 # 1 "/usr/include/gnu/stubs.h" 1 3 # 278 "/usr/include/features.h" 2 3 # 26 "/usr/include/bits/types.h" 2 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 19 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 61 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 126 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 188 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 269 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 317 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 29 "/usr/include/bits/types.h" 2 3 typedef unsigned char __u_char; typedef unsigned short __u_short; typedef unsigned int __u_int; typedef unsigned long __u_long; __extension__ typedef unsigned long long int __u_quad_t; __extension__ typedef long long int __quad_t; # 48 "/usr/include/bits/types.h" 3 typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; typedef __quad_t *__qaddr_t; typedef __u_quad_t __dev_t; typedef __u_int __uid_t; typedef __u_int __gid_t; typedef __u_long __ino_t; typedef __u_int __mode_t; typedef __u_int __nlink_t; typedef long int __off_t; typedef __quad_t __loff_t; typedef int __pid_t; typedef int __ssize_t; typedef __u_long __rlim_t; typedef __u_quad_t __rlim64_t; typedef __u_int __id_t; typedef struct { int __val[2]; } __fsid_t; typedef int __daddr_t; typedef char *__caddr_t; typedef long int __time_t; typedef long int __swblk_t; typedef long int __clock_t; typedef unsigned long int __fd_mask; typedef struct { __fd_mask __fds_bits[1024 / (8 * sizeof (__fd_mask)) ]; } __fd_set; typedef int __key_t; typedef unsigned short int __ipc_pid_t; typedef long int __blkcnt_t; typedef __quad_t __blkcnt64_t; typedef __u_long __fsblkcnt_t; typedef __u_quad_t __fsblkcnt64_t; typedef __u_long __fsfilcnt_t; typedef __u_quad_t __fsfilcnt64_t; typedef __u_long __ino64_t; typedef __loff_t __off64_t; typedef long int __t_scalar_t; typedef unsigned long int __t_uscalar_t; typedef int __intptr_t; # 9 "/usr/include/_G_config.h" 2 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 19 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 61 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 126 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 188 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 269 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 317 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 14 "/usr/include/_G_config.h" 2 3 typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); # 6 "/usr/include/g++/cmath" 2 3 # 1 "/usr/include/math.h" 1 3 extern "C" { # 1 "/usr/include/bits/huge_val.h" 1 3 # 68 "/usr/include/bits/huge_val.h" 3 # 33 "/usr/include/math.h" 2 3 # 1 "/usr/include/bits/mathdef.h" 1 3 # 47 "/usr/include/bits/mathdef.h" 3 # 40 "/usr/include/math.h" 2 3 # 1 "/usr/include/bits/mathcalls.h" 1 3 extern double acos (double __x) ; extern double __acos (double __x) ; extern double asin (double __x) ; extern double __asin (double __x) ; extern double atan (double __x) ; extern double __atan (double __x) ; extern double atan2 (double __y, double __x) ; extern double __atan2 (double __y, double __x) ; extern double cos (double __x) ; extern double __cos (double __x) ; extern double sin (double __x) ; extern double __sin (double __x) ; extern double tan (double __x) ; extern double __tan (double __x) ; extern double cosh (double __x) ; extern double __cosh (double __x) ; extern double sinh (double __x) ; extern double __sinh (double __x) ; extern double tanh (double __x) ; extern double __tanh (double __x) ; extern double acosh (double __x) ; extern double __acosh (double __x) ; extern double asinh (double __x) ; extern double __asinh (double __x) ; extern double atanh (double __x) ; extern double __atanh (double __x) ; extern double exp (double __x) ; extern double __exp (double __x) ; extern double frexp (double __x, int *__exponent) ; extern double __frexp (double __x, int *__exponent) ; extern double ldexp (double __x, int __exponent) ; extern double __ldexp (double __x, int __exponent) ; extern double log (double __x) ; extern double __log (double __x) ; extern double log10 (double __x) ; extern double __log10 (double __x) ; extern double modf (double __x, double *__iptr) ; extern double __modf (double __x, double *__iptr) ; extern double expm1 (double __x) ; extern double __expm1 (double __x) ; extern double log1p (double __x) ; extern double __log1p (double __x) ; extern double logb (double __x) ; extern double __logb (double __x) ; extern double pow (double __x, double __y) ; extern double __pow (double __x, double __y) ; extern double sqrt (double __x) ; extern double __sqrt (double __x) ; extern double hypot (double __x, double __y) ; extern double __hypot (double __x, double __y) ; extern double cbrt (double __x) ; extern double __cbrt (double __x) ; extern double ceil (double __x) ; extern double __ceil (double __x) ; extern double fabs (double __x) __attribute__ ( (__const__) ); extern double __fabs (double __x) __attribute__ ( (__const__) ) ; extern double floor (double __x) ; extern double __floor (double __x) ; extern double fmod (double __x, double __y) ; extern double __fmod (double __x, double __y) ; extern int __isinf (double __value) __attribute__ ((__const__)); extern int __finite (double __value) __attribute__ ((__const__)); extern int isinf (double __value) __attribute__ ((__const__)); extern int finite (double __value) __attribute__ ((__const__)); extern double infnan (int __error) __attribute__ ( (__const__) ); extern double __infnan (int __error) __attribute__ ( (__const__) ) ; extern double drem (double __x, double __y) ; extern double __drem (double __x, double __y) ; extern double significand (double __x) ; extern double __significand (double __x) ; extern double copysign (double __x, double __y) __attribute__ ( (__const__) ); extern double __copysign (double __x, double __y) __attribute__ ( (__const__) ) ; extern int __isnan (double __value) __attribute__ ((__const__)); extern int isnan (double __value) __attribute__ ((__const__)); extern double j0 (double ) ; extern double __j0 (double ) ; extern double j1 (double ) ; extern double __j1 (double ) ; extern double jn (int, double ) ; extern double __jn (int, double ) ; extern double y0 (double ) ; extern double __y0 (double ) ; extern double y1 (double ) ; extern double __y1 (double ) ; extern double yn (int, double ) ; extern double __yn (int, double ) ; extern double erf (double ) ; extern double __erf (double ) ; extern double erfc (double ) ; extern double __erfc (double ) ; extern double lgamma (double ) ; extern double __lgamma (double ) ; extern double tgamma (double ) ; extern double __tgamma (double ) ; extern double gamma (double ) ; extern double __gamma (double ) ; extern double lgamma_r (double , int *__signgamp) ; extern double __lgamma_r (double , int *__signgamp) ; extern double rint (double __x) ; extern double __rint (double __x) ; extern double nextafter (double __x, double __y) __attribute__ ( (__const__) ); extern double __nextafter (double __x, double __y) __attribute__ ( (__const__) ) ; extern double remainder (double __x, double __y) ; extern double __remainder (double __x, double __y) ; extern double scalb (double __x, double __n) ; extern double __scalb (double __x, double __n) ; extern double scalbn (double __x, int __n) ; extern double __scalbn (double __x, int __n) ; extern int ilogb (double __x) ; extern int __ilogb (double __x) ; # 336 "/usr/include/bits/mathcalls.h" 3 # 63 "/usr/include/math.h" 2 3 # 1 "/usr/include/bits/mathcalls.h" 1 3 extern float acosf (float __x) ; extern float __acosf (float __x) ; extern float asinf (float __x) ; extern float __asinf (float __x) ; extern float atanf (float __x) ; extern float __atanf (float __x) ; extern float atan2f (float __y, float __x) ; extern float __atan2f (float __y, float __x) ; extern float cosf (float __x) ; extern float __cosf (float __x) ; extern float sinf (float __x) ; extern float __sinf (float __x) ; extern float tanf (float __x) ; extern float __tanf (float __x) ; extern float coshf (float __x) ; extern float __coshf (float __x) ; extern float sinhf (float __x) ; extern float __sinhf (float __x) ; extern float tanhf (float __x) ; extern float __tanhf (float __x) ; extern float acoshf (float __x) ; extern float __acoshf (float __x) ; extern float asinhf (float __x) ; extern float __asinhf (float __x) ; extern float atanhf (float __x) ; extern float __atanhf (float __x) ; extern float expf (float __x) ; extern float __expf (float __x) ; extern float frexpf (float __x, int *__exponent) ; extern float __frexpf (float __x, int *__exponent) ; extern float ldexpf (float __x, int __exponent) ; extern float __ldexpf (float __x, int __exponent) ; extern float logf (float __x) ; extern float __logf (float __x) ; extern float log10f (float __x) ; extern float __log10f (float __x) ; extern float modff (float __x, float *__iptr) ; extern float __modff (float __x, float *__iptr) ; extern float expm1f (float __x) ; extern float __expm1f (float __x) ; extern float log1pf (float __x) ; extern float __log1pf (float __x) ; extern float logbf (float __x) ; extern float __logbf (float __x) ; extern float powf (float __x, float __y) ; extern float __powf (float __x, float __y) ; extern float sqrtf (float __x) ; extern float __sqrtf (float __x) ; extern float hypotf (float __x, float __y) ; extern float __hypotf (float __x, float __y) ; extern float cbrtf (float __x) ; extern float __cbrtf (float __x) ; extern float ceilf (float __x) ; extern float __ceilf (float __x) ; extern float fabsf (float __x) __attribute__ ( (__const__) ); extern float __fabsf (float __x) __attribute__ ( (__const__) ) ; extern float floorf (float __x) ; extern float __floorf (float __x) ; extern float fmodf (float __x, float __y) ; extern float __fmodf (float __x, float __y) ; extern int __isinff (float __value) __attribute__ ((__const__)); extern int __finitef (float __value) __attribute__ ((__const__)); extern int isinff (float __value) __attribute__ ((__const__)); extern int finitef (float __value) __attribute__ ((__const__)); extern float infnanf (int __error) __attribute__ ( (__const__) ); extern float __infnanf (int __error) __attribute__ ( (__const__) ) ; extern float dremf (float __x, float __y) ; extern float __dremf (float __x, float __y) ; extern float significandf (float __x) ; extern float __significandf (float __x) ; extern float copysignf (float __x, float __y) __attribute__ ( (__const__) ); extern float __copysignf (float __x, float __y) __attribute__ ( (__const__) ) ; extern int __isnanf (float __value) __attribute__ ((__const__)); extern int isnanf (float __value) __attribute__ ((__const__)); extern float j0f (float ) ; extern float __j0f (float ) ; extern float j1f (float ) ; extern float __j1f (float ) ; extern float jnf (int, float ) ; extern float __jnf (int, float ) ; extern float y0f (float ) ; extern float __y0f (float ) ; extern float y1f (float ) ; extern float __y1f (float ) ; extern float ynf (int, float ) ; extern float __ynf (int, float ) ; extern float erff (float ) ; extern float __erff (float ) ; extern float erfcf (float ) ; extern float __erfcf (float ) ; extern float lgammaf (float ) ; extern float __lgammaf (float ) ; extern float tgammaf (float ) ; extern float __tgammaf (float ) ; extern float gammaf (float ) ; extern float __gammaf (float ) ; extern float lgammaf_r (float , int *__signgamp) ; extern float __lgammaf_r (float , int *__signgamp) ; extern float rintf (float __x) ; extern float __rintf (float __x) ; extern float nextafterf (float __x, float __y) __attribute__ ( (__const__) ); extern float __nextafterf (float __x, float __y) __attribute__ ( (__const__) ) ; extern float remainderf (float __x, float __y) ; extern float __remainderf (float __x, float __y) ; extern float scalbf (float __x, float __n) ; extern float __scalbf (float __x, float __n) ; extern float scalbnf (float __x, int __n) ; extern float __scalbnf (float __x, int __n) ; extern int ilogbf (float __x) ; extern int __ilogbf (float __x) ; # 336 "/usr/include/bits/mathcalls.h" 3 # 82 "/usr/include/math.h" 2 3 # 1 "/usr/include/bits/mathcalls.h" 1 3 extern long double acosl (long double __x) ; extern long double __acosl (long double __x) ; extern long double asinl (long double __x) ; extern long double __asinl (long double __x) ; extern long double atanl (long double __x) ; extern long double __atanl (long double __x) ; extern long double atan2l (long double __y, long double __x) ; extern long double __atan2l (long double __y, long double __x) ; extern long double cosl (long double __x) ; extern long double __cosl (long double __x) ; extern long double sinl (long double __x) ; extern long double __sinl (long double __x) ; extern long double tanl (long double __x) ; extern long double __tanl (long double __x) ; extern long double coshl (long double __x) ; extern long double __coshl (long double __x) ; extern long double sinhl (long double __x) ; extern long double __sinhl (long double __x) ; extern long double tanhl (long double __x) ; extern long double __tanhl (long double __x) ; extern long double acoshl (long double __x) ; extern long double __acoshl (long double __x) ; extern long double asinhl (long double __x) ; extern long double __asinhl (long double __x) ; extern long double atanhl (long double __x) ; extern long double __atanhl (long double __x) ; extern long double expl (long double __x) ; extern long double __expl (long double __x) ; extern long double frexpl (long double __x, int *__exponent) ; extern long double __frexpl (long double __x, int *__exponent) ; extern long double ldexpl (long double __x, int __exponent) ; extern long double __ldexpl (long double __x, int __exponent) ; extern long double logl (long double __x) ; extern long double __logl (long double __x) ; extern long double log10l (long double __x) ; extern long double __log10l (long double __x) ; extern long double modfl (long double __x, long double *__iptr) ; extern long double __modfl (long double __x, long double *__iptr) ; extern long double expm1l (long double __x) ; extern long double __expm1l (long double __x) ; extern long double log1pl (long double __x) ; extern long double __log1pl (long double __x) ; extern long double logbl (long double __x) ; extern long double __logbl (long double __x) ; extern long double powl (long double __x, long double __y) ; extern long double __powl (long double __x, long double __y) ; extern long double sqrtl (long double __x) ; extern long double __sqrtl (long double __x) ; extern long double hypotl (long double __x, long double __y) ; extern long double __hypotl (long double __x, long double __y) ; extern long double cbrtl (long double __x) ; extern long double __cbrtl (long double __x) ; extern long double ceill (long double __x) ; extern long double __ceill (long double __x) ; extern long double fabsl (long double __x) __attribute__ ( (__const__) ); extern long double __fabsl (long double __x) __attribute__ ( (__const__) ) ; extern long double floorl (long double __x) ; extern long double __floorl (long double __x) ; extern long double fmodl (long double __x, long double __y) ; extern long double __fmodl (long double __x, long double __y) ; extern int __isinfl (long double __value) __attribute__ ((__const__)); extern int __finitel (long double __value) __attribute__ ((__const__)); extern int isinfl (long double __value) __attribute__ ((__const__)); extern int finitel (long double __value) __attribute__ ((__const__)); extern long double infnanl (int __error) __attribute__ ( (__const__) ); extern long double __infnanl (int __error) __attribute__ ( (__const__) ) ; extern long double dreml (long double __x, long double __y) ; extern long double __dreml (long double __x, long double __y) ; extern long double significandl (long double __x) ; extern long double __significandl (long double __x) ; extern long double copysignl (long double __x, long double __y) __attribute__ ( (__const__) ); extern long double __copysignl (long double __x, long double __y) __attribute__ ( (__const__) ) ; extern int __isnanl (long double __value) __attribute__ ((__const__)); extern int isnanl (long double __value) __attribute__ ((__const__)); extern long double j0l (long double ) ; extern long double __j0l (long double ) ; extern long double j1l (long double ) ; extern long double __j1l (long double ) ; extern long double jnl (int, long double ) ; extern long double __jnl (int, long double ) ; extern long double y0l (long double ) ; extern long double __y0l (long double ) ; extern long double y1l (long double ) ; extern long double __y1l (long double ) ; extern long double ynl (int, long double ) ; extern long double __ynl (int, long double ) ; extern long double erfl (long double ) ; extern long double __erfl (long double ) ; extern long double erfcl (long double ) ; extern long double __erfcl (long double ) ; extern long double lgammal (long double ) ; extern long double __lgammal (long double ) ; extern long double tgammal (long double ) ; extern long double __tgammal (long double ) ; extern long double gammal (long double ) ; extern long double __gammal (long double ) ; extern long double lgammal_r (long double , int *__signgamp) ; extern long double __lgammal_r (long double , int *__signgamp) ; extern long double rintl (long double __x) ; extern long double __rintl (long double __x) ; extern long double nextafterl (long double __x, long double __y) __attribute__ ( (__const__) ); extern long double __nextafterl (long double __x, long double __y) __attribute__ ( (__const__) ) ; extern long double remainderl (long double __x, long double __y) ; extern long double __remainderl (long double __x, long double __y) ; extern long double scalbl (long double __x, long double __n) ; extern long double __scalbl (long double __x, long double __n) ; extern long double scalbnl (long double __x, int __n) ; extern long double __scalbnl (long double __x, int __n) ; extern int ilogbl (long double __x) ; extern int __ilogbl (long double __x) ; # 336 "/usr/include/bits/mathcalls.h" 3 # 99 "/usr/include/math.h" 2 3 extern int signgam; # 232 "/usr/include/math.h" 3 typedef enum { _IEEE_ = -1, _SVID_, _XOPEN_, _POSIX_, _ISOC_ } _LIB_VERSION_TYPE; extern _LIB_VERSION_TYPE _LIB_VERSION; struct __exception { int type; char *name; double arg1; double arg2; double retval; }; extern int matherr (struct __exception *__exc) throw () ; # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/float.h" 1 3 union __convert_long_double { unsigned __convert_long_double_i[4]; long double __convert_long_double_d; }; # 289 "/usr/include/math.h" 2 3 # 299 "/usr/include/math.h" 3 # 336 "/usr/include/math.h" 3 # 407 "/usr/include/math.h" 3 } # 7 "/usr/include/g++/cmath" 2 3 #pragma interface "cmath" extern "C++" { # 38 "/usr/include/g++/cmath" 3 inline float abs (float x) { return fabs (x); } inline double abs (double x) { return fabs (x); } # 71 "/usr/include/g++/cmath" 3 inline long double abs (long double x) { return fabs (x); } } # 37 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/cstdlib" 1 3 # 1 "/usr/include/stdlib.h" 1 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 19 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 61 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 126 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 188 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 269 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 317 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 33 "/usr/include/stdlib.h" 2 3 extern "C" { typedef struct { int quot; int rem; } div_t; typedef struct { long int quot; long int rem; } ldiv_t; # 65 "/usr/include/stdlib.h" 3 extern size_t __ctype_get_mb_cur_max (void) throw () ; extern double atof (__const char *__nptr) throw () ; extern int atoi (__const char *__nptr) throw () ; extern long int atol (__const char *__nptr) throw () ; __extension__ extern long long int atoll (__const char *__nptr) throw () ; extern double strtod (__const char *__restrict __nptr, char **__restrict __endptr) throw () ; extern long int strtol (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () ; extern unsigned long int strtoul (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () ; __extension__ extern long long int strtoq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () ; __extension__ extern unsigned long long int strtouq (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () ; __extension__ extern long long int strtoll (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () ; __extension__ extern unsigned long long int strtoull (__const char *__restrict __nptr, char **__restrict __endptr, int __base) throw () ; # 190 "/usr/include/stdlib.h" 3 extern double __strtod_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () ; extern float __strtof_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __group) throw () ; extern long double __strtold_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __group) throw () ; extern long int __strtol_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () ; extern unsigned long int __strtoul_internal (__const char * __restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () ; __extension__ extern long long int __strtoll_internal (__const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) throw () ; __extension__ extern unsigned long long int __strtoull_internal (__const char * __restrict __nptr, char ** __restrict __endptr, int __base, int __group) throw () ; # 326 "/usr/include/stdlib.h" 3 extern char *l64a (long int __n) throw () ; extern long int a64l (__const char *__s) throw () ; # 1 "/usr/include/sys/types.h" 1 3 extern "C" { typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 1 "/usr/include/time.h" 1 3 # 51 "/usr/include/time.h" 3 # 62 "/usr/include/time.h" 3 typedef __time_t time_t; # 89 "/usr/include/time.h" 3 # 279 "/usr/include/time.h" 3 # 123 "/usr/include/sys/types.h" 2 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 19 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 61 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 126 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 188 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 269 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 317 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 126 "/usr/include/sys/types.h" 2 3 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 160 "/usr/include/sys/types.h" 3 typedef int int8_t __attribute__ ((__mode__ ( __QI__ ))) ; typedef int int16_t __attribute__ ((__mode__ ( __HI__ ))) ; typedef int int32_t __attribute__ ((__mode__ ( __SI__ ))) ; typedef int int64_t __attribute__ ((__mode__ ( __DI__ ))) ; typedef unsigned int u_int8_t __attribute__ ((__mode__ ( __QI__ ))) ; typedef unsigned int u_int16_t __attribute__ ((__mode__ ( __HI__ ))) ; typedef unsigned int u_int32_t __attribute__ ((__mode__ ( __SI__ ))) ; typedef unsigned int u_int64_t __attribute__ ((__mode__ ( __DI__ ))) ; typedef int register_t __attribute__ ((__mode__ (__word__))); # 1 "/usr/include/endian.h" 1 3 # 1 "/usr/include/bits/endian.h" 1 3 # 35 "/usr/include/endian.h" 2 3 # 192 "/usr/include/sys/types.h" 2 3 # 1 "/usr/include/sys/select.h" 1 3 # 1 "/usr/include/bits/select.h" 1 3 # 36 "/usr/include/bits/select.h" 3 # 56 "/usr/include/bits/select.h" 3 # 72 "/usr/include/bits/select.h" 3 # 31 "/usr/include/sys/select.h" 2 3 # 1 "/usr/include/bits/sigset.h" 1 3 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int))) ]; } __sigset_t; # 125 "/usr/include/bits/sigset.h" 3 # 34 "/usr/include/sys/select.h" 2 3 # 1 "/usr/include/time.h" 1 3 # 51 "/usr/include/time.h" 3 # 62 "/usr/include/time.h" 3 # 73 "/usr/include/time.h" 3 struct timespec { long int tv_sec; long int tv_nsec; }; # 279 "/usr/include/time.h" 3 # 38 "/usr/include/sys/select.h" 2 3 extern "C" { struct timeval; typedef __fd_mask fd_mask; typedef __fd_set fd_set; extern int __select (int __nfds, __fd_set *__readfds, __fd_set *__writefds, __fd_set *__exceptfds, struct timeval *__timeout) throw () ; extern int select (int __nfds, __fd_set *__readfds, __fd_set *__writefds, __fd_set *__exceptfds, struct timeval *__timeout) throw () ; # 91 "/usr/include/sys/select.h" 3 } # 195 "/usr/include/sys/types.h" 2 3 # 1 "/usr/include/sys/sysmacros.h" 1 3 # 47 "/usr/include/sys/sysmacros.h" 3 # 198 "/usr/include/sys/types.h" 2 3 typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; } # 339 "/usr/include/stdlib.h" 2 3 extern int32_t random (void) throw () ; extern void srandom (unsigned int __seed) throw () ; extern void * initstate (unsigned int __seed, void * __statebuf, size_t __statelen) throw () ; extern void * setstate (void * __statebuf) throw () ; struct random_data { int32_t *fptr; int32_t *rptr; int32_t *state; int rand_type; int rand_deg; int rand_sep; int32_t *end_ptr; }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) throw () ; extern int srandom_r (unsigned int __seed, struct random_data *__buf) throw () ; extern int initstate_r (unsigned int __seed, void * __restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) throw () ; extern int setstate_r (void * __restrict __statebuf, struct random_data *__restrict __buf) throw () ; extern int rand (void) throw () ; extern void srand (unsigned int __seed) throw () ; extern int rand_r (unsigned int *__seed) throw () ; extern double drand48 (void) throw () ; extern double erand48 (unsigned short int __xsubi[3]) throw () ; extern long int lrand48 (void) throw () ; extern long int nrand48 (unsigned short int __xsubi[3]) throw () ; extern long int mrand48 (void) throw () ; extern long int jrand48 (unsigned short int __xsubi[3]) throw () ; extern void srand48 (long int __seedval) throw () ; extern unsigned short int *seed48 (unsigned short int __seed16v[3]) throw () ; extern void lcong48 (unsigned short int __param[7]) throw () ; struct drand48_data { unsigned short int x[3]; unsigned short int a[3]; unsigned short int c; unsigned short int old_x[3]; int init; }; extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) throw () ; extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) throw () ; extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () ; extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () ; extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () ; extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) throw () ; extern int srand48_r (long int __seedval, struct drand48_data *__buffer) throw () ; extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) throw () ; extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) throw () ; extern void * malloc (size_t __size) throw () ; extern void * calloc (size_t __nmemb, size_t __size) throw () ; extern void * realloc (void * __ptr, size_t __size) throw () ; extern void free (void * __ptr) throw () ; extern void cfree (void * __ptr) throw () ; # 1 "/usr/include/alloca.h" 1 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 19 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 61 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 126 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 188 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 269 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 317 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 25 "/usr/include/alloca.h" 2 3 extern "C" { extern void * alloca (size_t __size) throw () ; } # 492 "/usr/include/stdlib.h" 2 3 extern void * valloc (size_t __size) throw () ; extern void abort (void) throw () __attribute__ ((__noreturn__)); extern int atexit (void (*__func) (void)) throw () ; extern int __on_exit (void (*__func) (int __status, void * __arg), void * __arg) throw () ; extern int on_exit (void (*__func) (int __status, void * __arg), void * __arg) throw () ; extern void exit (int __status) throw () __attribute__ ((__noreturn__)); extern char *getenv (__const char *__name) throw () ; extern char *__secure_getenv (__const char *__name) throw () ; extern int putenv (char *__string) throw () ; extern int setenv (__const char *__name, __const char *__value, int __replace) throw () ; extern void unsetenv (__const char *__name) throw () ; extern int clearenv (void) throw () ; extern char *mktemp (char *__template) throw () ; extern int mkstemp (char *__template) throw () ; extern int system (__const char *__command) throw () ; extern char *realpath (__const char *__restrict __name, char *__restrict __resolved) throw () ; typedef int (*__compar_fn_t) (__const void * , __const void * ) ; extern void * bsearch (__const void * __key, __const void * __base, size_t __nmemb, size_t __size, __compar_fn_t __compar) ; extern void qsort (void * __base, size_t __nmemb, size_t __size, __compar_fn_t __compar) ; extern int abs (int __x) throw () __attribute__ ((__const__)); extern long int labs (long int __x) throw () __attribute__ ((__const__)); extern div_t div (int __numer, int __denom) throw () __attribute__ ((__const__)); extern ldiv_t ldiv (long int __numer, long int __denom) throw () __attribute__ ((__const__)); extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () ; extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () ; extern char *gcvt (double __value, int __ndigit, char *__buf) throw () ; extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () ; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) throw () ; extern char *qgcvt (long double __value, int __ndigit, char *__buf) throw () ; extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () ; extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () ; extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () ; extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) throw () ; extern int mblen (__const char *__s, size_t __n) throw () ; extern int mbtowc (wchar_t *__restrict __pwc, __const char *__restrict __s, size_t __n) throw () ; extern int wctomb (char *__s, wchar_t __wchar) throw () ; extern size_t mbstowcs (wchar_t *__restrict __pwcs, __const char *__restrict __s, size_t __n) throw () ; extern size_t wcstombs (char *__restrict __s, __const wchar_t *__restrict __pwcs, size_t __n) throw () ; extern int rpmatch (__const char *__response) throw () ; # 732 "/usr/include/stdlib.h" 3 # 756 "/usr/include/stdlib.h" 3 # 766 "/usr/include/stdlib.h" 3 } # 6 "/usr/include/g++/cstdlib" 2 3 #pragma interface "cstdlib" extern "C++" { inline long abs(long x) { return x >= 0 ? x : -x; } } # 38 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/numeric" 1 3 # 1 "/usr/include/g++/stl_config.h" 1 3 # 148 "/usr/include/g++/stl_config.h" 3 # 234 "/usr/include/g++/stl_config.h" 3 # 248 "/usr/include/g++/stl_config.h" 3 # 316 "/usr/include/g++/stl_config.h" 3 # 30 "/usr/include/g++/numeric" 2 3 # 1 "/usr/include/g++/stl_relops.h" 1 3 template inline bool operator!=(const _Tp& __x, const _Tp& __y) { return !(__x == __y); } template inline bool operator>(const _Tp& __x, const _Tp& __y) { return __y < __x; } template inline bool operator<=(const _Tp& __x, const _Tp& __y) { return !(__y < __x); } template inline bool operator>=(const _Tp& __x, const _Tp& __y) { return !(__x < __y); } # 31 "/usr/include/g++/numeric" 2 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 342 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 32 "/usr/include/g++/numeric" 2 3 # 1 "/usr/include/g++/iostream.h" 1 3 #pragma interface # 1 "/usr/include/g++/streambuf.h" 1 3 #pragma interface extern "C" { # 1 "/usr/include/libio.h" 1 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h" 1 3 typedef void *__gnuc_va_list; # 122 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h" 3 # 209 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h" 3 # 48 "/usr/include/libio.h" 2 3 # 67 "/usr/include/libio.h" 3 # 98 "/usr/include/libio.h" 3 struct _IO_jump_t; struct _IO_FILE; typedef void _IO_lock_t; struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; int _pos; # 186 "/usr/include/libio.h" 3 }; struct _IO_FILE { int _flags; char* _IO_read_ptr; char* _IO_read_end; char* _IO_read_base; char* _IO_write_base; char* _IO_write_ptr; char* _IO_write_end; char* _IO_buf_base; char* _IO_buf_end; char *_IO_save_base; char *_IO_backup_base; char *_IO_save_end; struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; int _blksize; __off_t _old_offset; unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; _IO_lock_t *_lock; __off64_t _offset; int _unused2[16]; }; struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; typedef __ssize_t __io_read_fn (void * __cookie, char *__buf, size_t __nbytes) ; typedef __ssize_t __io_write_fn (void * __cookie, __const char *__buf, size_t __n) ; typedef int __io_seek_fn (void * __cookie, __off_t __pos, int __w) ; typedef int __io_close_fn (void * __cookie) ; # 311 "/usr/include/libio.h" 3 extern "C" { extern int __underflow (_IO_FILE *) throw () ; extern int __uflow (_IO_FILE *) throw () ; extern int __overflow (_IO_FILE *, int) throw () ; extern int _IO_getc (_IO_FILE *__fp) throw () ; extern int _IO_putc (int __c, _IO_FILE *__fp) throw () ; extern int _IO_feof (_IO_FILE *__fp) throw () ; extern int _IO_ferror (_IO_FILE *__fp) throw () ; extern int _IO_peekc_locked (_IO_FILE *__fp) throw () ; extern void _IO_flockfile (_IO_FILE *) throw () ; extern void _IO_funlockfile (_IO_FILE *) throw () ; extern int _IO_ftrylockfile (_IO_FILE *) throw () ; extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list , int *__restrict) throw () ; extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list ) throw () ; extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t ) throw () ; extern size_t _IO_sgetn (_IO_FILE *, void *, size_t ) throw () ; extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t , int, int) throw () ; extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t , int) throw () ; extern void _IO_free_backup_area (_IO_FILE *) throw () ; } # 36 "/usr/include/g++/streambuf.h" 2 3 } # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h" 1 3 void va_end (__gnuc_va_list); # 175 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h" 3 typedef __gnuc_va_list va_list; # 40 "/usr/include/g++/streambuf.h" 2 3 extern "C++" { class istream; class ostream; class streambuf; typedef __off64_t streamoff; typedef __off64_t streampos; typedef __ssize_t streamsize; typedef unsigned long __fmtflags; typedef unsigned char __iostate; struct _ios_fields { streambuf *_strbuf; ostream* _tie; int _width; __fmtflags _flags; wchar_t _fill; __iostate _state; __iostate _exceptions; int _precision; void *_arrays; }; # 124 "/usr/include/g++/streambuf.h" 3 class ios : public _ios_fields { ios& operator=(ios&); ios (const ios&); public: typedef __fmtflags fmtflags; typedef int iostate; typedef int openmode; typedef __ssize_t streamsize; enum io_state { goodbit = 0 , eofbit = 1 , failbit = 2 , badbit = 4 }; enum open_mode { in = 1 , out = 2 , ate = 4 , app = 8 , trunc = 16 , nocreate = 32 , noreplace = 64 , bin = 128 , binary = 128 }; enum seek_dir { beg, cur, end}; typedef enum seek_dir seekdir; enum { skipws= 01 , left= 02 , right= 04 , internal= 010 , dec= 020 , oct= 040 , hex= 0100 , showbase= 0200 , showpoint= 0400 , uppercase= 01000 , showpos= 02000 , scientific= 04000 , fixed= 010000 , unitbuf= 020000 , stdio= 040000 }; enum { basefield=dec+oct+hex, floatfield = scientific+fixed, adjustfield = left+right+internal }; # 177 "/usr/include/g++/streambuf.h" 3 ostream* tie() const { return _tie; } ostream* tie(ostream* val) { ostream* save=_tie; _tie=val; return save; } wchar_t fill() const { return _fill; } wchar_t fill(wchar_t newf) {wchar_t oldf = _fill; _fill = newf; return oldf;} fmtflags flags() const { return _flags; } fmtflags flags(fmtflags new_val) { fmtflags old_val = _flags; _flags = new_val; return old_val; } int precision() const { return _precision; } int precision(int newp) { unsigned short oldp = _precision; _precision = (unsigned short)newp; return oldp; } fmtflags setf(fmtflags val) { fmtflags oldbits = _flags; _flags |= val; return oldbits; } fmtflags setf(fmtflags val, fmtflags mask) { fmtflags oldbits = _flags; _flags = (_flags & ~mask) | (val & mask); return oldbits; } fmtflags unsetf(fmtflags mask) { fmtflags oldbits = _flags; _flags &= ~mask; return oldbits; } int width() const { return _width; } int width(int val) { int save = _width; _width = val; return save; } void _throw_failure() const { } void clear(iostate state = 0) { _state = _strbuf ? state : state|badbit; if (_state & _exceptions) _throw_failure(); } void set(iostate flag) { _state |= flag; if (_state & _exceptions) _throw_failure(); } void setstate(iostate flag) { _state |= flag; if (_state & _exceptions) _throw_failure(); } int good() const { return _state == 0; } int eof() const { return _state & ios::eofbit; } int fail() const { return _state & (ios::badbit|ios::failbit); } int bad() const { return _state & ios::badbit; } iostate rdstate() const { return _state; } operator void*() const { return fail() ? (void*)0 : (void*)(-1); } int operator!() const { return fail(); } iostate exceptions() const { return _exceptions; } void exceptions(iostate enable) { _exceptions = enable; if (_state & _exceptions) _throw_failure(); } streambuf* rdbuf() const { return _strbuf; } streambuf* rdbuf(streambuf *_s) { streambuf *_old = _strbuf; _strbuf = _s; clear (); return _old; } static int sync_with_stdio(int on); static void sync_with_stdio() { sync_with_stdio(1); } static fmtflags bitalloc(); static int xalloc(); void*& pword(int); void* pword(int) const; long& iword(int); long iword(int) const; class Init { public: Init () { } }; protected: inline ios(streambuf* sb = 0, ostream* tie_to = 0); inline virtual ~ios(); inline void init(streambuf* sb, ostream* tie = 0); }; typedef ios::seek_dir _seek_dir; class streammarker : private _IO_marker { friend class streambuf; void set_offset(int offset) { _pos = offset; } public: streammarker(streambuf *sb); ~streammarker(); int saving() { return 1; } int delta(streammarker&); int delta(); }; struct streambuf : public _IO_FILE { friend class ios; friend class istream; friend class ostream; friend class streammarker; const void *&_vtable() { return *(const void**)((_IO_FILE*)this + 1); } protected: static streambuf* _list_all; _IO_FILE*& xchain() { return _chain; } void _un_link(); void _link_in(); char* gptr() const { return _flags & 0x100 ? _IO_save_base : _IO_read_ptr; } char* pptr() const { return _IO_write_ptr; } char* egptr() const { return _flags & 0x100 ? _IO_save_end : _IO_read_end; } char* epptr() const { return _IO_write_end; } char* pbase() const { return _IO_write_base; } char* eback() const { return _flags & 0x100 ? _IO_save_base : _IO_read_base;} char* base() const { return _IO_buf_base; } char* ebuf() const { return _IO_buf_end; } int blen() const { return _IO_buf_end - _IO_buf_base; } void xput_char(char c) { *_IO_write_ptr++ = c; } int xflags() { return _flags ; } int xflags(int f) {int fl = _flags ; _flags = f; return fl;} void xsetflags(int f) { _flags |= f; } void xsetflags(int f, int mask) { _flags = (_flags & ~mask) | (f & mask); } void gbump(int n) { _flags & 0x100 ? (_IO_save_base+=n):(_IO_read_ptr+=n);} void pbump(int n) { _IO_write_ptr += n; } void setb(char* b, char* eb, int a=0); void setp(char* p, char* ep) { _IO_write_base=_IO_write_ptr=p; _IO_write_end=ep; } void setg(char* eb, char* g, char *eg) { if (_flags & 0x100 ) _IO_free_backup_area(this); _IO_read_base = eb; _IO_read_ptr = g; _IO_read_end = eg; } char *shortbuf() { return _shortbuf; } int in_backup() { return _flags & 0x100 ; } char *Gbase() { return in_backup() ? _IO_save_base : _IO_read_base; } char *eGptr() { return in_backup() ? _IO_save_end : _IO_read_end; } char *Bbase() { return in_backup() ? _IO_read_base : _IO_save_base; } char *Bptr() { return _IO_backup_base; } char *eBptr() { return in_backup() ? _IO_read_end : _IO_save_end; } char *Nbase() { return _IO_save_base; } char *eNptr() { return _IO_save_end; } int have_backup() { return _IO_save_base != __null ; } int have_markers() { return _markers != __null ; } void free_backup_area(); void unsave_markers(); int put_mode() { return _flags & 0x800 ; } int switch_to_get_mode(); streambuf(int flags=0); public: static int flush_all(); static void flush_all_linebuffered(); virtual ~streambuf(); virtual int overflow(int c = (-1) ); virtual int underflow(); virtual int uflow(); virtual int pbackfail(int c); virtual streamsize xsputn(const char* s, streamsize n); virtual streamsize xsgetn(char* s, streamsize n); virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios::out); virtual streampos seekpos(streampos pos, int mode = ios::in|ios::out); streampos pubseekoff(streamoff o, _seek_dir d, int mode=ios::in|ios::out) { return _IO_seekoff (this, o, d, mode); } streampos pubseekpos(streampos pos, int mode = ios::in|ios::out) { return _IO_seekpos (this, pos, mode); } streampos sseekoff(streamoff, _seek_dir, int mode=ios::in|ios::out); streampos sseekpos(streampos pos, int mode = ios::in|ios::out); virtual streambuf* setbuf(char* p, int len); virtual int sync(); virtual int doallocate(); int seekmark(streammarker& mark, int delta = 0); int sputbackc(char c); int sungetc(); int unbuffered() { return _flags & 2 ? 1 : 0; } int linebuffered() { return _flags & 0x200 ? 1 : 0; } void unbuffered(int i) { if (i) _flags |= 2 ; else _flags &= ~2 ; } void linebuffered(int i) { if (i) _flags |= 0x200 ; else _flags &= ~0x200 ; } int allocate() { if (base() || unbuffered()) return 0; else return doallocate(); } void allocbuf() { if (base() == __null ) doallocbuf(); } void doallocbuf(); int in_avail() { return _IO_read_end - _IO_read_ptr; } int out_waiting() { return _IO_write_ptr - _IO_write_base; } streamsize sputn(const char* s, streamsize n) { return xsputn(s, n); } streamsize padn(char pad, streamsize n) { return _IO_padn(this, pad, n); } streamsize sgetn(char* s, streamsize n) { return _IO_sgetn(this, s, n); } int ignore(int); int get_column(); int set_column(int); long sgetline(char* buf, size_t n, char delim, int putback_delim); int sputc(int c) { return _IO_putc(c, this); } int sbumpc() { return _IO_getc(this); } int sgetc() { return (( this )->_IO_read_ptr >= ( this )->_IO_read_end && __underflow ( this ) == (-1) ? (-1) : *(unsigned char *) ( this )->_IO_read_ptr) ; } int snextc() { if (_IO_read_ptr >= _IO_read_end && __underflow(this) == (-1) ) return (-1) ; else return _IO_read_ptr++, sgetc(); } void stossc() { if (_IO_read_ptr < _IO_read_end) _IO_read_ptr++; } int vscan(char const *fmt0, __gnuc_va_list ap, ios* stream = __null ); int scan(char const *fmt0 ...); int vform(char const *fmt0, __gnuc_va_list ap); int form(char const *fmt0 ...); virtual streamsize sys_read(char* buf, streamsize size); virtual streamsize sys_write(const char*, streamsize); virtual streampos sys_seek(streamoff, _seek_dir); virtual int sys_close(); virtual int sys_stat(void*); virtual int showmanyc(); virtual void imbue(void *); }; class filebuf : public streambuf { protected: void init(); public: static const int openprot; filebuf(); filebuf(int fd); filebuf(int fd, char* p, int len); ~filebuf(); filebuf* attach(int fd); filebuf* open(const char *filename, const char *mode); filebuf* open(const char *filename, ios::openmode mode, int prot = 0664); virtual int underflow(); virtual int overflow(int c = (-1) ); int is_open() const { return _fileno >= 0; } int fd() const { return is_open() ? _fileno : (-1) ; } filebuf* close(); virtual int doallocate(); virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios::out); virtual streambuf* setbuf(char* p, int len); streamsize xsputn(const char* s, streamsize n); streamsize xsgetn(char* s, streamsize n); virtual int sync(); protected: int is_reading() { return eback() != egptr(); } char* cur_ptr() { return is_reading() ? gptr() : pptr(); } char* file_ptr() { return eGptr(); } virtual streamsize sys_read(char* buf, streamsize size); virtual streampos sys_seek(streamoff, _seek_dir); virtual streamsize sys_write(const char*, streamsize); virtual int sys_stat(void*); virtual int sys_close(); }; inline void ios::init(streambuf* sb, ostream* tie_to) { _state = sb ? ios::goodbit : ios::badbit; _exceptions=0; _strbuf=sb; _tie = tie_to; _width=0; _fill=' '; _flags=ios::skipws|ios::dec; _precision=6; _arrays = 0; } inline ios::ios(streambuf* sb, ostream* tie_to) { init(sb, tie_to); } inline ios::~ios() { operator delete[] (_arrays); } } # 31 "/usr/include/g++/iostream.h" 2 3 extern "C++" { class istream; class ostream; typedef ios& (*__manip)(ios&); typedef istream& (*__imanip)(istream&); typedef ostream& (*__omanip)(ostream&); extern istream& ws(istream& ins); extern ostream& flush(ostream& outs); extern ostream& endl(ostream& outs); extern ostream& ends(ostream& outs); class ostream : virtual public ios { void do_osfx(); public: ostream() { } ostream(streambuf* sb, ostream* tied= __null ); int opfx() { if (!good()) return 0; else { if (_tie) _tie->flush(); ; return 1;} } void osfx() { ; if (flags() & (ios::unitbuf|ios::stdio)) do_osfx(); } ostream& flush(); ostream& put(char c) { _strbuf->sputc(c); return *this; } ostream& write(const char *s, streamsize n); ostream& write(const unsigned char *s, streamsize n) { return write((const char*)s, n);} ostream& write(const signed char *s, streamsize n) { return write((const char*)s, n);} ostream& write(const void *s, streamsize n) { return write((const char*)s, n);} ostream& seekp(streampos); ostream& seekp(streamoff, _seek_dir); streampos tellp(); ostream& form(const char *format ...); ostream& vform(const char *format, __gnuc_va_list args); ostream& operator<<(char c); ostream& operator<<(unsigned char c) { return (*this) << (char)c; } ostream& operator<<(signed char c) { return (*this) << (char)c; } ostream& operator<<(const char *s); ostream& operator<<(const unsigned char *s) { return (*this) << (const char*)s; } ostream& operator<<(const signed char *s) { return (*this) << (const char*)s; } ostream& operator<<(const void *p); ostream& operator<<(int n); ostream& operator<<(unsigned int n); ostream& operator<<(long n); ostream& operator<<(unsigned long n); __extension__ ostream& operator<<(long long n); __extension__ ostream& operator<<(unsigned long long n); ostream& operator<<(short n) {return operator<<((int)n);} ostream& operator<<(unsigned short n) {return operator<<((unsigned int)n);} ostream& operator<<(bool b) { return operator<<((int)b); } ostream& operator<<(double n); ostream& operator<<(float n) { return operator<<((double)n); } ostream& operator<<(long double n); ostream& operator<<(__omanip func) { return (*func)(*this); } ostream& operator<<(__manip func) {(*func)(*this); return *this;} ostream& operator<<(streambuf*); }; class istream : virtual public ios { protected: size_t _gcount; int _skip_ws(); public: istream(): _gcount (0) { } istream(streambuf* sb, ostream*tied= __null ); istream& get(char* ptr, int len, char delim = '\n'); istream& get(unsigned char* ptr, int len, char delim = '\n') { return get((char*)ptr, len, delim); } istream& get(char& c); istream& get(unsigned char& c) { return get((char&)c); } istream& getline(char* ptr, int len, char delim = '\n'); istream& getline(unsigned char* ptr, int len, char delim = '\n') { return getline((char*)ptr, len, delim); } istream& get(signed char& c) { return get((char&)c); } istream& get(signed char* ptr, int len, char delim = '\n') { return get((char*)ptr, len, delim); } istream& getline(signed char* ptr, int len, char delim = '\n') { return getline((char*)ptr, len, delim); } istream& read(char *ptr, streamsize n); istream& read(unsigned char *ptr, streamsize n) { return read((char*)ptr, n); } istream& read(signed char *ptr, streamsize n) { return read((char*)ptr, n); } istream& read(void *ptr, streamsize n) { return read((char*)ptr, n); } istream& get(streambuf& sb, char delim = '\n'); istream& gets(char **s, char delim = '\n'); int ipfx(int need = 0) { if (!good()) { set(ios::failbit); return 0; } else { ; if (_tie && (need == 0 || rdbuf()->in_avail() < need)) _tie->flush(); if (!need && (flags() & ios::skipws)) return _skip_ws(); else return 1; } } int ipfx0() { if (!good()) { set(ios::failbit); return 0; } else { ; if (_tie) _tie->flush(); if (flags() & ios::skipws) return _skip_ws(); else return 1; } } int ipfx1() { if (!good()) { set(ios::failbit); return 0; } else { ; if (_tie && rdbuf()->in_avail() == 0) _tie->flush(); return 1; } } void isfx() { ; } int get() { if (!ipfx1()) return (-1) ; else { int ch = _strbuf->sbumpc(); if (ch == (-1) ) set(ios::eofbit); isfx(); return ch; } } int peek(); size_t gcount() { return _gcount; } istream& ignore(int n=1, int delim = (-1) ); int sync (); istream& seekg(streampos); istream& seekg(streamoff, _seek_dir); streampos tellg(); istream& putback(char ch) { if (good() && _strbuf->sputbackc(ch) == (-1) ) clear(ios::badbit); return *this;} istream& unget() { if (good() && _strbuf->sungetc() == (-1) ) clear(ios::badbit); return *this;} istream& scan(const char *format ...); istream& vscan(const char *format, __gnuc_va_list args); istream& operator>>(char*); istream& operator>>(unsigned char* p) { return operator>>((char*)p); } istream& operator>>(signed char*p) { return operator>>((char*)p); } istream& operator>>(char& c); istream& operator>>(unsigned char& c) {return operator>>((char&)c);} istream& operator>>(signed char& c) {return operator>>((char&)c);} istream& operator>>(int&); istream& operator>>(long&); __extension__ istream& operator>>(long long&); __extension__ istream& operator>>(unsigned long long&); istream& operator>>(short&); istream& operator>>(unsigned int&); istream& operator>>(unsigned long&); istream& operator>>(unsigned short&); istream& operator>>(bool&); istream& operator>>(float&); istream& operator>>(double&); istream& operator>>(long double&); istream& operator>>( __manip func) {(*func)(*this); return *this;} istream& operator>>(__imanip func) { return (*func)(*this); } istream& operator>>(streambuf*); }; class iostream : public istream, public ostream { public: iostream() { } iostream(streambuf* sb, ostream*tied= __null ); }; class _IO_istream_withassign : public istream { public: _IO_istream_withassign& operator=(istream&); _IO_istream_withassign& operator=(_IO_istream_withassign& rhs) { return operator= (static_cast (rhs)); } }; class _IO_ostream_withassign : public ostream { public: _IO_ostream_withassign& operator=(ostream&); _IO_ostream_withassign& operator=(_IO_ostream_withassign& rhs) { return operator= (static_cast (rhs)); } }; extern _IO_istream_withassign cin; extern _IO_ostream_withassign cout, cerr; extern _IO_ostream_withassign clog ; extern istream& lock(istream& ins); extern istream& unlock(istream& ins); extern ostream& lock(ostream& outs); extern ostream& unlock(ostream& outs); struct Iostream_init { } ; inline ios& dec(ios& i) { i.setf(ios::dec, ios::dec|ios::hex|ios::oct); return i; } inline ios& hex(ios& i) { i.setf(ios::hex, ios::dec|ios::hex|ios::oct); return i; } inline ios& oct(ios& i) { i.setf(ios::oct, ios::dec|ios::hex|ios::oct); return i; } } # 33 "/usr/include/g++/numeric" 2 3 # 1 "/usr/include/g++/stl_iterator.h" 1 3 struct input_iterator_tag {}; struct output_iterator_tag {}; struct forward_iterator_tag : public input_iterator_tag {}; struct bidirectional_iterator_tag : public forward_iterator_tag {}; struct random_access_iterator_tag : public bidirectional_iterator_tag {}; template struct input_iterator { typedef input_iterator_tag iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; struct output_iterator { typedef output_iterator_tag iterator_category; typedef void value_type; typedef void difference_type; typedef void pointer; typedef void reference; }; template struct forward_iterator { typedef forward_iterator_tag iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; template struct bidirectional_iterator { typedef bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; template struct random_access_iterator { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; # 98 "/usr/include/g++/stl_iterator.h" 3 template struct iterator_traits { typedef typename _Iterator::iterator_category iterator_category; typedef typename _Iterator::value_type value_type; typedef typename _Iterator::difference_type difference_type; typedef typename _Iterator::pointer pointer; typedef typename _Iterator::reference reference; }; template struct iterator_traits<_Tp*> { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; template struct iterator_traits { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef const _Tp* pointer; typedef const _Tp& reference; }; template inline typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { typedef typename iterator_traits<_Iter>::iterator_category _Category; return _Category(); } template inline typename iterator_traits<_Iter>::difference_type* __distance_type(const _Iter&) { return static_cast::difference_type*>(0); } template inline typename iterator_traits<_Iter>::value_type* __value_type(const _Iter&) { return static_cast::value_type*>(0); } template inline typename iterator_traits<_Iter>::iterator_category iterator_category(const _Iter& __i) { return __iterator_category(__i); } template inline typename iterator_traits<_Iter>::difference_type* distance_type(const _Iter& __i) { return __distance_type(__i); } template inline typename iterator_traits<_Iter>::value_type* value_type(const _Iter& __i) { return __value_type(__i); } # 259 "/usr/include/g++/stl_iterator.h" 3 template inline void __distance(_InputIterator __first, _InputIterator __last, _Distance& __n, input_iterator_tag) { while (__first != __last) { ++__first; ++__n; } } template inline void __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance& __n, random_access_iterator_tag) { __n += __last - __first; } template inline void distance(_InputIterator __first, _InputIterator __last, _Distance& __n) { __distance(__first, __last, __n, iterator_category(__first)); } template inline typename iterator_traits<_InputIterator>::difference_type __distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) { typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } template inline typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { return __last - __first; } template inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { typedef typename iterator_traits<_InputIterator>::iterator_category _Category; return __distance(__first, __last, _Category()); } template inline void __advance(_InputIter& __i, _Distance __n, input_iterator_tag) { while (__n--) ++__i; } template inline void __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) { if (__n >= 0) while (__n--) ++__i; else while (__n++) --__i; } template inline void __advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag) { __i += __n; } template inline void advance(_InputIterator& __i, _Distance __n) { __advance(__i, __n, iterator_category(__i)); } template class back_insert_iterator { protected: _Container* container; public: typedef _Container container_type; typedef output_iterator_tag iterator_category; typedef void value_type; typedef void difference_type; typedef void pointer; typedef void reference; explicit back_insert_iterator(_Container& __x) : container(&__x) {} back_insert_iterator<_Container>& operator=(const typename _Container::value_type& __value) { container->push_back(__value); return *this; } back_insert_iterator<_Container>& operator*() { return *this; } back_insert_iterator<_Container>& operator++() { return *this; } back_insert_iterator<_Container>& operator++(int) { return *this; } }; # 378 "/usr/include/g++/stl_iterator.h" 3 template inline back_insert_iterator<_Container> back_inserter(_Container& __x) { return back_insert_iterator<_Container>(__x); } template class front_insert_iterator { protected: _Container* container; public: typedef _Container container_type; typedef output_iterator_tag iterator_category; typedef void value_type; typedef void difference_type; typedef void pointer; typedef void reference; explicit front_insert_iterator(_Container& __x) : container(&__x) {} front_insert_iterator<_Container>& operator=(const typename _Container::value_type& __value) { container->push_front(__value); return *this; } front_insert_iterator<_Container>& operator*() { return *this; } front_insert_iterator<_Container>& operator++() { return *this; } front_insert_iterator<_Container>& operator++(int) { return *this; } }; # 417 "/usr/include/g++/stl_iterator.h" 3 template inline front_insert_iterator<_Container> front_inserter(_Container& __x) { return front_insert_iterator<_Container>(__x); } template class insert_iterator { protected: _Container* container; typename _Container::iterator iter; public: typedef _Container container_type; typedef output_iterator_tag iterator_category; typedef void value_type; typedef void difference_type; typedef void pointer; typedef void reference; insert_iterator(_Container& __x, typename _Container::iterator __i) : container(&__x), iter(__i) {} insert_iterator<_Container>& operator=(const typename _Container::value_type& __value) { iter = container->insert(iter, __value); ++iter; return *this; } insert_iterator<_Container>& operator*() { return *this; } insert_iterator<_Container>& operator++() { return *this; } insert_iterator<_Container>& operator++(int) { return *this; } }; # 459 "/usr/include/g++/stl_iterator.h" 3 template inline insert_iterator<_Container> inserter(_Container& __x, _Iterator __i) { typedef typename _Container::iterator __iter; return insert_iterator<_Container>(__x, __iter(__i)); } template class reverse_bidirectional_iterator { typedef reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, _Reference, _Distance> _Self; protected: _BidirectionalIterator current; public: typedef bidirectional_iterator_tag iterator_category; typedef _Tp value_type; typedef _Distance difference_type; typedef _Tp* pointer; typedef _Reference reference; reverse_bidirectional_iterator() {} explicit reverse_bidirectional_iterator(_BidirectionalIterator __x) : current(__x) {} _BidirectionalIterator base() const { return current; } _Reference operator*() const { _BidirectionalIterator __tmp = current; return *--__tmp; } pointer operator->() const { return &(operator*()); } _Self& operator++() { --current; return *this; } _Self operator++(int) { _Self __tmp = *this; --current; return __tmp; } _Self& operator--() { ++current; return *this; } _Self operator--(int) { _Self __tmp = *this; ++current; return __tmp; } }; # 550 "/usr/include/g++/stl_iterator.h" 3 template inline bool operator==( const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __x, const reverse_bidirectional_iterator<_BiIter, _Tp, _Ref, _Distance>& __y) { return __x.base() == __y.base(); } template class reverse_iterator { protected: _Iterator current; public: typedef typename iterator_traits<_Iterator>::iterator_category iterator_category; typedef typename iterator_traits<_Iterator>::value_type value_type; typedef typename iterator_traits<_Iterator>::difference_type difference_type; typedef typename iterator_traits<_Iterator>::pointer pointer; typedef typename iterator_traits<_Iterator>::reference reference; typedef _Iterator iterator_type; typedef reverse_iterator<_Iterator> _Self; public: reverse_iterator() {} explicit reverse_iterator(iterator_type __x) : current(__x) {} reverse_iterator(const _Self& __x) : current(__x.current) {} template reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) {} iterator_type base() const { return current; } reference operator*() const { _Iterator __tmp = current; return *--__tmp; } pointer operator->() const { return &(operator*()); } _Self& operator++() { --current; return *this; } _Self operator++(int) { _Self __tmp = *this; --current; return __tmp; } _Self& operator--() { ++current; return *this; } _Self operator--(int) { _Self __tmp = *this; ++current; return __tmp; } _Self operator+(difference_type __n) const { return _Self(current - __n); } _Self& operator+=(difference_type __n) { current -= __n; return *this; } _Self operator-(difference_type __n) const { return _Self(current + __n); } _Self& operator-=(difference_type __n) { current += __n; return *this; } reference operator[](difference_type __n) const { return *(*this + __n); } }; template inline bool operator==(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template inline bool operator<(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() < __x.base(); } template inline typename reverse_iterator<_Iterator>::difference_type operator-(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() - __x.base(); } template inline reverse_iterator<_Iterator> operator+(typename reverse_iterator<_Iterator>::difference_type __n, const reverse_iterator<_Iterator>& __x) { return reverse_iterator<_Iterator>(__x.base() - __n); } # 805 "/usr/include/g++/stl_iterator.h" 3 template class istream_iterator { friend bool operator== <> (const istream_iterator&, const istream_iterator&); protected: istream* _M_stream; _Tp _M_value; bool _M_end_marker; void _M_read() { _M_end_marker = (*_M_stream) ? true : false; if (_M_end_marker) *_M_stream >> _M_value; _M_end_marker = (*_M_stream) ? true : false; } public: typedef input_iterator_tag iterator_category; typedef _Tp value_type; typedef _Dist difference_type; typedef const _Tp* pointer; typedef const _Tp& reference; istream_iterator() : _M_stream(&cin), _M_end_marker(false) {} istream_iterator(istream& __s) : _M_stream(&__s) { _M_read(); } reference operator*() const { return _M_value; } pointer operator->() const { return &(operator*()); } istream_iterator<_Tp, _Dist>& operator++() { _M_read(); return *this; } istream_iterator<_Tp, _Dist> operator++(int) { istream_iterator<_Tp, _Dist> __tmp = *this; _M_read(); return __tmp; } }; # 864 "/usr/include/g++/stl_iterator.h" 3 template inline bool operator==(const istream_iterator<_Tp, _Distance>& __x, const istream_iterator<_Tp, _Distance>& __y) { return (__x._M_stream == __y._M_stream && __x._M_end_marker == __y._M_end_marker) || __x._M_end_marker == false && __y._M_end_marker == false; } template class ostream_iterator { protected: ostream* _M_stream; const char* _M_string; public: typedef output_iterator_tag iterator_category; typedef void value_type; typedef void difference_type; typedef void pointer; typedef void reference; ostream_iterator(ostream& __s) : _M_stream(&__s), _M_string(0) {} ostream_iterator(ostream& __s, const char* __c) : _M_stream(&__s), _M_string(__c) {} ostream_iterator<_Tp>& operator=(const _Tp& __value) { *_M_stream << __value; if (_M_string) *_M_stream << _M_string; return *this; } ostream_iterator<_Tp>& operator*() { return *this; } ostream_iterator<_Tp>& operator++() { return *this; } ostream_iterator<_Tp>& operator++(int) { return *this; } }; # 907 "/usr/include/g++/stl_iterator.h" 3 # 34 "/usr/include/g++/numeric" 2 3 # 1 "/usr/include/g++/stl_function.h" 1 3 template struct unary_function { typedef _Arg argument_type; typedef _Result result_type; }; template struct binary_function { typedef _Arg1 first_argument_type; typedef _Arg2 second_argument_type; typedef _Result result_type; }; template struct plus : public binary_function<_Tp,_Tp,_Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } }; template struct minus : public binary_function<_Tp,_Tp,_Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } }; template struct multiplies : public binary_function<_Tp,_Tp,_Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } }; template struct divides : public binary_function<_Tp,_Tp,_Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } }; template inline _Tp identity_element(plus<_Tp>) { return _Tp(0); } template inline _Tp identity_element(multiplies<_Tp>) { return _Tp(1); } template struct modulus : public binary_function<_Tp,_Tp,_Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } }; template struct negate : public unary_function<_Tp,_Tp> { _Tp operator()(const _Tp& __x) const { return -__x; } }; template struct equal_to : public binary_function<_Tp,_Tp,bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } }; template struct not_equal_to : public binary_function<_Tp,_Tp,bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } }; template struct greater : public binary_function<_Tp,_Tp,bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } }; template struct less : public binary_function<_Tp,_Tp,bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } }; template struct greater_equal : public binary_function<_Tp,_Tp,bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } }; template struct less_equal : public binary_function<_Tp,_Tp,bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } }; template struct logical_and : public binary_function<_Tp,_Tp,bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } }; template struct logical_or : public binary_function<_Tp,_Tp,bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } }; template struct logical_not : public unary_function<_Tp,bool> { bool operator()(const _Tp& __x) const { return !__x; } }; template class unary_negate : public unary_function { protected: _Predicate _M_pred; public: explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {} bool operator()(const typename _Predicate::argument_type& __x) const { return !_M_pred(__x); } }; template inline unary_negate<_Predicate> not1(const _Predicate& __pred) { return unary_negate<_Predicate>(__pred); } template class binary_negate : public binary_function { protected: _Predicate _M_pred; public: explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {} bool operator()(const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const { return !_M_pred(__x, __y); } }; template inline binary_negate<_Predicate> not2(const _Predicate& __pred) { return binary_negate<_Predicate>(__pred); } template class binder1st : public unary_function { protected: _Operation op; typename _Operation::first_argument_type value; public: binder1st(const _Operation& __x, const typename _Operation::first_argument_type& __y) : op(__x), value(__y) {} typename _Operation::result_type operator()(const typename _Operation::second_argument_type& __x) const { return op(value, __x); } }; template inline binder1st<_Operation> bind1st(const _Operation& __oper, const _Tp& __x) { typedef typename _Operation::first_argument_type _Arg1_type; return binder1st<_Operation>(__oper, _Arg1_type(__x)); } template class binder2nd : public unary_function { protected: _Operation op; typename _Operation::second_argument_type value; public: binder2nd(const _Operation& __x, const typename _Operation::second_argument_type& __y) : op(__x), value(__y) {} typename _Operation::result_type operator()(const typename _Operation::first_argument_type& __x) const { return op(__x, value); } }; template inline binder2nd<_Operation> bind2nd(const _Operation& __oper, const _Tp& __x) { typedef typename _Operation::second_argument_type _Arg2_type; return binder2nd<_Operation>(__oper, _Arg2_type(__x)); } template class unary_compose : public unary_function { protected: _Operation1 __op1; _Operation2 __op2; public: unary_compose(const _Operation1& __x, const _Operation2& __y) : __op1(__x), __op2(__y) {} typename _Operation1::result_type operator()(const typename _Operation2::argument_type& __x) const { return __op1(__op2(__x)); } }; template inline unary_compose<_Operation1,_Operation2> compose1(const _Operation1& __op1, const _Operation2& __op2) { return unary_compose<_Operation1,_Operation2>(__op1, __op2); } template class binary_compose : public unary_function { protected: _Operation1 _M_op1; _Operation2 _M_op2; _Operation3 _M_op3; public: binary_compose(const _Operation1& __x, const _Operation2& __y, const _Operation3& __z) : _M_op1(__x), _M_op2(__y), _M_op3(__z) { } typename _Operation1::result_type operator()(const typename _Operation2::argument_type& __x) const { return _M_op1(_M_op2(__x), _M_op3(__x)); } }; template inline binary_compose<_Operation1, _Operation2, _Operation3> compose2(const _Operation1& __op1, const _Operation2& __op2, const _Operation3& __op3) { return binary_compose<_Operation1,_Operation2,_Operation3> (__op1, __op2, __op3); } template class pointer_to_unary_function : public unary_function<_Arg, _Result> { protected: _Result (*_M_ptr)(_Arg); public: pointer_to_unary_function() {} explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) {} _Result operator()(_Arg __x) const { return _M_ptr(__x); } }; template inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg)) { return pointer_to_unary_function<_Arg, _Result>(__x); } template class pointer_to_binary_function : public binary_function<_Arg1,_Arg2,_Result> { protected: _Result (*_M_ptr)(_Arg1, _Arg2); public: pointer_to_binary_function() {} explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) : _M_ptr(__x) {} _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_ptr(__x, __y); } }; template inline pointer_to_binary_function<_Arg1,_Arg2,_Result> ptr_fun(_Result (*__x)(_Arg1, _Arg2)) { return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__x); } template struct _Identity : public unary_function<_Tp,_Tp> { const _Tp& operator()(const _Tp& __x) const { return __x; } }; template struct identity : public _Identity<_Tp> {}; template struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { const typename _Pair::first_type& operator()(const _Pair& __x) const { return __x.first; } }; template struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> { const typename _Pair::second_type& operator()(const _Pair& __x) const { return __x.second; } }; template struct select1st : public _Select1st<_Pair> {}; template struct select2nd : public _Select2nd<_Pair> {}; template struct _Project1st : public binary_function<_Arg1, _Arg2, _Arg1> { _Arg1 operator()(const _Arg1& __x, const _Arg2&) const { return __x; } }; template struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2> { _Arg2 operator()(const _Arg1&, const _Arg2& __y) const { return __y; } }; template struct project1st : public _Project1st<_Arg1, _Arg2> {}; template struct project2nd : public _Project2nd<_Arg1, _Arg2> {}; template struct constant_void_fun { typedef _Result result_type; result_type __val; constant_void_fun(const result_type& __v) : __val(__v) {} const result_type& operator()() const { return __val; } }; template struct constant_unary_fun : public unary_function<_Argument, _Result> { _Result _M_val; constant_unary_fun(const _Result& __v) : _M_val(__v) {} const _Result& operator()(const _Argument&) const { return _M_val; } }; template struct constant_binary_fun : public binary_function<_Arg1, _Arg2, _Result> { _Result _M_val; constant_binary_fun(const _Result& __v) : _M_val(__v) {} const _Result& operator()(const _Arg1&, const _Arg2&) const { return _M_val; } }; template inline constant_void_fun<_Result> constant0(const _Result& __val) { return constant_void_fun<_Result>(__val); } template inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val) { return constant_unary_fun<_Result,_Result>(__val); } template inline constant_binary_fun<_Result,_Result,_Result> constant2(const _Result& __val) { return constant_binary_fun<_Result,_Result,_Result>(__val); } class subtractive_rng : public unary_function { private: unsigned int _M_table[55]; size_t _M_index1; size_t _M_index2; public: unsigned int operator()(unsigned int __limit) { _M_index1 = (_M_index1 + 1) % 55; _M_index2 = (_M_index2 + 1) % 55; _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2]; return _M_table[_M_index1] % __limit; } void _M_initialize(unsigned int __seed) { unsigned int __k = 1; _M_table[54] = __seed; size_t __i; for (__i = 0; __i < 54; __i++) { size_t __ii = (21 * (__i + 1) % 55) - 1; _M_table[__ii] = __k; __k = __seed - __k; __seed = _M_table[__ii]; } for (int __loop = 0; __loop < 4; __loop++) { for (__i = 0; __i < 55; __i++) _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55]; } _M_index1 = 0; _M_index2 = 31; } subtractive_rng(unsigned int __seed) { _M_initialize(__seed); } subtractive_rng() { _M_initialize(161803398u); } }; template class mem_fun_t : public unary_function<_Tp*,_Ret> { public: explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {} _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; template class const_mem_fun_t : public unary_function { public: explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {} _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; template class mem_fun_ref_t : public unary_function<_Tp,_Ret> { public: explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {} _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)(); }; template class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> { public: explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {} _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); } private: _Ret (_Tp::*_M_f)() const; }; template class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> { public: explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; template class const_mem_fun1_t : public binary_function { public: explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} _Ret operator()(const _Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; template class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> { public: explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg); }; template class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> { public: explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } private: _Ret (_Tp::*_M_f)(_Arg) const; }; template class mem_fun_t : public unary_function<_Tp*,void> { public: explicit mem_fun_t(void (_Tp::*__pf)()) : _M_f(__pf) {} void operator()(_Tp* __p) const { (__p->*_M_f)(); } private: void (_Tp::*_M_f)(); }; template class const_mem_fun_t : public unary_function { public: explicit const_mem_fun_t(void (_Tp::*__pf)() const) : _M_f(__pf) {} void operator()(const _Tp* __p) const { (__p->*_M_f)(); } private: void (_Tp::*_M_f)() const; }; template class mem_fun_ref_t : public unary_function<_Tp,void> { public: explicit mem_fun_ref_t(void (_Tp::*__pf)()) : _M_f(__pf) {} void operator()(_Tp& __r) const { (__r.*_M_f)(); } private: void (_Tp::*_M_f)(); }; template class const_mem_fun_ref_t : public unary_function<_Tp,void> { public: explicit const_mem_fun_ref_t(void (_Tp::*__pf)() const) : _M_f(__pf) {} void operator()(const _Tp& __r) const { (__r.*_M_f)(); } private: void (_Tp::*_M_f)() const; }; template class mem_fun1_t : public binary_function<_Tp*,_Arg,void> { public: explicit mem_fun1_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } private: void (_Tp::*_M_f)(_Arg); }; template class const_mem_fun1_t : public binary_function { public: explicit const_mem_fun1_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } private: void (_Tp::*_M_f)(_Arg) const; }; template class mem_fun1_ref_t : public binary_function<_Tp,_Arg,void> { public: explicit mem_fun1_ref_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {} void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); } private: void (_Tp::*_M_f)(_Arg); }; template class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,void> { public: explicit const_mem_fun1_ref_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {} void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); } private: void (_Tp::*_M_f)(_Arg) const; }; template inline mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)()) { return mem_fun_t<_Ret,_Tp>(__f); } template inline const_mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)() const) { return const_mem_fun_t<_Ret,_Tp>(__f); } template inline mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)()) { return mem_fun_ref_t<_Ret,_Tp>(__f); } template inline const_mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Ret,_Tp>(__f); } template inline mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Ret,_Tp,_Arg>(__f); } template inline const_mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Ret,_Tp,_Arg>(__f); } template inline mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); } template inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); } template inline mem_fun1_t<_Ret,_Tp,_Arg> mem_fun1(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Ret,_Tp,_Arg>(__f); } template inline const_mem_fun1_t<_Ret,_Tp,_Arg> mem_fun1(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Ret,_Tp,_Arg>(__f); } template inline mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun1_ref(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); } template inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun1_ref(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); } # 35 "/usr/include/g++/numeric" 2 3 # 1 "/usr/include/g++/stl_numeric.h" 1 3 template _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init) { for ( ; __first != __last; ++__first) __init = __init + *__first; return __init; } template _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op) { for ( ; __first != __last; ++__first) __init = __binary_op(__init, *__first); return __init; } template _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init) { for ( ; __first1 != __last1; ++__first1, ++__first2) __init = __init + (*__first1 * *__first2); return __init; } template _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2) { for ( ; __first1 != __last1; ++__first1, ++__first2) __init = __binary_op1(__init, __binary_op2(*__first1, *__first2)); return __init; } template _OutputIterator __partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp*) { _Tp __value = *__first; while (++__first != __last) { __value = __value + *__first; *++__result = __value; } return ++__result; } template _OutputIterator partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { if (__first == __last) return __result; *__result = *__first; return __partial_sum(__first, __last, __result, __value_type( __first ) ); } template _OutputIterator __partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp*, _BinaryOperation __binary_op) { _Tp __value = *__first; while (++__first != __last) { __value = __binary_op(__value, *__first); *++__result = __value; } return ++__result; } template _OutputIterator partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) { if (__first == __last) return __result; *__result = *__first; return __partial_sum(__first, __last, __result, __value_type( __first ) , __binary_op); } template _OutputIterator __adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp*) { _Tp __value = *__first; while (++__first != __last) { _Tp __tmp = *__first; *++__result = __tmp - __value; __value = __tmp; } return ++__result; } template _OutputIterator adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { if (__first == __last) return __result; *__result = *__first; return __adjacent_difference(__first, __last, __result, __value_type( __first ) ); } template _OutputIterator __adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp*, _BinaryOperation __binary_op) { _Tp __value = *__first; while (++__first != __last) { _Tp __tmp = *__first; *++__result = __binary_op(__tmp, __value); __value = __tmp; } return ++__result; } template _OutputIterator adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOperation __binary_op) { if (__first == __last) return __result; *__result = *__first; return __adjacent_difference(__first, __last, __result, __value_type( __first ) , __binary_op); } template _Tp __power(_Tp __x, _Integer __n, _MonoidOperation __oper) { if (__n == 0) return identity_element(__oper); else { while ((__n & 1) == 0) { __n >>= 1; __x = __oper(__x, __x); } _Tp __result = __x; __n >>= 1; while (__n != 0) { __x = __oper(__x, __x); if ((__n & 1) != 0) __result = __oper(__result, __x); __n >>= 1; } return __result; } } template inline _Tp __power(_Tp __x, _Integer __n) { return __power(__x, __n, multiplies<_Tp>()); } template inline _Tp power(_Tp __x, _Integer __n, _MonoidOperation __oper) { return __power(__x, __n, __oper); } template inline _Tp power(_Tp __x, _Integer __n) { return __power(__x, __n); } template void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value) { while (__first != __last) *__first++ = __value++; } # 36 "/usr/include/g++/numeric" 2 3 # 39 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/functional" 1 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 342 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 19 "/usr/include/g++/functional" 2 3 # 40 "/usr/include/g++/std/std_valarray.h" 2 3 # 1 "/usr/include/g++/algorithm" 1 3 # 1 "/usr/include/g++/stl_algobase.h" 1 3 # 1 "/usr/include/g++/stl_pair.h" 1 3 template struct pair { typedef _T1 first_type; typedef _T2 second_type; _T1 first; _T2 second; pair() : first(_T1()), second(_T2()) {} pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {} template pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {} }; template inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first == __y.first && __x.second == __y.second; } template inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second); } template inline pair<_T1, _T2> make_pair(const _T1& __x, const _T2& __y) { return pair<_T1, _T2>(__x, __y); } # 42 "/usr/include/g++/stl_algobase.h" 2 3 # 1 "/usr/include/g++/type_traits.h" 1 3 struct __true_type { }; struct __false_type { }; template struct __type_traits { typedef __true_type this_dummy_member_must_be_first; typedef __false_type has_trivial_default_constructor; typedef __false_type has_trivial_copy_constructor; typedef __false_type has_trivial_assignment_operator; typedef __false_type has_trivial_destructor; typedef __false_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template<> struct __type_traits { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; template struct __type_traits<_Tp*> { typedef __true_type has_trivial_default_constructor; typedef __true_type has_trivial_copy_constructor; typedef __true_type has_trivial_assignment_operator; typedef __true_type has_trivial_destructor; typedef __true_type is_POD_type; }; # 295 "/usr/include/g++/type_traits.h" 3 template struct _Is_integer { typedef __false_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; template<> struct _Is_integer { typedef __true_type _Integral; }; # 45 "/usr/include/g++/stl_algobase.h" 2 3 # 1 "/usr/include/string.h" 1 3 extern "C" { # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 19 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 61 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 126 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 188 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 269 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 317 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 33 "/usr/include/string.h" 2 3 extern void * memcpy (void * __restrict __dest, __const void * __restrict __src, size_t __n) throw () ; extern void * memmove (void * __dest, __const void * __src, size_t __n) throw () ; extern void * memccpy (void * __dest, __const void * __src, int __c, size_t __n) throw () ; extern void * memset (void * __s, int __c, size_t __n) throw () ; extern int memcmp (__const void * __s1, __const void * __s2, size_t __n) throw () ; extern void * memchr (__const void * __s, int __c, size_t __n) throw () ; extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw () ; extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () ; extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw () ; extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () ; extern int strcmp (__const char *__s1, __const char *__s2) throw () ; extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw () ; extern int strcoll (__const char *__s1, __const char *__s2) throw () ; extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () ; # 107 "/usr/include/string.h" 3 extern char *__strdup (__const char *__s) throw () ; extern char *strdup (__const char *__s) throw () ; # 143 "/usr/include/string.h" 3 extern char *strchr (__const char *__s, int __c) throw () ; extern char *strrchr (__const char *__s, int __c) throw () ; extern size_t strcspn (__const char *__s, __const char *__reject) throw () ; extern size_t strspn (__const char *__s, __const char *__accept) throw () ; extern char *strpbrk (__const char *__s, __const char *__accept) throw () ; extern char *strstr (__const char *__haystack, __const char *__needle) throw () ; extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw () ; extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () ; extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () ; # 203 "/usr/include/string.h" 3 extern size_t strlen (__const char *__s) throw () ; extern char *strerror (int __errnum) throw () ; extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen) throw () ; extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () ; extern void __bzero (void * __s, size_t __n) throw () ; extern void bcopy (__const void * __src, void * __dest, size_t __n) throw () ; extern void bzero (void * __s, size_t __n) throw () ; extern int bcmp (__const void * __s1, __const void * __s2, size_t __n) throw () ; extern char *index (__const char *__s, int __c) throw () ; extern char *rindex (__const char *__s, int __c) throw () ; extern int __ffs (int __i) throw () __attribute__ ((const)); extern int ffs (int __i) throw () __attribute__ ((const)); extern int __strcasecmp (__const char *__s1, __const char *__s2) throw () ; extern int strcasecmp (__const char *__s1, __const char *__s2) throw () ; extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw () ; # 277 "/usr/include/string.h" 3 extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw () ; # 319 "/usr/include/string.h" 3 # 347 "/usr/include/string.h" 3 } # 48 "/usr/include/g++/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h" 1 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/syslimits.h" 1 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h" 1 3 # 114 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h" 3 # 1 "/usr/include/limits.h" 1 3 # 1 "/usr/include/bits/posix1_lim.h" 1 3 # 1 "/usr/include/bits/local_lim.h" 1 3 # 1 "/usr/include/linux/limits.h" 1 3 # 27 "/usr/include/bits/local_lim.h" 2 3 # 126 "/usr/include/bits/posix1_lim.h" 2 3 # 30 "/usr/include/limits.h" 2 3 # 1 "/usr/include/bits/posix2_lim.h" 1 3 # 34 "/usr/include/limits.h" 2 3 # 121 "/usr/include/limits.h" 3 # 117 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h" 2 3 # 7 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/syslimits.h" 2 3 # 11 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h" 2 3 # 107 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h" 3 # 49 "/usr/include/g++/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 342 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 51 "/usr/include/g++/stl_algobase.h" 2 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/new.h" 1 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/new" 1 3 #pragma interface "new" # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 1 3 # 342 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h" 3 # 8 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/new" 2 3 # 1 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/exception" 1 3 #pragma interface "exception" extern "C++" { namespace std { class exception { public: exception () { } virtual ~exception () { } virtual const char* what () const; }; class bad_exception : public exception { public: bad_exception () { } virtual ~bad_exception () { } }; typedef void (*terminate_handler) (); typedef void (*unexpected_handler) (); terminate_handler set_terminate (terminate_handler); void terminate () __attribute__ ((__noreturn__)); unexpected_handler set_unexpected (unexpected_handler); void unexpected () __attribute__ ((__noreturn__)); bool uncaught_exception (); } } # 9 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/new" 2 3 extern "C++" { namespace std { class bad_alloc : public exception { public: virtual const char* what() const throw() { return "bad_alloc"; } }; struct nothrow_t {}; extern const nothrow_t nothrow; typedef void (*new_handler)(); new_handler set_new_handler (new_handler); } void *operator new (size_t) throw (std::bad_alloc); void *operator new[] (size_t) throw (std::bad_alloc); void operator delete (void *) throw(); void operator delete[] (void *) throw(); void *operator new (size_t, const std::nothrow_t&) throw(); void *operator new[] (size_t, const std::nothrow_t&) throw(); void operator delete (void *, const std::nothrow_t&) throw(); void operator delete[] (void *, const std::nothrow_t&) throw(); inline void *operator new(size_t, void *place) throw() { return place; } inline void *operator new[](size_t, void *place) throw() { return place; } } # 6 "/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/new.h" 2 3 using std::new_handler; using std::set_new_handler; # 52 "/usr/include/g++/stl_algobase.h" 2 3 template inline void __iter_swap(_ForwardIter1 __a, _ForwardIter2 __b, _Tp*) { _Tp __tmp = *__a; *__a = *__b; *__b = __tmp; } template inline void iter_swap(_ForwardIter1 __a, _ForwardIter2 __b) { __iter_swap(__a, __b, __value_type( __a ) ); } template inline void swap(_Tp& __a, _Tp& __b) { _Tp __tmp = __a; __a = __b; __b = __tmp; } template inline const _Tp& min(const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; } template inline const _Tp& max(const _Tp& __a, const _Tp& __b) { return __a < __b ? __b : __a; } template inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) { return __comp(__b, __a) ? __b : __a; } template inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) { return __comp(__a, __b) ? __b : __a; } template inline _OutputIter __copy(_InputIter __first, _InputIter __last, _OutputIter __result, input_iterator_tag, _Distance*) { for ( ; __first != __last; ++__result, ++__first) *__result = *__first; return __result; } template inline _OutputIter __copy(_RandomAccessIter __first, _RandomAccessIter __last, _OutputIter __result, random_access_iterator_tag, _Distance*) { for (_Distance __n = __last - __first; __n > 0; --__n) { *__result = *__first; ++__first; ++__result; } return __result; } template inline _Tp* __copy_trivial(const _Tp* __first, const _Tp* __last, _Tp* __result) { memmove(__result, __first, sizeof(_Tp) * (__last - __first)); return __result + (__last - __first); } template struct __copy_dispatch { static _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result) { typedef typename iterator_traits<_InputIter>::iterator_category _Category; typedef typename iterator_traits<_InputIter>::difference_type _Distance; return __copy(__first, __last, __result, _Category(), (_Distance*) 0); } }; template struct __copy_dispatch<_Tp*, _Tp*, __true_type> { static _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) { return __copy_trivial(__first, __last, __result); } }; template struct __copy_dispatch { static _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) { return __copy_trivial(__first, __last, __result); } }; template inline _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result) { typedef typename iterator_traits<_InputIter>::value_type _Tp; typedef typename __type_traits<_Tp>::has_trivial_assignment_operator _Trivial; return __copy_dispatch<_InputIter, _OutputIter, _Trivial> ::copy(__first, __last, __result); } # 213 "/usr/include/g++/stl_algobase.h" 3 template inline _BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last, _BidirectionalIter2 __result, bidirectional_iterator_tag, _Distance*) { while (__first != __last) *--__result = *--__last; return __result; } template inline _BidirectionalIter __copy_backward(_RandomAccessIter __first, _RandomAccessIter __last, _BidirectionalIter __result, random_access_iterator_tag, _Distance*) { for (_Distance __n = __last - __first; __n > 0; --__n) *--__result = *--__last; return __result; } template struct __copy_backward_dispatch { typedef typename iterator_traits<_BidirectionalIter1>::iterator_category _Cat; typedef typename iterator_traits<_BidirectionalIter1>::difference_type _Distance; static _BidirectionalIter2 copy(_BidirectionalIter1 __first, _BidirectionalIter1 __last, _BidirectionalIter2 __result) { return __copy_backward(__first, __last, __result, _Cat(), (_Distance*) 0); } }; template struct __copy_backward_dispatch<_Tp*, _Tp*, __true_type> { static _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) { const ptrdiff_t _Num = __last - __first; memmove(__result - _Num, __first, sizeof(_Tp) * _Num); return __result - _Num; } }; template struct __copy_backward_dispatch { static _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) { return __copy_backward_dispatch<_Tp*, _Tp*, __true_type> ::copy(__first, __last, __result); } }; template inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) { typedef typename __type_traits::value_type> ::has_trivial_assignment_operator _Trivial; return __copy_backward_dispatch<_BI1, _BI2, _Trivial> ::copy(__first, __last, __result); } # 303 "/usr/include/g++/stl_algobase.h" 3 template pair<_InputIter, _OutputIter> __copy_n(_InputIter __first, _Size __count, _OutputIter __result, input_iterator_tag) { for ( ; __count > 0; --__count) { *__result = *__first; ++__first; ++__result; } return pair<_InputIter, _OutputIter>(__first, __result); } template inline pair<_RAIter, _OutputIter> __copy_n(_RAIter __first, _Size __count, _OutputIter __result, random_access_iterator_tag) { _RAIter __last = __first + __count; return pair<_RAIter, _OutputIter>(__last, copy(__first, __last, __result)); } template inline pair<_InputIter, _OutputIter> __copy_n(_InputIter __first, _Size __count, _OutputIter __result) { return __copy_n(__first, __count, __result, __iterator_category( __first ) ); } template inline pair<_InputIter, _OutputIter> copy_n(_InputIter __first, _Size __count, _OutputIter __result) { return __copy_n(__first, __count, __result); } template void fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value) { for ( ; __first != __last; ++__first) *__first = __value; } template _OutputIter fill_n(_OutputIter __first, _Size __n, const _Tp& __value) { for ( ; __n > 0; --__n, ++__first) *__first = __value; return __first; } template pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2) { while (__first1 != __last1 && *__first1 == *__first2) { ++__first1; ++__first2; } return pair<_InputIter1, _InputIter2>(__first1, __first2); } template pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _BinaryPredicate __binary_pred) { while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) { ++__first1; ++__first2; } return pair<_InputIter1, _InputIter2>(__first1, __first2); } template inline bool equal(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2) { for ( ; __first1 != __last1; ++__first1, ++__first2) if (*__first1 != *__first2) return false; return true; } template inline bool equal(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _BinaryPredicate __binary_pred) { for ( ; __first1 != __last1; ++__first1, ++__first2) if (!__binary_pred(*__first1, *__first2)) return false; return true; } template bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2) { for ( ; __first1 != __last1 && __first2 != __last2 ; ++__first1, ++__first2) { if (*__first1 < *__first2) return true; if (*__first2 < *__first1) return false; } return __first1 == __last1 && __first2 != __last2; } template bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) { for ( ; __first1 != __last1 && __first2 != __last2 ; ++__first1, ++__first2) { if (__comp(*__first1, *__first2)) return true; if (__comp(*__first2, *__first1)) return false; } return __first1 == __last1 && __first2 != __last2; } inline bool lexicographical_compare(const unsigned char* __first1, const unsigned char* __last1, const unsigned char* __first2, const unsigned char* __last2) { const size_t __len1 = __last1 - __first1; const size_t __len2 = __last2 - __first2; const int __result = memcmp(__first1, __first2, min(__len1, __len2)); return __result != 0 ? __result < 0 : __len1 < __len2; } inline bool lexicographical_compare(const char* __first1, const char* __last1, const char* __first2, const char* __last2) { return lexicographical_compare((const signed char*) __first1, (const signed char*) __last1, (const signed char*) __first2, (const signed char*) __last2); } template int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2) { while (__first1 != __last1 && __first2 != __last2) { if (*__first1 < *__first2) return -1; if (*__first2 < *__first1) return 1; ++__first1; ++__first2; } if (__first2 == __last2) { return !(__first1 == __last1); } else { return -1; } } inline int __lexicographical_compare_3way(const unsigned char* __first1, const unsigned char* __last1, const unsigned char* __first2, const unsigned char* __last2) { const ptrdiff_t __len1 = __last1 - __first1; const ptrdiff_t __len2 = __last2 - __first2; const int __result = memcmp(__first1, __first2, min(__len1, __len2)); return __result != 0 ? __result : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1)); } inline int __lexicographical_compare_3way(const char* __first1, const char* __last1, const char* __first2, const char* __last2) { return __lexicographical_compare_3way( (const signed char*) __first1, (const signed char*) __last1, (const signed char*) __first2, (const signed char*) __last2); } template int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2) { return __lexicographical_compare_3way(__first1, __last1, __first2, __last2); } # 30 "/usr/include/g++/algorithm" 2 3 # 1 "/usr/include/g++/stl_construct.h" 1 3 template inline void destroy(_Tp* __pointer) { __pointer->~_Tp(); } template inline void construct(_T1* __p, const _T2& __value) { new (__p) _T1(__value); } template inline void construct(_T1* __p) { new (__p) _T1(); } template inline void __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type) { for ( ; __first != __last; ++__first) destroy(&*__first); } template inline void __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type) {} template inline void __destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*) { typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor; __destroy_aux(__first, __last, _Trivial_destructor()); } template inline void destroy(_ForwardIterator __first, _ForwardIterator __last) { __destroy(__first, __last, __value_type( __first ) ); } inline void destroy(char*, char*) {} inline void destroy(wchar_t*, wchar_t*) {} # 31 "/usr/include/g++/algorithm" 2 3 # 1 "/usr/include/g++/stl_uninitialized.h" 1 3 template inline _ForwardIter __uninitialized_copy_aux(_InputIter __first, _InputIter __last, _ForwardIter __result, __true_type) { return copy(__first, __last, __result); } template _ForwardIter __uninitialized_copy_aux(_InputIter __first, _InputIter __last, _ForwardIter __result, __false_type) { _ForwardIter __cur = __result; try { for ( ; __first != __last; ++__first, ++__cur) construct(&*__cur, *__first); return __cur; } catch(...) { destroy(__result, __cur) ; throw; } ; } template inline _ForwardIter __uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, _Tp*) { typedef typename __type_traits<_Tp>::is_POD_type _Is_POD; return __uninitialized_copy_aux(__first, __last, __result, _Is_POD()); } template inline _ForwardIter uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result) { return __uninitialized_copy(__first, __last, __result, __value_type( __result ) ); } inline char* uninitialized_copy(const char* __first, const char* __last, char* __result) { memmove(__result, __first, __last - __first); return __result + (__last - __first); } inline wchar_t* uninitialized_copy(const wchar_t* __first, const wchar_t* __last, wchar_t* __result) { memmove(__result, __first, sizeof(wchar_t) * (__last - __first)); return __result + (__last - __first); } template pair<_InputIter, _ForwardIter> __uninitialized_copy_n(_InputIter __first, _Size __count, _ForwardIter __result, input_iterator_tag) { _ForwardIter __cur = __result; try { for ( ; __count > 0 ; --__count, ++__first, ++__cur) construct(&*__cur, *__first); return pair<_InputIter, _ForwardIter>(__first, __cur); } catch(...) { destroy(__result, __cur) ; throw; } ; } template inline pair<_RandomAccessIter, _ForwardIter> __uninitialized_copy_n(_RandomAccessIter __first, _Size __count, _ForwardIter __result, random_access_iterator_tag) { _RandomAccessIter __last = __first + __count; return pair<_RandomAccessIter, _ForwardIter>( __last, uninitialized_copy(__first, __last, __result)); } template inline pair<_InputIter, _ForwardIter> __uninitialized_copy_n(_InputIter __first, _Size __count, _ForwardIter __result) { return __uninitialized_copy_n(__first, __count, __result, __iterator_category( __first ) ); } template inline pair<_InputIter, _ForwardIter> uninitialized_copy_n(_InputIter __first, _Size __count, _ForwardIter __result) { return __uninitialized_copy_n(__first, __count, __result, __iterator_category( __first ) ); } template inline void __uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last, const _Tp& __x, __true_type) { fill(__first, __last, __x); } template void __uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last, const _Tp& __x, __false_type) { _ForwardIter __cur = __first; try { for ( ; __cur != __last; ++__cur) construct(&*__cur, __x); } catch(...) { destroy(__first, __cur) ; throw; } ; } template inline void __uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x, _Tp1*) { typedef typename __type_traits<_Tp1>::is_POD_type _Is_POD; __uninitialized_fill_aux(__first, __last, __x, _Is_POD()); } template inline void uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x) { __uninitialized_fill(__first, __last, __x, __value_type( __first ) ); } template inline _ForwardIter __uninitialized_fill_n_aux(_ForwardIter __first, _Size __n, const _Tp& __x, __true_type) { return fill_n(__first, __n, __x); } template _ForwardIter __uninitialized_fill_n_aux(_ForwardIter __first, _Size __n, const _Tp& __x, __false_type) { _ForwardIter __cur = __first; try { for ( ; __n > 0; --__n, ++__cur) construct(&*__cur, __x); return __cur; } catch(...) { destroy(__first, __cur) ; throw; } ; } template inline _ForwardIter __uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x, _Tp1*) { typedef typename __type_traits<_Tp1>::is_POD_type _Is_POD; return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD()); } template inline _ForwardIter uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x) { return __uninitialized_fill_n(__first, __n, __x, __value_type( __first ) ); } template inline _ForwardIter __uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _ForwardIter __result) { _ForwardIter __mid = uninitialized_copy(__first1, __last1, __result); try { return uninitialized_copy(__first2, __last2, __mid); } catch(...) { destroy(__result, __mid) ; throw; } ; } template inline _ForwardIter __uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid, const _Tp& __x, _InputIter __first, _InputIter __last) { uninitialized_fill(__result, __mid, __x); try { return uninitialized_copy(__first, __last, __mid); } catch(...) { destroy(__result, __mid) ; throw; } ; } template inline void __uninitialized_copy_fill(_InputIter __first1, _InputIter __last1, _ForwardIter __first2, _ForwardIter __last2, const _Tp& __x) { _ForwardIter __mid2 = uninitialized_copy(__first1, __last1, __first2); try { uninitialized_fill(__mid2, __last2, __x); } catch(...) { destroy(__first2, __mid2) ; throw; } ; } # 32 "/usr/include/g++/algorithm" 2 3 # 1 "/usr/include/g++/stl_tempbuf.h" 1 3 template pair<_Tp*, ptrdiff_t> __get_temporary_buffer(ptrdiff_t __len, _Tp*) { if (__len > ptrdiff_t(2147483647 / sizeof(_Tp))) __len = 2147483647 / sizeof(_Tp); while (__len > 0) { _Tp* __tmp = (_Tp*) malloc((size_t)__len * sizeof(_Tp)); if (__tmp != 0) return pair<_Tp*, ptrdiff_t>(__tmp, __len); __len /= 2; } return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0); } template inline pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len) { return __get_temporary_buffer(__len, (_Tp*) 0); } template inline pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len, _Tp*) { return __get_temporary_buffer(__len, (_Tp*) 0); } template void return_temporary_buffer(_Tp* __p) { free(__p); } template class _Temporary_buffer { private: ptrdiff_t _M_original_len; ptrdiff_t _M_len; _Tp* _M_buffer; void _M_allocate_buffer() { _M_original_len = _M_len; _M_buffer = 0; if (_M_len > (ptrdiff_t)(2147483647 / sizeof(_Tp))) _M_len = 2147483647 / sizeof(_Tp); while (_M_len > 0) { _M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp)); if (_M_buffer) break; _M_len /= 2; } } void _M_initialize_buffer(const _Tp&, __true_type) {} void _M_initialize_buffer(const _Tp& val, __false_type) { uninitialized_fill_n(_M_buffer, _M_len, val); } public: ptrdiff_t size() const { return _M_len; } ptrdiff_t requested_size() const { return _M_original_len; } _Tp* begin() { return _M_buffer; } _Tp* end() { return _M_buffer + _M_len; } _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) { typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Trivial; try { _M_len = 0; distance(__first, __last, _M_len); _M_allocate_buffer(); if (_M_len > 0) _M_initialize_buffer(*__first, _Trivial()); } catch(...) { free(_M_buffer); _M_buffer = 0; _M_len = 0 ; throw; } ; } ~_Temporary_buffer() { destroy(_M_buffer, _M_buffer + _M_len); free(_M_buffer); } private: _Temporary_buffer(const _Temporary_buffer&) {} void operator=(const _Temporary_buffer&) {} }; template ::value_type > struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp> { temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {} ~temporary_buffer() {} }; # 33 "/usr/include/g++/algorithm" 2 3 # 1 "/usr/include/g++/stl_algo.h" 1 3 # 1 "/usr/include/g++/stl_heap.h" 1 3 template void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && *(__first + __parent) < __value) { *(__first + __holeIndex) = *(__first + __parent); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = __value; } template inline void __push_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, _Distance*, _Tp*) { __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), _Tp(*(__last - 1))); } template inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { __push_heap_aux(__first, __last, __distance_type( __first ) , __value_type( __first ) ); } template void __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __topIndex, _Tp __value, _Compare __comp) { _Distance __parent = (__holeIndex - 1) / 2; while (__holeIndex > __topIndex && __comp(*(__first + __parent), __value)) { *(__first + __holeIndex) = *(__first + __parent); __holeIndex = __parent; __parent = (__holeIndex - 1) / 2; } *(__first + __holeIndex) = __value; } template inline void __push_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp, _Distance*, _Tp*) { __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), _Tp(*(__last - 1)), __comp); } template inline void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { __push_heap_aux(__first, __last, __comp, __distance_type( __first ) , __value_type( __first ) ); } template void __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value) { _Distance __topIndex = __holeIndex; _Distance __secondChild = 2 * __holeIndex + 2; while (__secondChild < __len) { if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) __secondChild--; *(__first + __holeIndex) = *(__first + __secondChild); __holeIndex = __secondChild; __secondChild = 2 * (__secondChild + 1); } if (__secondChild == __len) { *(__first + __holeIndex) = *(__first + (__secondChild - 1)); __holeIndex = __secondChild - 1; } __push_heap(__first, __holeIndex, __topIndex, __value); } template inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __result, _Tp __value, _Distance*) { *__result = *__first; __adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value); } template inline void __pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp*) { __pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __distance_type( __first ) ); } template inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { __pop_heap_aux(__first, __last, __value_type( __first ) ); } template void __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, _Distance __len, _Tp __value, _Compare __comp) { _Distance __topIndex = __holeIndex; _Distance __secondChild = 2 * __holeIndex + 2; while (__secondChild < __len) { if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1)))) __secondChild--; *(__first + __holeIndex) = *(__first + __secondChild); __holeIndex = __secondChild; __secondChild = 2 * (__secondChild + 1); } if (__secondChild == __len) { *(__first + __holeIndex) = *(__first + (__secondChild - 1)); __holeIndex = __secondChild - 1; } __push_heap(__first, __holeIndex, __topIndex, __value, __comp); } template inline void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _RandomAccessIterator __result, _Tp __value, _Compare __comp, _Distance*) { *__result = *__first; __adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value, __comp); } template inline void __pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp*, _Compare __comp) { __pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __comp, __distance_type( __first ) ); } template inline void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { __pop_heap_aux(__first, __last, __value_type( __first ) , __comp); } template void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp*, _Distance*) { if (__last - __first < 2) return; _Distance __len = __last - __first; _Distance __parent = (__len - 2)/2; while (true) { __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent))); if (__parent == 0) return; __parent--; } } template inline void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { __make_heap(__first, __last, __value_type( __first ) , __distance_type( __first ) ); } template void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp, _Tp*, _Distance*) { if (__last - __first < 2) return; _Distance __len = __last - __first; _Distance __parent = (__len - 2)/2; while (true) { __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)), __comp); if (__parent == 0) return; __parent--; } } template inline void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { __make_heap(__first, __last, __comp, __value_type( __first ) , __distance_type( __first ) ); } template void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) { while (__last - __first > 1) pop_heap(__first, __last--); } template void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) { while (__last - __first > 1) pop_heap(__first, __last--, __comp); } # 34 "/usr/include/g++/stl_algo.h" 2 3 template inline const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) { if (__a < __b) if (__b < __c) return __b; else if (__a < __c) return __c; else return __a; else if (__a < __c) return __a; else if (__b < __c) return __c; else return __b; } template inline const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) { if (__comp(__a, __b)) if (__comp(__b, __c)) return __b; else if (__comp(__a, __c)) return __c; else return __a; else if (__comp(__a, __c)) return __a; else if (__comp(__b, __c)) return __c; else return __b; } template _Function for_each(_InputIter __first, _InputIter __last, _Function __f) { for ( ; __first != __last; ++__first) __f(*__first); return __f; } template inline _InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val, input_iterator_tag) { while (__first != __last && *__first != __val) ++__first; return __first; } template inline _InputIter find_if(_InputIter __first, _InputIter __last, _Predicate __pred, input_iterator_tag) { while (__first != __last && !__pred(*__first)) ++__first; return __first; } template _RandomAccessIter find(_RandomAccessIter __first, _RandomAccessIter __last, const _Tp& __val, random_access_iterator_tag) { typename iterator_traits<_RandomAccessIter>::difference_type __trip_count = (__last - __first) >> 2; for ( ; __trip_count > 0 ; --__trip_count) { if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; if (*__first == __val) return __first; ++__first; } switch(__last - __first) { case 3: if (*__first == __val) return __first; ++__first; case 2: if (*__first == __val) return __first; ++__first; case 1: if (*__first == __val) return __first; ++__first; case 0: default: return __last; } } template _RandomAccessIter find_if(_RandomAccessIter __first, _RandomAccessIter __last, _Predicate __pred, random_access_iterator_tag) { typename iterator_traits<_RandomAccessIter>::difference_type __trip_count = (__last - __first) >> 2; for ( ; __trip_count > 0 ; --__trip_count) { if (__pred(*__first)) return __first; ++__first; if (__pred(*__first)) return __first; ++__first; if (__pred(*__first)) return __first; ++__first; if (__pred(*__first)) return __first; ++__first; } switch(__last - __first) { case 3: if (__pred(*__first)) return __first; ++__first; case 2: if (__pred(*__first)) return __first; ++__first; case 1: if (__pred(*__first)) return __first; ++__first; case 0: default: return __last; } } template inline _InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val) { return find(__first, __last, __val, __iterator_category( __first ) ); } template inline _InputIter find_if(_InputIter __first, _InputIter __last, _Predicate __pred) { return find_if(__first, __last, __pred, __iterator_category( __first ) ); } template _ForwardIter adjacent_find(_ForwardIter __first, _ForwardIter __last) { if (__first == __last) return __last; _ForwardIter __next = __first; while(++__next != __last) { if (*__first == *__next) return __first; __first = __next; } return __last; } template _ForwardIter adjacent_find(_ForwardIter __first, _ForwardIter __last, _BinaryPredicate __binary_pred) { if (__first == __last) return __last; _ForwardIter __next = __first; while(++__next != __last) { if (__binary_pred(*__first, *__next)) return __first; __first = __next; } return __last; } template void count(_InputIter __first, _InputIter __last, const _Tp& __value, _Size& __n) { for ( ; __first != __last; ++__first) if (*__first == __value) ++__n; } template void count_if(_InputIter __first, _InputIter __last, _Predicate __pred, _Size& __n) { for ( ; __first != __last; ++__first) if (__pred(*__first)) ++__n; } template typename iterator_traits<_InputIter>::difference_type count(_InputIter __first, _InputIter __last, const _Tp& __value) { typename iterator_traits<_InputIter>::difference_type __n = 0; for ( ; __first != __last; ++__first) if (*__first == __value) ++__n; return __n; } template typename iterator_traits<_InputIter>::difference_type count_if(_InputIter __first, _InputIter __last, _Predicate __pred) { typename iterator_traits<_InputIter>::difference_type __n = 0; for ( ; __first != __last; ++__first) if (__pred(*__first)) ++__n; return __n; } template _ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2, _ForwardIter2 __last2) { if (__first1 == __last1 || __first2 == __last2) return __first1; _ForwardIter2 __tmp(__first2); ++__tmp; if (__tmp == __last2) return find(__first1, __last1, *__first2); _ForwardIter2 __p1, __p; __p1 = __first2; ++__p1; _ForwardIter1 __current = __first1; while (__first1 != __last1) { __first1 = find(__first1, __last1, *__first2); if (__first1 == __last1) return __last1; __p = __p1; __current = __first1; if (++__current == __last1) return __last1; while (*__current == *__p) { if (++__p == __last2) return __first1; if (++__current == __last1) return __last1; } ++__first1; } return __first1; } template _ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2, _ForwardIter2 __last2, _BinaryPred __predicate) { if (__first1 == __last1 || __first2 == __last2) return __first1; _ForwardIter2 __tmp(__first2); ++__tmp; if (__tmp == __last2) return find(__first1, __last1, *__first2); _ForwardIter2 __p1, __p; __p1 = __first2; ++__p1; _ForwardIter1 __current = __first1; while (__first1 != __last1) { while (__first1 != __last1) { if (__predicate(*__first1, *__first2)) break; ++__first1; } while (__first1 != __last1 && !__predicate(*__first1, *__first2)) ++__first1; if (__first1 == __last1) return __last1; __p = __p1; __current = __first1; if (++__current == __last1) return __last1; while (__predicate(*__current, *__p)) { if (++__p == __last2) return __first1; if (++__current == __last1) return __last1; } ++__first1; } return __first1; } template _ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, _Integer __count, const _Tp& __val) { if (__count <= 0) return __first; else { __first = find(__first, __last, __val); while (__first != __last) { _Integer __n = __count - 1; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && *__i == __val) { ++__i; --__n; } if (__n == 0) return __first; else __first = find(__i, __last, __val); } return __last; } } template _ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, _Integer __count, const _Tp& __val, _BinaryPred __binary_pred) { if (__count <= 0) return __first; else { while (__first != __last) { if (__binary_pred(*__first, __val)) break; ++__first; } while (__first != __last) { _Integer __n = __count - 1; _ForwardIter __i = __first; ++__i; while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) { ++__i; --__n; } if (__n == 0) return __first; else { while (__i != __last) { if (__binary_pred(*__i, __val)) break; ++__i; } __first = __i; } } return __last; } } template _ForwardIter2 swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2) { for ( ; __first1 != __last1; ++__first1, ++__first2) iter_swap(__first1, __first2); return __first2; } template _OutputIter transform(_InputIter __first, _InputIter __last, _OutputIter __result, _UnaryOperation __oper) { for ( ; __first != __last; ++__first, ++__result) *__result = __oper(*__first); return __result; } template _OutputIter transform(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _OutputIter __result, _BinaryOperation __binary_op) { for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result) *__result = __binary_op(*__first1, *__first2); return __result; } template void replace(_ForwardIter __first, _ForwardIter __last, const _Tp& __old_value, const _Tp& __new_value) { for ( ; __first != __last; ++__first) if (*__first == __old_value) *__first = __new_value; } template void replace_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, const _Tp& __new_value) { for ( ; __first != __last; ++__first) if (__pred(*__first)) *__first = __new_value; } template _OutputIter replace_copy(_InputIter __first, _InputIter __last, _OutputIter __result, const _Tp& __old_value, const _Tp& __new_value) { for ( ; __first != __last; ++__first, ++__result) *__result = *__first == __old_value ? __new_value : *__first; return __result; } template _OutputIter replace_copy_if(Iterator __first, Iterator __last, _OutputIter __result, _Predicate __pred, const _Tp& __new_value) { for ( ; __first != __last; ++__first, ++__result) *__result = __pred(*__first) ? __new_value : *__first; return __result; } template void generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen) { for ( ; __first != __last; ++__first) *__first = __gen(); } template _OutputIter generate_n(_OutputIter __first, _Size __n, _Generator __gen) { for ( ; __n > 0; --__n, ++__first) *__first = __gen(); return __first; } template _OutputIter remove_copy(_InputIter __first, _InputIter __last, _OutputIter __result, const _Tp& __value) { for ( ; __first != __last; ++__first) if (*__first != __value) { *__result = *__first; ++__result; } return __result; } template _OutputIter remove_copy_if(_InputIter __first, _InputIter __last, _OutputIter __result, _Predicate __pred) { for ( ; __first != __last; ++__first) if (!__pred(*__first)) { *__result = *__first; ++__result; } return __result; } template _ForwardIter remove(_ForwardIter __first, _ForwardIter __last, const _Tp& __value) { __first = find(__first, __last, __value); _ForwardIter __i = __first; return __first == __last ? __first : remove_copy(++__i, __last, __first, __value); } template _ForwardIter remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { __first = find_if(__first, __last, __pred); _ForwardIter __i = __first; return __first == __last ? __first : remove_copy_if(++__i, __last, __first, __pred); } template _OutputIter __unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result, _Tp*) { _Tp __value = *__first; *__result = __value; while (++__first != __last) if (__value != *__first) { __value = *__first; *++__result = __value; } return ++__result; } template inline _OutputIter __unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result, output_iterator_tag) { return __unique_copy(__first, __last, __result, __value_type( __first ) ); } template _ForwardIter __unique_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, forward_iterator_tag) { *__result = *__first; while (++__first != __last) if (*__result != *__first) *++__result = *__first; return ++__result; } template inline _OutputIter unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result) { if (__first == __last) return __result; return __unique_copy(__first, __last, __result, __iterator_category( __result ) ); } template _OutputIter __unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result, _BinaryPredicate __binary_pred, _Tp*) { _Tp __value = *__first; *__result = __value; while (++__first != __last) if (!__binary_pred(__value, *__first)) { __value = *__first; *++__result = __value; } return ++__result; } template inline _OutputIter __unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result, _BinaryPredicate __binary_pred, output_iterator_tag) { return __unique_copy(__first, __last, __result, __binary_pred, __value_type( __first ) ); } template _ForwardIter __unique_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, _BinaryPredicate __binary_pred, forward_iterator_tag) { *__result = *__first; while (++__first != __last) if (!__binary_pred(*__result, *__first)) *++__result = *__first; return ++__result; } template inline _OutputIter unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result, _BinaryPredicate __binary_pred) { if (__first == __last) return __result; return __unique_copy(__first, __last, __result, __binary_pred, __iterator_category( __result ) ); } template _ForwardIter unique(_ForwardIter __first, _ForwardIter __last) { __first = adjacent_find(__first, __last); return unique_copy(__first, __last, __first); } template _ForwardIter unique(_ForwardIter __first, _ForwardIter __last, _BinaryPredicate __binary_pred) { __first = adjacent_find(__first, __last, __binary_pred); return unique_copy(__first, __last, __first, __binary_pred); } template void __reverse(_BidirectionalIter __first, _BidirectionalIter __last, bidirectional_iterator_tag) { while (true) if (__first == __last || __first == --__last) return; else iter_swap(__first++, __last); } template void __reverse(_RandomAccessIter __first, _RandomAccessIter __last, random_access_iterator_tag) { while (__first < __last) iter_swap(__first++, --__last); } template inline void reverse(_BidirectionalIter __first, _BidirectionalIter __last) { __reverse(__first, __last, __iterator_category( __first ) ); } template _OutputIter reverse_copy(_BidirectionalIter __first, _BidirectionalIter __last, _OutputIter __result) { while (__first != __last) { --__last; *__result = *__last; ++__result; } return __result; } template _EuclideanRingElement __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) { while (__n != 0) { _EuclideanRingElement __t = __m % __n; __m = __n; __n = __t; } return __m; } template _ForwardIter __rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last, _Distance*, forward_iterator_tag) { if (__first == __middle) return __last; if (__last == __middle) return __first; _ForwardIter __first2 = __middle; do { swap(*__first++, *__first2++); if (__first == __middle) __middle = __first2; } while (__first2 != __last); _ForwardIter __new_middle = __first; __first2 = __middle; while (__first2 != __last) { swap (*__first++, *__first2++); if (__first == __middle) __middle = __first2; else if (__first2 == __last) __first2 = __middle; } return __new_middle; } template _BidirectionalIter __rotate(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last, _Distance*, bidirectional_iterator_tag) { if (__first == __middle) return __last; if (__last == __middle) return __first; __reverse(__first, __middle, bidirectional_iterator_tag()); __reverse(__middle, __last, bidirectional_iterator_tag()); while (__first != __middle && __middle != __last) swap (*__first++, *--__last); if (__first == __middle) { __reverse(__middle, __last, bidirectional_iterator_tag()); return __last; } else { __reverse(__first, __middle, bidirectional_iterator_tag()); return __first; } } template _RandomAccessIter __rotate(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last, _Distance *, _Tp *) { _Distance __n = __last - __first; _Distance __k = __middle - __first; _Distance __l = __n - __k; _RandomAccessIter __result = __first + (__last - __middle); if (__k == __l) { swap_ranges(__first, __middle, __middle); return __result; } _Distance __d = __gcd(__n, __k); for (_Distance __i = 0; __i < __d; __i++) { _Tp __tmp = *__first; _RandomAccessIter __p = __first; if (__k < __l) { for (_Distance __j = 0; __j < __l/__d; __j++) { if (__p > __first + __l) { *__p = *(__p - __l); __p -= __l; } *__p = *(__p + __k); __p += __k; } } else { for (_Distance __j = 0; __j < __k/__d - 1; __j ++) { if (__p < __last - __k) { *__p = *(__p + __k); __p += __k; } *__p = * (__p - __l); __p -= __l; } } *__p = __tmp; ++__first; } return __result; } template inline _ForwardIter rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) { return __rotate(__first, __middle, __last, __distance_type( __first ) , __iterator_category( __first ) ); } template _OutputIter rotate_copy(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last, _OutputIter __result) { return copy(__first, __middle, copy(__middle, __last, __result)); } template inline _Distance __random_number(_Distance __n) { return lrand48() % __n; } template inline void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last) { if (__first == __last) return; for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) iter_swap(__i, __first + __random_number((__i - __first) + 1)); } template void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last, _RandomNumberGenerator& __rand) { if (__first == __last) return; for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) iter_swap(__i, __first + __rand((__i - __first) + 1)); } template _OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, _OutputIter __out, const _Distance __n) { _Distance __remaining = 0; distance(__first, __last, __remaining); _Distance __m = min(__n, __remaining); while (__m > 0) { if (__random_number(__remaining) < __m) { *__out = *__first; ++__out; --__m; } --__remaining; ++__first; } return __out; } template _OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, _OutputIter __out, const _Distance __n, _RandomNumberGenerator& __rand) { _Distance __remaining = 0; distance(__first, __last, __remaining); _Distance __m = min(__n, __remaining); while (__m > 0) { if (__rand(__remaining) < __m) { *__out = *__first; ++__out; --__m; } --__remaining; ++__first; } return __out; } template _RandomAccessIter __random_sample(_InputIter __first, _InputIter __last, _RandomAccessIter __out, const _Distance __n) { _Distance __m = 0; _Distance __t = __n; for ( ; __first != __last && __m < __n; ++__m, ++__first) __out[__m] = *__first; while (__first != __last) { ++__t; _Distance __M = __random_number(__t); if (__M < __n) __out[__M] = *__first; ++__first; } return __out + __m; } template _RandomAccessIter __random_sample(_InputIter __first, _InputIter __last, _RandomAccessIter __out, _RandomNumberGenerator& __rand, const _Distance __n) { _Distance __m = 0; _Distance __t = __n; for ( ; __first != __last && __m < __n; ++__m, ++__first) __out[__m] = *__first; while (__first != __last) { ++__t; _Distance __M = __rand(__t); if (__M < __n) __out[__M] = *__first; ++__first; } return __out + __m; } template inline _RandomAccessIter random_sample(_InputIter __first, _InputIter __last, _RandomAccessIter __out_first, _RandomAccessIter __out_last) { return __random_sample(__first, __last, __out_first, __out_last - __out_first); } template inline _RandomAccessIter random_sample(_InputIter __first, _InputIter __last, _RandomAccessIter __out_first, _RandomAccessIter __out_last, _RandomNumberGenerator& __rand) { return __random_sample(__first, __last, __out_first, __rand, __out_last - __out_first); } template _ForwardIter __partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, forward_iterator_tag) { if (__first == __last) return __first; while (__pred(*__first)) if (++__first == __last) return __first; _ForwardIter __next = __first; while (++__next != __last) if (__pred(*__next)) { swap(*__first, *__next); ++__first; } return __first; } template _BidirectionalIter __partition(_BidirectionalIter __first, _BidirectionalIter __last, _Predicate __pred, bidirectional_iterator_tag) { while (true) { while (true) if (__first == __last) return __first; else if (__pred(*__first)) ++__first; else break; --__last; while (true) if (__first == __last) return __first; else if (!__pred(*__last)) --__last; else break; iter_swap(__first, __last); ++__first; } } template inline _ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { return __partition(__first, __last, __pred, __iterator_category( __first ) ); } template _ForwardIter __inplace_stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, _Distance __len) { if (__len == 1) return __pred(*__first) ? __last : __first; _ForwardIter __middle = __first; advance(__middle, __len / 2); return rotate(__inplace_stable_partition(__first, __middle, __pred, __len / 2), __middle, __inplace_stable_partition(__middle, __last, __pred, __len - __len / 2)); } template _ForwardIter __stable_partition_adaptive(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, _Distance __len, _Pointer __buffer, _Distance __buffer_size) { if (__len <= __buffer_size) { _ForwardIter __result1 = __first; _Pointer __result2 = __buffer; for ( ; __first != __last ; ++__first) if (__pred(*__first)) { *__result1 = *__first; ++__result1; } else { *__result2 = *__first; ++__result2; } copy(__buffer, __result2, __result1); return __result1; } else { _ForwardIter __middle = __first; advance(__middle, __len / 2); return rotate(__stable_partition_adaptive( __first, __middle, __pred, __len / 2, __buffer, __buffer_size), __middle, __stable_partition_adaptive( __middle, __last, __pred, __len - __len / 2, __buffer, __buffer_size)); } } template inline _ForwardIter __stable_partition_aux(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, _Tp*, _Distance*) { _Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last); if (__buf.size() > 0) return __stable_partition_adaptive(__first, __last, __pred, _Distance(__buf.requested_size()), __buf.begin(), __buf.size()); else return __inplace_stable_partition(__first, __last, __pred, _Distance(__buf.requested_size())); } template inline _ForwardIter stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { if (__first == __last) return __first; else return __stable_partition_aux(__first, __last, __pred, __value_type( __first ) , __distance_type( __first ) ); } template _RandomAccessIter __unguarded_partition(_RandomAccessIter __first, _RandomAccessIter __last, _Tp __pivot) { while (true) { while (*__first < __pivot) ++__first; --__last; while (__pivot < *__last) --__last; if (!(__first < __last)) return __first; iter_swap(__first, __last); ++__first; } } template _RandomAccessIter __unguarded_partition(_RandomAccessIter __first, _RandomAccessIter __last, _Tp __pivot, _Compare __comp) { while (true) { while (__comp(*__first, __pivot)) ++__first; --__last; while (__comp(__pivot, *__last)) --__last; if (!(__first < __last)) return __first; iter_swap(__first, __last); ++__first; } } const int __stl_threshold = 16; template void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val) { _RandomAccessIter __next = __last; --__next; while (__val < *__next) { *__last = *__next; __last = __next; --__next; } *__last = __val; } template void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val, _Compare __comp) { _RandomAccessIter __next = __last; --__next; while (__comp(__val, *__next)) { *__last = *__next; __last = __next; --__next; } *__last = __val; } template inline void __linear_insert(_RandomAccessIter __first, _RandomAccessIter __last, _Tp*) { _Tp __val = *__last; if (__val < *__first) { copy_backward(__first, __last, __last + 1); *__first = __val; } else __unguarded_linear_insert(__last, __val); } template inline void __linear_insert(_RandomAccessIter __first, _RandomAccessIter __last, _Tp*, _Compare __comp) { _Tp __val = *__last; if (__comp(__val, *__first)) { copy_backward(__first, __last, __last + 1); *__first = __val; } else __unguarded_linear_insert(__last, __val, __comp); } template void __insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last) { if (__first == __last) return; for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) __linear_insert(__first, __i, __value_type( __first ) ); } template void __insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) { if (__first == __last) return; for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) __linear_insert(__first, __i, __value_type( __first ) , __comp); } template void __unguarded_insertion_sort_aux(_RandomAccessIter __first, _RandomAccessIter __last, _Tp*) { for (_RandomAccessIter __i = __first; __i != __last; ++__i) __unguarded_linear_insert(__i, _Tp(*__i)); } template inline void __unguarded_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last) { __unguarded_insertion_sort_aux(__first, __last, __value_type( __first ) ); } template void __unguarded_insertion_sort_aux(_RandomAccessIter __first, _RandomAccessIter __last, _Tp*, _Compare __comp) { for (_RandomAccessIter __i = __first; __i != __last; ++__i) __unguarded_linear_insert(__i, _Tp(*__i), __comp); } template inline void __unguarded_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) { __unguarded_insertion_sort_aux(__first, __last, __value_type( __first ) , __comp); } template void __final_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last) { if (__last - __first > __stl_threshold) { __insertion_sort(__first, __first + __stl_threshold); __unguarded_insertion_sort(__first + __stl_threshold, __last); } else __insertion_sort(__first, __last); } template void __final_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) { if (__last - __first > __stl_threshold) { __insertion_sort(__first, __first + __stl_threshold, __comp); __unguarded_insertion_sort(__first + __stl_threshold, __last, __comp); } else __insertion_sort(__first, __last, __comp); } template inline _Size __lg(_Size __n) { _Size __k; for (__k = 0; __n != 1; __n >>= 1) ++__k; return __k; } template void __introsort_loop(_RandomAccessIter __first, _RandomAccessIter __last, _Tp*, _Size __depth_limit) { while (__last - __first > __stl_threshold) { if (__depth_limit == 0) { partial_sort(__first, __last, __last); return; } --__depth_limit; _RandomAccessIter __cut = __unguarded_partition(__first, __last, _Tp(__median(*__first, *(__first + (__last - __first)/2), *(__last - 1)))); __introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit); __last = __cut; } } template void __introsort_loop(_RandomAccessIter __first, _RandomAccessIter __last, _Tp*, _Size __depth_limit, _Compare __comp) { while (__last - __first > __stl_threshold) { if (__depth_limit == 0) { partial_sort(__first, __last, __last, __comp); return; } --__depth_limit; _RandomAccessIter __cut = __unguarded_partition(__first, __last, _Tp(__median(*__first, *(__first + (__last - __first)/2), *(__last - 1), __comp)), __comp); __introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit, __comp); __last = __cut; } } template inline void sort(_RandomAccessIter __first, _RandomAccessIter __last) { if (__first != __last) { __introsort_loop(__first, __last, __value_type( __first ) , __lg(__last - __first) * 2); __final_insertion_sort(__first, __last); } } template inline void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) { if (__first != __last) { __introsort_loop(__first, __last, __value_type( __first ) , __lg(__last - __first) * 2, __comp); __final_insertion_sort(__first, __last, __comp); } } template void __inplace_stable_sort(_RandomAccessIter __first, _RandomAccessIter __last) { if (__last - __first < 15) { __insertion_sort(__first, __last); return; } _RandomAccessIter __middle = __first + (__last - __first) / 2; __inplace_stable_sort(__first, __middle); __inplace_stable_sort(__middle, __last); __merge_without_buffer(__first, __middle, __last, __middle - __first, __last - __middle); } template void __inplace_stable_sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) { if (__last - __first < 15) { __insertion_sort(__first, __last, __comp); return; } _RandomAccessIter __middle = __first + (__last - __first) / 2; __inplace_stable_sort(__first, __middle, __comp); __inplace_stable_sort(__middle, __last, __comp); __merge_without_buffer(__first, __middle, __last, __middle - __first, __last - __middle, __comp); } template void __merge_sort_loop(_RandomAccessIter1 __first, _RandomAccessIter1 __last, _RandomAccessIter2 __result, _Distance __step_size) { _Distance __two_step = 2 * __step_size; while (__last - __first >= __two_step) { __result = merge(__first, __first + __step_size, __first + __step_size, __first + __two_step, __result); __first += __two_step; } __step_size = min(_Distance(__last - __first), __step_size); merge(__first, __first + __step_size, __first + __step_size, __last, __result); } template void __merge_sort_loop(_RandomAccessIter1 __first, _RandomAccessIter1 __last, _RandomAccessIter2 __result, _Distance __step_size, _Compare __comp) { _Distance __two_step = 2 * __step_size; while (__last - __first >= __two_step) { __result = merge(__first, __first + __step_size, __first + __step_size, __first + __two_step, __result, __comp); __first += __two_step; } __step_size = min(_Distance(__last - __first), __step_size); merge(__first, __first + __step_size, __first + __step_size, __last, __result, __comp); } const int __stl_chunk_size = 7; template void __chunk_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last, _Distance __chunk_size) { while (__last - __first >= __chunk_size) { __insertion_sort(__first, __first + __chunk_size); __first += __chunk_size; } __insertion_sort(__first, __last); } template void __chunk_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last, _Distance __chunk_size, _Compare __comp) { while (__last - __first >= __chunk_size) { __insertion_sort(__first, __first + __chunk_size, __comp); __first += __chunk_size; } __insertion_sort(__first, __last, __comp); } template void __merge_sort_with_buffer(_RandomAccessIter __first, _RandomAccessIter __last, _Pointer __buffer, _Distance*) { _Distance __len = __last - __first; _Pointer __buffer_last = __buffer + __len; _Distance __step_size = __stl_chunk_size; __chunk_insertion_sort(__first, __last, __step_size); while (__step_size < __len) { __merge_sort_loop(__first, __last, __buffer, __step_size); __step_size *= 2; __merge_sort_loop(__buffer, __buffer_last, __first, __step_size); __step_size *= 2; } } template void __merge_sort_with_buffer(_RandomAccessIter __first, _RandomAccessIter __last, _Pointer __buffer, _Distance*, _Compare __comp) { _Distance __len = __last - __first; _Pointer __buffer_last = __buffer + __len; _Distance __step_size = __stl_chunk_size; __chunk_insertion_sort(__first, __last, __step_size, __comp); while (__step_size < __len) { __merge_sort_loop(__first, __last, __buffer, __step_size, __comp); __step_size *= 2; __merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp); __step_size *= 2; } } template void __stable_sort_adaptive(_RandomAccessIter __first, _RandomAccessIter __last, _Pointer __buffer, _Distance __buffer_size) { _Distance __len = (__last - __first + 1) / 2; _RandomAccessIter __middle = __first + __len; if (__len > __buffer_size) { __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size); __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size); } else { __merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0); __merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0); } __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), _Distance(__last - __middle), __buffer, __buffer_size); } template void __stable_sort_adaptive(_RandomAccessIter __first, _RandomAccessIter __last, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) { _Distance __len = (__last - __first + 1) / 2; _RandomAccessIter __middle = __first + __len; if (__len > __buffer_size) { __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size, __comp); __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size, __comp); } else { __merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0, __comp); __merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0, __comp); } __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), _Distance(__last - __middle), __buffer, __buffer_size, __comp); } template inline void __stable_sort_aux(_RandomAccessIter __first, _RandomAccessIter __last, _Tp*, _Distance*) { _Temporary_buffer<_RandomAccessIter, _Tp> buf(__first, __last); if (buf.begin() == 0) __inplace_stable_sort(__first, __last); else __stable_sort_adaptive(__first, __last, buf.begin(), _Distance(buf.size())); } template inline void __stable_sort_aux(_RandomAccessIter __first, _RandomAccessIter __last, _Tp*, _Distance*, _Compare __comp) { _Temporary_buffer<_RandomAccessIter, _Tp> buf(__first, __last); if (buf.begin() == 0) __inplace_stable_sort(__first, __last, __comp); else __stable_sort_adaptive(__first, __last, buf.begin(), _Distance(buf.size()), __comp); } template inline void stable_sort(_RandomAccessIter __first, _RandomAccessIter __last) { __stable_sort_aux(__first, __last, __value_type( __first ) , __distance_type( __first ) ); } template inline void stable_sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) { __stable_sort_aux(__first, __last, __value_type( __first ) , __distance_type( __first ) , __comp); } template void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last, _Tp*) { make_heap(__first, __middle); for (_RandomAccessIter __i = __middle; __i < __last; ++__i) if (*__i < *__first) __pop_heap(__first, __middle, __i, _Tp(*__i), __distance_type( __first ) ); sort_heap(__first, __middle); } template inline void partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last) { __partial_sort(__first, __middle, __last, __value_type( __first ) ); } template void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last, _Tp*, _Compare __comp) { make_heap(__first, __middle, __comp); for (_RandomAccessIter __i = __middle; __i < __last; ++__i) if (__comp(*__i, *__first)) __pop_heap(__first, __middle, __i, _Tp(*__i), __comp, __distance_type( __first ) ); sort_heap(__first, __middle, __comp); } template inline void partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last, _Compare __comp) { __partial_sort(__first, __middle, __last, __value_type( __first ) , __comp); } template _RandomAccessIter __partial_sort_copy(_InputIter __first, _InputIter __last, _RandomAccessIter __result_first, _RandomAccessIter __result_last, _Distance*, _Tp*) { if (__result_first == __result_last) return __result_last; _RandomAccessIter __result_real_last = __result_first; while(__first != __last && __result_real_last != __result_last) { *__result_real_last = *__first; ++__result_real_last; ++__first; } make_heap(__result_first, __result_real_last); while (__first != __last) { if (*__first < *__result_first) __adjust_heap(__result_first, _Distance(0), _Distance(__result_real_last - __result_first), _Tp(*__first)); ++__first; } sort_heap(__result_first, __result_real_last); return __result_real_last; } template inline _RandomAccessIter partial_sort_copy(_InputIter __first, _InputIter __last, _RandomAccessIter __result_first, _RandomAccessIter __result_last) { return __partial_sort_copy(__first, __last, __result_first, __result_last, __distance_type( __result_first ) , __value_type( __first ) ); } template _RandomAccessIter __partial_sort_copy(_InputIter __first, _InputIter __last, _RandomAccessIter __result_first, _RandomAccessIter __result_last, _Compare __comp, _Distance*, _Tp*) { if (__result_first == __result_last) return __result_last; _RandomAccessIter __result_real_last = __result_first; while(__first != __last && __result_real_last != __result_last) { *__result_real_last = *__first; ++__result_real_last; ++__first; } make_heap(__result_first, __result_real_last, __comp); while (__first != __last) { if (__comp(*__first, *__result_first)) __adjust_heap(__result_first, _Distance(0), _Distance(__result_real_last - __result_first), _Tp(*__first), __comp); ++__first; } sort_heap(__result_first, __result_real_last, __comp); return __result_real_last; } template inline _RandomAccessIter partial_sort_copy(_InputIter __first, _InputIter __last, _RandomAccessIter __result_first, _RandomAccessIter __result_last, _Compare __comp) { return __partial_sort_copy(__first, __last, __result_first, __result_last, __comp, __distance_type( __result_first ) , __value_type( __first ) ); } template void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, _RandomAccessIter __last, _Tp*) { while (__last - __first > 3) { _RandomAccessIter __cut = __unguarded_partition(__first, __last, _Tp(__median(*__first, *(__first + (__last - __first)/2), *(__last - 1)))); if (__cut <= __nth) __first = __cut; else __last = __cut; } __insertion_sort(__first, __last); } template inline void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, _RandomAccessIter __last) { __nth_element(__first, __nth, __last, __value_type( __first ) ); } template void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, _RandomAccessIter __last, _Tp*, _Compare __comp) { while (__last - __first > 3) { _RandomAccessIter __cut = __unguarded_partition(__first, __last, _Tp(__median(*__first, *(__first + (__last - __first)/2), *(__last - 1), __comp)), __comp); if (__cut <= __nth) __first = __cut; else __last = __cut; } __insertion_sort(__first, __last, __comp); } template inline void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, _RandomAccessIter __last, _Compare __comp) { __nth_element(__first, __nth, __last, __value_type( __first ) , __comp); } template _ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Distance*) { _Distance __len = 0; distance(__first, __last, __len); _Distance __half; _ForwardIter __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; advance(__middle, __half); if (*__middle < __val) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } template inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { return __lower_bound(__first, __last, __val, __distance_type( __first ) ); } template _ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Compare __comp, _Distance*) { _Distance __len = 0; distance(__first, __last, __len); _Distance __half; _ForwardIter __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; advance(__middle, __half); if (__comp(*__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } template inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Compare __comp) { return __lower_bound(__first, __last, __val, __comp, __distance_type( __first ) ); } template _ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Distance*) { _Distance __len = 0; distance(__first, __last, __len); _Distance __half; _ForwardIter __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; advance(__middle, __half); if (__val < *__middle) __len = __half; else { __first = __middle; ++__first; __len = __len - __half - 1; } } return __first; } template inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { return __upper_bound(__first, __last, __val, __distance_type( __first ) ); } template _ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Compare __comp, _Distance*) { _Distance __len = 0; distance(__first, __last, __len); _Distance __half; _ForwardIter __middle; while (__len > 0) { __half = __len >> 1; __middle = __first; advance(__middle, __half); if (__comp(__val, *__middle)) __len = __half; else { __first = __middle; ++__first; __len = __len - __half - 1; } } return __first; } template inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Compare __comp) { return __upper_bound(__first, __last, __val, __comp, __distance_type( __first ) ); } template pair<_ForwardIter, _ForwardIter> __equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Distance*) { _Distance __len = 0; distance(__first, __last, __len); _Distance __half; _ForwardIter __middle, __left, __right; while (__len > 0) { __half = __len >> 1; __middle = __first; advance(__middle, __half); if (*__middle < __val) { __first = __middle; ++__first; __len = __len - __half - 1; } else if (__val < *__middle) __len = __half; else { __left = lower_bound(__first, __middle, __val); advance(__first, __len); __right = upper_bound(++__middle, __first, __val); return pair<_ForwardIter, _ForwardIter>(__left, __right); } } return pair<_ForwardIter, _ForwardIter>(__first, __first); } template inline pair<_ForwardIter, _ForwardIter> equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { return __equal_range(__first, __last, __val, __distance_type( __first ) ); } template pair<_ForwardIter, _ForwardIter> __equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Compare __comp, _Distance*) { _Distance __len = 0; distance(__first, __last, __len); _Distance __half; _ForwardIter __middle, __left, __right; while (__len > 0) { __half = __len >> 1; __middle = __first; advance(__middle, __half); if (__comp(*__middle, __val)) { __first = __middle; ++__first; __len = __len - __half - 1; } else if (__comp(__val, *__middle)) __len = __half; else { __left = lower_bound(__first, __middle, __val, __comp); advance(__first, __len); __right = upper_bound(++__middle, __first, __val, __comp); return pair<_ForwardIter, _ForwardIter>(__left, __right); } } return pair<_ForwardIter, _ForwardIter>(__first, __first); } template inline pair<_ForwardIter, _ForwardIter> equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Compare __comp) { return __equal_range(__first, __last, __val, __comp, __distance_type( __first ) ); } template bool binary_search(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { _ForwardIter __i = lower_bound(__first, __last, __val); return __i != __last && !(__val < *__i); } template bool binary_search(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, _Compare __comp) { _ForwardIter __i = lower_bound(__first, __last, __val, __comp); return __i != __last && !__comp(__val, *__i); } template _OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result) { while (__first1 != __last1 && __first2 != __last2) { if (*__first2 < *__first1) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; } ++__result; } return copy(__first2, __last2, copy(__first1, __last1, __result)); } template _OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) { if (__comp(*__first2, *__first1)) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; } ++__result; } return copy(__first2, __last2, copy(__first1, __last1, __result)); } template void __merge_without_buffer(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last, _Distance __len1, _Distance __len2) { if (__len1 == 0 || __len2 == 0) return; if (__len1 + __len2 == 2) { if (*__middle < *__first) iter_swap(__first, __middle); return; } _BidirectionalIter __first_cut = __first; _BidirectionalIter __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; advance(__first_cut, __len11); __second_cut = lower_bound(__middle, __last, *__first_cut); distance(__middle, __second_cut, __len22); } else { __len22 = __len2 / 2; advance(__second_cut, __len22); __first_cut = upper_bound(__first, __middle, *__second_cut); distance(__first, __first_cut, __len11); } _BidirectionalIter __new_middle = rotate(__first_cut, __middle, __second_cut); __merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22); __merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22); } template void __merge_without_buffer(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last, _Distance __len1, _Distance __len2, _Compare __comp) { if (__len1 == 0 || __len2 == 0) return; if (__len1 + __len2 == 2) { if (__comp(*__middle, *__first)) iter_swap(__first, __middle); return; } _BidirectionalIter __first_cut = __first; _BidirectionalIter __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; advance(__first_cut, __len11); __second_cut = lower_bound(__middle, __last, *__first_cut, __comp); distance(__middle, __second_cut, __len22); } else { __len22 = __len2 / 2; advance(__second_cut, __len22); __first_cut = upper_bound(__first, __middle, *__second_cut, __comp); distance(__first, __first_cut, __len11); } _BidirectionalIter __new_middle = rotate(__first_cut, __middle, __second_cut); __merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22, __comp); __merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __comp); } template _BidirectionalIter1 __rotate_adaptive(_BidirectionalIter1 __first, _BidirectionalIter1 __middle, _BidirectionalIter1 __last, _Distance __len1, _Distance __len2, _BidirectionalIter2 __buffer, _Distance __buffer_size) { _BidirectionalIter2 __buffer_end; if (__len1 > __len2 && __len2 <= __buffer_size) { __buffer_end = copy(__middle, __last, __buffer); copy_backward(__first, __middle, __last); return copy(__buffer, __buffer_end, __first); } else if (__len1 <= __buffer_size) { __buffer_end = copy(__first, __middle, __buffer); copy(__middle, __last, __first); return copy_backward(__buffer, __buffer_end, __last); } else return rotate(__first, __middle, __last); } template _BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1, _BidirectionalIter2 __first2, _BidirectionalIter2 __last2, _BidirectionalIter3 __result) { if (__first1 == __last1) return copy_backward(__first2, __last2, __result); if (__first2 == __last2) return copy_backward(__first1, __last1, __result); --__last1; --__last2; while (true) { if (*__last2 < *__last1) { *--__result = *__last1; if (__first1 == __last1) return copy_backward(__first2, ++__last2, __result); --__last1; } else { *--__result = *__last2; if (__first2 == __last2) return copy_backward(__first1, ++__last1, __result); --__last2; } } } template _BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1, _BidirectionalIter2 __first2, _BidirectionalIter2 __last2, _BidirectionalIter3 __result, _Compare __comp) { if (__first1 == __last1) return copy_backward(__first2, __last2, __result); if (__first2 == __last2) return copy_backward(__first1, __last1, __result); --__last1; --__last2; while (true) { if (__comp(*__last2, *__last1)) { *--__result = *__last1; if (__first1 == __last1) return copy_backward(__first2, ++__last2, __result); --__last1; } else { *--__result = *__last2; if (__first2 == __last2) return copy_backward(__first1, ++__last1, __result); --__last2; } } } template void __merge_adaptive(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size) { if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = copy(__first, __middle, __buffer); merge(__buffer, __buffer_end, __middle, __last, __first); } else if (__len2 <= __buffer_size) { _Pointer __buffer_end = copy(__middle, __last, __buffer); __merge_backward(__first, __middle, __buffer, __buffer_end, __last); } else { _BidirectionalIter __first_cut = __first; _BidirectionalIter __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; advance(__first_cut, __len11); __second_cut = lower_bound(__middle, __last, *__first_cut); distance(__middle, __second_cut, __len22); } else { __len22 = __len2 / 2; advance(__second_cut, __len22); __first_cut = upper_bound(__first, __middle, *__second_cut); distance(__first, __first_cut, __len11); } _BidirectionalIter __new_middle = __rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, __len22, __buffer, __buffer_size); __merge_adaptive(__first, __first_cut, __new_middle, __len11, __len22, __buffer, __buffer_size); __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __buffer, __buffer_size); } } template void __merge_adaptive(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last, _Distance __len1, _Distance __len2, _Pointer __buffer, _Distance __buffer_size, _Compare __comp) { if (__len1 <= __len2 && __len1 <= __buffer_size) { _Pointer __buffer_end = copy(__first, __middle, __buffer); merge(__buffer, __buffer_end, __middle, __last, __first, __comp); } else if (__len2 <= __buffer_size) { _Pointer __buffer_end = copy(__middle, __last, __buffer); __merge_backward(__first, __middle, __buffer, __buffer_end, __last, __comp); } else { _BidirectionalIter __first_cut = __first; _BidirectionalIter __second_cut = __middle; _Distance __len11 = 0; _Distance __len22 = 0; if (__len1 > __len2) { __len11 = __len1 / 2; advance(__first_cut, __len11); __second_cut = lower_bound(__middle, __last, *__first_cut, __comp); distance(__middle, __second_cut, __len22); } else { __len22 = __len2 / 2; advance(__second_cut, __len22); __first_cut = upper_bound(__first, __middle, *__second_cut, __comp); distance(__first, __first_cut, __len11); } _BidirectionalIter __new_middle = __rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, __len22, __buffer, __buffer_size); __merge_adaptive(__first, __first_cut, __new_middle, __len11, __len22, __buffer, __buffer_size, __comp); __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, __len2 - __len22, __buffer, __buffer_size, __comp); } } template inline void __inplace_merge_aux(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last, _Tp*, _Distance*) { _Distance __len1 = 0; distance(__first, __middle, __len1); _Distance __len2 = 0; distance(__middle, __last, __len2); _Temporary_buffer<_BidirectionalIter, _Tp> __buf(__first, __last); if (__buf.begin() == 0) __merge_without_buffer(__first, __middle, __last, __len1, __len2); else __merge_adaptive(__first, __middle, __last, __len1, __len2, __buf.begin(), _Distance(__buf.size())); } template inline void __inplace_merge_aux(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last, _Tp*, _Distance*, _Compare __comp) { _Distance __len1 = 0; distance(__first, __middle, __len1); _Distance __len2 = 0; distance(__middle, __last, __len2); _Temporary_buffer<_BidirectionalIter, _Tp> __buf(__first, __last); if (__buf.begin() == 0) __merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp); else __merge_adaptive(__first, __middle, __last, __len1, __len2, __buf.begin(), _Distance(__buf.size()), __comp); } template inline void inplace_merge(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last) { if (__first == __middle || __middle == __last) return; __inplace_merge_aux(__first, __middle, __last, __value_type( __first ) , __distance_type( __first ) ); } template inline void inplace_merge(_BidirectionalIter __first, _BidirectionalIter __middle, _BidirectionalIter __last, _Compare __comp) { if (__first == __middle || __middle == __last) return; __inplace_merge_aux(__first, __middle, __last, __value_type( __first ) , __distance_type( __first ) , __comp); } template bool includes(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2) { while (__first1 != __last1 && __first2 != __last2) if (*__first2 < *__first1) return false; else if(*__first1 < *__first2) ++__first1; else ++__first1, ++__first2; return __first2 == __last2; } template bool includes(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first2, *__first1)) return false; else if(__comp(*__first1, *__first2)) ++__first1; else ++__first1, ++__first2; return __first2 == __last2; } template _OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result) { while (__first1 != __last1 && __first2 != __last2) { if (*__first1 < *__first2) { *__result = *__first1; ++__first1; } else if (*__first2 < *__first1) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; ++__first2; } ++__result; } return copy(__first2, __last2, copy(__first1, __last1, __result)); } template _OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) { if (__comp(*__first1, *__first2)) { *__result = *__first1; ++__first1; } else if (__comp(*__first2, *__first1)) { *__result = *__first2; ++__first2; } else { *__result = *__first1; ++__first1; ++__first2; } ++__result; } return copy(__first2, __last2, copy(__first1, __last1, __result)); } template _OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result) { while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) ++__first1; else if (*__first2 < *__first1) ++__first2; else { *__result = *__first1; ++__first1; ++__first2; ++__result; } return __result; } template _OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) ++__first1; else if (__comp(*__first2, *__first1)) ++__first2; else { *__result = *__first1; ++__first1; ++__first2; ++__result; } return __result; } template _OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result) { while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) { *__result = *__first1; ++__first1; ++__result; } else if (*__first2 < *__first1) ++__first2; else { ++__first1; ++__first2; } return copy(__first1, __last1, __result); } template _OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) { *__result = *__first1; ++__first1; ++__result; } else if (__comp(*__first2, *__first1)) ++__first2; else { ++__first1; ++__first2; } return copy(__first1, __last1, __result); } template _OutputIter set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result) { while (__first1 != __last1 && __first2 != __last2) if (*__first1 < *__first2) { *__result = *__first1; ++__first1; ++__result; } else if (*__first2 < *__first1) { *__result = *__first2; ++__first2; ++__result; } else { ++__first1; ++__first2; } return copy(__first2, __last2, copy(__first1, __last1, __result)); } template _OutputIter set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2, _OutputIter __result, _Compare __comp) { while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first1, *__first2)) { *__result = *__first1; ++__first1; ++__result; } else if (__comp(*__first2, *__first1)) { *__result = *__first2; ++__first2; ++__result; } else { ++__first1; ++__first2; } return copy(__first2, __last2, copy(__first1, __last1, __result)); } template _ForwardIter max_element(_ForwardIter __first, _ForwardIter __last) { if (__first == __last) return __first; _ForwardIter __result = __first; while (++__first != __last) if (*__result < *__first) __result = __first; return __result; } template _ForwardIter max_element(_ForwardIter __first, _ForwardIter __last, _Compare __comp) { if (__first == __last) return __first; _ForwardIter __result = __first; while (++__first != __last) if (__comp(*__result, *__first)) __result = __first; return __result; } template _ForwardIter min_element(_ForwardIter __first, _ForwardIter __last) { if (__first == __last) return __first; _ForwardIter __result = __first; while (++__first != __last) if (*__first < *__result) __result = __first; return __result; } template _ForwardIter min_element(_ForwardIter __first, _ForwardIter __last, _Compare __comp) { if (__first == __last) return __first; _ForwardIter __result = __first; while (++__first != __last) if (__comp(*__first, *__result)) __result = __first; return __result; } template bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last) { if (__first == __last) return false; _BidirectionalIter __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIter __ii = __i; --__i; if (*__i < *__ii) { _BidirectionalIter __j = __last; while (!(*__i < *--__j)) {} iter_swap(__i, __j); reverse(__ii, __last); return true; } if (__i == __first) { reverse(__first, __last); return false; } } } template bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last, _Compare __comp) { if (__first == __last) return false; _BidirectionalIter __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIter __ii = __i; --__i; if (__comp(*__i, *__ii)) { _BidirectionalIter __j = __last; while (!__comp(*__i, *--__j)) {} iter_swap(__i, __j); reverse(__ii, __last); return true; } if (__i == __first) { reverse(__first, __last); return false; } } } template bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last) { if (__first == __last) return false; _BidirectionalIter __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIter __ii = __i; --__i; if (*__ii < *__i) { _BidirectionalIter __j = __last; while (!(*--__j < *__i)) {} iter_swap(__i, __j); reverse(__ii, __last); return true; } if (__i == __first) { reverse(__first, __last); return false; } } } template bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last, _Compare __comp) { if (__first == __last) return false; _BidirectionalIter __i = __first; ++__i; if (__i == __last) return false; __i = __last; --__i; for(;;) { _BidirectionalIter __ii = __i; --__i; if (__comp(*__ii, *__i)) { _BidirectionalIter __j = __last; while (!__comp(*--__j, *__i)) {} iter_swap(__i, __j); reverse(__ii, __last); return true; } if (__i == __first) { reverse(__first, __last); return false; } } } template _InputIter find_first_of(_InputIter __first1, _InputIter __last1, _ForwardIter __first2, _ForwardIter __last2) { for ( ; __first1 != __last1; ++__first1) for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter) if (*__first1 == *__iter) return __first1; return __last1; } template _InputIter find_first_of(_InputIter __first1, _InputIter __last1, _ForwardIter __first2, _ForwardIter __last2, _BinaryPredicate __comp) { for ( ; __first1 != __last1; ++__first1) for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter) if (__comp(*__first1, *__iter)) return __first1; return __last1; } template _ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2, _ForwardIter2 __last2, forward_iterator_tag, forward_iterator_tag) { if (__first2 == __last2) return __last1; else { _ForwardIter1 __result = __last1; while (1) { _ForwardIter1 __new_result = search(__first1, __last1, __first2, __last2); if (__new_result == __last1) return __result; else { __result = __new_result; __first1 = __new_result; ++__first1; } } } } template _ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2, _ForwardIter2 __last2, forward_iterator_tag, forward_iterator_tag, _BinaryPredicate __comp) { if (__first2 == __last2) return __last1; else { _ForwardIter1 __result = __last1; while (1) { _ForwardIter1 __new_result = search(__first1, __last1, __first2, __last2, __comp); if (__new_result == __last1) return __result; else { __result = __new_result; __first1 = __new_result; ++__first1; } } } } template _BidirectionalIter1 __find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1, _BidirectionalIter2 __first2, _BidirectionalIter2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag) { typedef reverse_iterator<_BidirectionalIter1> _RevIter1; typedef reverse_iterator<_BidirectionalIter2> _RevIter2; _RevIter1 __rlast1(__first1); _RevIter2 __rlast2(__first2); _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1, _RevIter2(__last2), __rlast2); if (__rresult == __rlast1) return __last1; else { _BidirectionalIter1 __result = __rresult.base(); advance(__result, -distance(__first2, __last2)); return __result; } } template _BidirectionalIter1 __find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1, _BidirectionalIter2 __first2, _BidirectionalIter2 __last2, bidirectional_iterator_tag, bidirectional_iterator_tag, _BinaryPredicate __comp) { typedef reverse_iterator<_BidirectionalIter1> _RevIter1; typedef reverse_iterator<_BidirectionalIter2> _RevIter2; _RevIter1 __rlast1(__first1); _RevIter2 __rlast2(__first2); _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1, _RevIter2(__last2), __rlast2, __comp); if (__rresult == __rlast1) return __last1; else { _BidirectionalIter1 __result = __rresult.base(); advance(__result, -distance(__first2, __last2)); return __result; } } template inline _ForwardIter1 find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2, _ForwardIter2 __last2) { return __find_end(__first1, __last1, __first2, __last2, __iterator_category( __first1 ) , __iterator_category( __first2 ) ); } template inline _ForwardIter1 find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2, _ForwardIter2 __last2, _BinaryPredicate __comp) { return __find_end(__first1, __last1, __first2, __last2, __iterator_category( __first1 ) , __iterator_category( __first2 ) , __comp); } template bool __is_heap(_RandomAccessIter __first, _Distance __n) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) { if (__first[__parent] < __first[__child]) return false; if ((__child & 1) == 0) ++__parent; } return true; } template bool __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp, _Distance __n) { _Distance __parent = 0; for (_Distance __child = 1; __child < __n; ++__child) { if (__comp(__first[__parent], __first[__child])) return false; if ((__child & 1) == 0) ++__parent; } return true; } template inline bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last) { return __is_heap(__first, __last - __first); } template inline bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last, _StrictWeakOrdering __comp) { return __is_heap(__first, __comp, __last - __first); } template bool is_sorted(_ForwardIter __first, _ForwardIter __last) { if (__first == __last) return true; _ForwardIter __next = __first; for (++__next; __next != __last; __first = __next, ++__next) { if (*__next < *__first) return false; } return true; } template bool is_sorted(_ForwardIter __first, _ForwardIter __last, _StrictWeakOrdering __comp) { if (__first == __last) return true; _ForwardIter __next = __first; for (++__next; __next != __last; __first = __next, ++__next) { if (__comp(*__next, *__first)) return false; } return true; } # 34 "/usr/include/g++/algorithm" 2 3 # 41 "/usr/include/g++/std/std_valarray.h" 2 3 # 63 "/usr/include/g++/std/std_valarray.h" 3 extern "C" { void* __builtin_alloca ( size_t ) ; } extern "C++" { template class _Expr; template class _ValArray; template class _Oper, template class _Meta, class _Dom> struct _UnClos; template class _Oper, template class _Meta1, template class _Meta2, class _Dom1, class _Dom2> class _BinClos; template class _Meta, class _Dom> class _SClos; template class _Meta, class _Dom> class _GClos; template class _Meta, class _Dom> class _IClos; template class _Meta, class _Dom> class _ValFunClos; template class _Meta, class _Dom> class _RefFunClos; template struct _Unary_plus; template struct _Bitwise_and; template struct _Bitwise_or; template struct _Bitwise_xor; template struct _Bitwise_not; template struct _Shift_left; template struct _Shift_right; template class valarray; class slice; template class slice_array; class gslice; template class gslice_array; template class mask_array; template class indirect_array; } # 1 "/usr/include/g++/std/valarray_array.h" 1 3 # 1 "/usr/include/g++/cstring" 1 3 # 94 "/usr/include/g++/cstring" 3 # 36 "/usr/include/g++/std/valarray_array.h" 2 3 extern "C++" { template inline void __valarray_fill (_Tp* __restrict__ __a, size_t __n, const _Tp& __t) { while (__n--) *__a++ = __t; } template inline void __valarray_fill (_Tp* __restrict__ __a, size_t __n, size_t __s, const _Tp& __t) { for (size_t __i=0; __i<__n; ++__i, __a+=__s) *__a = __t; } template inline void __valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i, size_t __n, const _Tp& __t) { for (size_t __j=0; __j<__n; ++__j, ++__i) __a[*__i] = __t; } template inline void __valarray_copy (const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b) { memcpy (__b, __a, __n * sizeof(_Tp)); } template inline void __valarray_copy (const _Tp* __restrict__ __a, size_t __n, size_t __s, _Tp* __restrict__ __b) { for (size_t __i=0; __i<__n; ++__i, ++__b, __a += __s) *__b = *__a; } template inline void __valarray_copy (const _Tp* __restrict__ __a, _Tp* __restrict__ __b, size_t __n, size_t __s) { for (size_t __i=0; __i<__n; ++__i, ++__a, __b+=__s) *__b = *__a; } template inline void __valarray_copy (const _Tp* __restrict__ __a, const size_t* __restrict__ __i, _Tp* __restrict__ __b, size_t __n) { for (size_t __j=0; __j<__n; ++__j, ++__b, ++__i) *__b = __a[*__i]; } template inline void __valarray_copy (const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b, const size_t* __restrict__ __i) { for (size_t __j=0; __j<__n; ++__j, ++__a, ++__i) __b[*__i] = *__a; } template struct _Array { explicit _Array (size_t); explicit _Array (_Tp* const __restrict__); explicit _Array (const valarray<_Tp>&); _Array (const _Tp* __restrict__, size_t); void free_data() const; _Tp* begin () const; _Tp* const __restrict__ _M_data; }; template inline void __valarray_fill (_Array<_Tp> __a, size_t __n, const _Tp& __t) { __valarray_fill (__a._M_data, __n, __t); } template inline void __valarray_fill (_Array<_Tp> __a, size_t __n, size_t __s, const _Tp& __t) { __valarray_fill (__a._M_data, __n, __s, __t); } template inline void __valarray_fill (_Array<_Tp> __a, _Array __i, size_t __n, const _Tp& __t) { __valarray_fill (__a._M_data, __i._M_data, __n, __t); } template inline void __valarray_copy (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { __valarray_copy (__a._M_data, __n, __b._M_data); } template inline void __valarray_copy (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { __valarray_copy(__a._M_data, __n, __s, __b._M_data); } template inline void __valarray_copy (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { __valarray_copy (__a._M_data, __b._M_data, __n, __s); } template inline void __valarray_copy (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { __valarray_copy (__a._M_data, __i._M_data, __b._M_data, __n); } template inline void __valarray_copy (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { __valarray_copy (__a._M_data, __n, __b._M_data, __i._M_data); } template inline _Array<_Tp>::_Array (size_t __n) : _M_data (new _Tp[__n]) {} template inline _Array<_Tp>::_Array (_Tp* const __restrict__ __p) : _M_data (__p) {} template inline _Array<_Tp>::_Array (const valarray<_Tp>& __v) : _M_data (__v._M_data) {} template inline _Array<_Tp>::_Array (const _Tp* __restrict__ __b, size_t __s) : _M_data (new _Tp[__s]) { __valarray_copy (__b, __s, _M_data); } template inline void _Array<_Tp>::free_data() const { delete[] _M_data; } template inline _Tp* _Array<_Tp>::begin () const { return _M_data; } # 321 "/usr/include/g++/std/valarray_array.h" 3 template inline void _Array_augmented_plus (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p += __t; } template inline void _Array_augmented_plus (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p += *__q; } template void _Array_augmented_plus (_Array<_Tp> __a, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p += __e[__i]; } template inline void _Array_augmented_plus (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p += *__q; } template inline void _Array_augmented_plus (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p += *__q; } template void _Array_augmented_plus (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p += __e[__i]; } template inline void _Array_augmented_plus (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q) __a._M_data[*__j] += *__q; } template inline void _Array_augmented_plus (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) *__p += __b._M_data[*__j]; } template void _Array_augmented_plus (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] += __e[__k]; } template void _Array_augmented_plus (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p += *__q; } } template void _Array_augmented_plus (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p += *__q; } } template void _Array_augmented_plus (_Array<_Tp> __a, _Array __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p += __e[__i]; } } template inline void _Array_augmented_minus (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p -= __t; } template inline void _Array_augmented_minus (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p -= *__q; } template void _Array_augmented_minus (_Array<_Tp> __a, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p -= __e[__i]; } template inline void _Array_augmented_minus (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p -= *__q; } template inline void _Array_augmented_minus (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p -= *__q; } template void _Array_augmented_minus (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p -= __e[__i]; } template inline void _Array_augmented_minus (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q) __a._M_data[*__j] -= *__q; } template inline void _Array_augmented_minus (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) *__p -= __b._M_data[*__j]; } template void _Array_augmented_minus (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] -= __e[__k]; } template void _Array_augmented_minus (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p -= *__q; } } template void _Array_augmented_minus (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p -= *__q; } } template void _Array_augmented_minus (_Array<_Tp> __a, _Array __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p -= __e[__i]; } } template inline void _Array_augmented_multiplies (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p *= __t; } template inline void _Array_augmented_multiplies (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p *= *__q; } template void _Array_augmented_multiplies (_Array<_Tp> __a, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p *= __e[__i]; } template inline void _Array_augmented_multiplies (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p *= *__q; } template inline void _Array_augmented_multiplies (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p *= *__q; } template void _Array_augmented_multiplies (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p *= __e[__i]; } template inline void _Array_augmented_multiplies (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q) __a._M_data[*__j] *= *__q; } template inline void _Array_augmented_multiplies (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) *__p *= __b._M_data[*__j]; } template void _Array_augmented_multiplies (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] *= __e[__k]; } template void _Array_augmented_multiplies (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p *= *__q; } } template void _Array_augmented_multiplies (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p *= *__q; } } template void _Array_augmented_multiplies (_Array<_Tp> __a, _Array __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p *= __e[__i]; } } template inline void _Array_augmented_divides (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p /= __t; } template inline void _Array_augmented_divides (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p /= *__q; } template void _Array_augmented_divides (_Array<_Tp> __a, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p /= __e[__i]; } template inline void _Array_augmented_divides (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p /= *__q; } template inline void _Array_augmented_divides (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p /= *__q; } template void _Array_augmented_divides (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p /= __e[__i]; } template inline void _Array_augmented_divides (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q) __a._M_data[*__j] /= *__q; } template inline void _Array_augmented_divides (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) *__p /= __b._M_data[*__j]; } template void _Array_augmented_divides (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] /= __e[__k]; } template void _Array_augmented_divides (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p /= *__q; } } template void _Array_augmented_divides (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p /= *__q; } } template void _Array_augmented_divides (_Array<_Tp> __a, _Array __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p /= __e[__i]; } } template inline void _Array_augmented_modulus (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p %= __t; } template inline void _Array_augmented_modulus (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p %= *__q; } template void _Array_augmented_modulus (_Array<_Tp> __a, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p %= __e[__i]; } template inline void _Array_augmented_modulus (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p %= *__q; } template inline void _Array_augmented_modulus (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p %= *__q; } template void _Array_augmented_modulus (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p %= __e[__i]; } template inline void _Array_augmented_modulus (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q) __a._M_data[*__j] %= *__q; } template inline void _Array_augmented_modulus (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) *__p %= __b._M_data[*__j]; } template void _Array_augmented_modulus (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] %= __e[__k]; } template void _Array_augmented_modulus (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p %= *__q; } } template void _Array_augmented_modulus (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p %= *__q; } } template void _Array_augmented_modulus (_Array<_Tp> __a, _Array __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p %= __e[__i]; } } template inline void _Array_augmented_xor (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p ^= __t; } template inline void _Array_augmented_xor (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p ^= *__q; } template void _Array_augmented_xor (_Array<_Tp> __a, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p ^= __e[__i]; } template inline void _Array_augmented_xor (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p ^= *__q; } template inline void _Array_augmented_xor (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p ^= *__q; } template void _Array_augmented_xor (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p ^= __e[__i]; } template inline void _Array_augmented_xor (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q) __a._M_data[*__j] ^= *__q; } template inline void _Array_augmented_xor (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) *__p ^= __b._M_data[*__j]; } template void _Array_augmented_xor (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] ^= __e[__k]; } template void _Array_augmented_xor (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p ^= *__q; } } template void _Array_augmented_xor (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p ^= *__q; } } template void _Array_augmented_xor (_Array<_Tp> __a, _Array __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p ^= __e[__i]; } } template inline void _Array_augmented_or (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p |= __t; } template inline void _Array_augmented_or (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p |= *__q; } template void _Array_augmented_or (_Array<_Tp> __a, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p |= __e[__i]; } template inline void _Array_augmented_or (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p |= *__q; } template inline void _Array_augmented_or (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p |= *__q; } template void _Array_augmented_or (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p |= __e[__i]; } template inline void _Array_augmented_or (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q) __a._M_data[*__j] |= *__q; } template inline void _Array_augmented_or (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) *__p |= __b._M_data[*__j]; } template void _Array_augmented_or (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] |= __e[__k]; } template void _Array_augmented_or (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p |= *__q; } } template void _Array_augmented_or (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p |= *__q; } } template void _Array_augmented_or (_Array<_Tp> __a, _Array __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p |= __e[__i]; } } template inline void _Array_augmented_and (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p &= __t; } template inline void _Array_augmented_and (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p &= *__q; } template void _Array_augmented_and (_Array<_Tp> __a, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++__p) *__p &= __e[__i]; } template inline void _Array_augmented_and (_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) *__p &= *__q; } template inline void _Array_augmented_and (_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s) { _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s) *__p &= *__q; } template void _Array_augmented_and (_Array<_Tp> __a, size_t __s, const _Expr<_Dom,_Tp>& __e, size_t __n) { _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p &= __e[__i]; } template inline void _Array_augmented_and (_Array<_Tp> __a, _Array __i, _Array<_Tp> __b, size_t __n) { _Tp* __q (__b._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q) __a._M_data[*__j] &= *__q; } template inline void _Array_augmented_and (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __i) { _Tp* __p (__a._M_data); for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p) *__p &= __b._M_data[*__j]; } template void _Array_augmented_and (_Array<_Tp> __a, _Array __i, const _Expr<_Dom, _Tp>& __e, size_t __n) { size_t* __j (__i._M_data); for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] &= __e[__k]; } template void _Array_augmented_and (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n) { bool* ok (__m._M_data); _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p &= *__q; } } template void _Array_augmented_and (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m) { bool* ok (__m._M_data); _Tp* __q (__b._M_data); for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { while (! *ok) { ++ok; ++__q; } *__p &= *__q; } } template void _Array_augmented_and (_Array<_Tp> __a, _Array __m, const _Expr<_Dom, _Tp>& __e, size_t __n) { bool* ok(__m._M_data); _Tp* __p (__a._M_data); for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) { while (! *ok) { ++ok; ++__p; } *__p &= __e[__i]; } } template inline void _Array_augmented_shift_left (_Array<_Tp> __a, size_t __n, const _Tp& __t) { for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p) *__p <<= __t; } template inline void _Array_augmented_shift_left (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b) { _Tp* __p (__a._M_data); for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q) *__p <<= *__q; } template void _Array_augmented_shift_left (_Array<_Tp> __a, const _Expr<_Dom,_Tp