operators.hpp

来自「CGAL is a collaborative effort of severa」· HPP 代码 · 共 2,105 行 · 第 1/5 页

HPP
2,105
字号
//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<or_assign_op, BaseT, T1>::typeoperator|=(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<or_assign_op, BaseT, T1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  xor assign lazy operator (infix ^=)/////////////////////////////////////////////////////////////////////////////////struct xor_assign_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<xor_assign_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<xor_assign_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<xor_assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<xor_assign_op, BaseT, T1>::typeoperator^=(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<xor_assign_op, BaseT, T1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  shift left assign lazy operator (infix <<=)/////////////////////////////////////////////////////////////////////////////////struct shift_l_assign_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<shift_l_assign_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<shift_l_assign_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<shift_l_assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<shift_l_assign_op, BaseT, T1>::typeoperator<<=(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<shift_l_assign_op, BaseT, T1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  shift right assign lazy operator (infix >>=)/////////////////////////////////////////////////////////////////////////////////struct shift_r_assign_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<shift_r_assign_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<shift_r_assign_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<shift_r_assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<shift_r_assign_op, BaseT, T1>::typeoperator>>=(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<shift_r_assign_op, BaseT, T1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  plus lazy operator (infix +)/////////////////////////////////////////////////////////////////////////////////struct plus_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<plus_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<plus_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<plus_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<plus_op, BaseT, T1>::typeoperator+(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<plus_op, BaseT, T1>::construct(_0, _1);}//////////////////////////////////template <typename T0, typename BaseT>inline typename impl::make_binary2<plus_op, T0, BaseT>::typeoperator+(T0 CREF _0, actor<BaseT> const& _1){    return impl::make_binary2<plus_op, T0, BaseT>::construct(_0, _1);}//////////////////////////////////template <typename BaseT0, typename BaseT1>inline typename impl::make_binary3<plus_op, BaseT0, BaseT1>::typeoperator+(actor<BaseT0> const& _0, actor<BaseT1> const& _1){    return impl::make_binary3<plus_op, BaseT0, BaseT1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  minus lazy operator (infix -)/////////////////////////////////////////////////////////////////////////////////struct minus_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<minus_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<minus_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<minus_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<minus_op, BaseT, T1>::typeoperator-(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<minus_op, BaseT, T1>::construct(_0, _1);}//////////////////////////////////template <typename T0, typename BaseT>inline typename impl::make_binary2<minus_op, T0, BaseT>::typeoperator-(T0 CREF _0, actor<BaseT> const& _1){    return impl::make_binary2<minus_op, T0, BaseT>::construct(_0, _1);}//////////////////////////////////template <typename BaseT0, typename BaseT1>inline typename impl::make_binary3<minus_op, BaseT0, BaseT1>::typeoperator-(actor<BaseT0> const& _0, actor<BaseT1> const& _1){    return impl::make_binary3<minus_op, BaseT0, BaseT1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  times lazy operator (infix *)/////////////////////////////////////////////////////////////////////////////////struct times_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<times_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<times_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<times_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<times_op, BaseT, T1>::typeoperator*(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<times_op, BaseT, T1>::construct(_0, _1);}//////////////////////////////////template <typename T0, typename BaseT>inline typename impl::make_binary2<times_op, T0, BaseT>::typeoperator*(T0 CREF _0, actor<BaseT> const& _1){    return impl::make_binary2<times_op, T0, BaseT>::construct(_0, _1);}//////////////////////////////////template <typename BaseT0, typename BaseT1>inline typename impl::make_binary3<times_op, BaseT0, BaseT1>::typeoperator*(actor<BaseT0> const& _0, actor<BaseT1> const& _1){    return impl::make_binary3<times_op, BaseT0, BaseT1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  divide lazy operator (infix /)/////////////////////////////////////////////////////////////////////////////////struct divide_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<divide_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<divide_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<divide_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<divide_op, BaseT, T1>::typeoperator/(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<divide_op, BaseT, T1>::construct(_0, _1);}//////////////////////////////////template <typename T0, typename BaseT>inline typename impl::make_binary2<divide_op, T0, BaseT>::typeoperator/(T0 CREF _0, actor<BaseT> const& _1){    return impl::make_binary2<divide_op, T0, BaseT>::construct(_0, _1);}//////////////////////////////////template <typename BaseT0, typename BaseT1>inline typename impl::make_binary3<divide_op, BaseT0, BaseT1>::typeoperator/(actor<BaseT0> const& _0, actor<BaseT1> const& _1){    return impl::make_binary3<divide_op, BaseT0, BaseT1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  mod lazy operator (infix %)/////////////////////////////////////////////////////////////////////////////////struct mod_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<mod_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<mod_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<mod_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<mod_op, BaseT, T1>::typeoperator%(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<mod_op, BaseT, T1>::construct(_0, _1);}//////////////////////////////////template <typename T0, typename BaseT>inline typename impl::make_binary2<mod_op, T0, BaseT>::typeoperator%(T0 CREF _0, actor<BaseT> const& _1){    return impl::make_binary2<mod_op, T0, BaseT>::construct(_0, _1);}//////////////////////////////////template <typename BaseT0, typename BaseT1>inline typename impl::make_binary3<mod_op, BaseT0, BaseT1>::typeoperator%(actor<BaseT0> const& _0, actor<BaseT1> const& _1){    return impl::make_binary3<mod_op, BaseT0, BaseT1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  and lazy operator (infix &)/////////////////////////////////////////////////////////////////////////////////struct and_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<and_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<and_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<and_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<and_op, BaseT, T1>::typeoperator&(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<and_op, BaseT, T1>::construct(_0, _1);}//////////////////////////////////template <typename T0, typename BaseT>inline typename impl::make_binary2<and_op, T0, BaseT>::typeoperator&(T0 CREF _0, actor<BaseT> const& _1){    return impl::make_binary2<and_op, T0, BaseT>::construct(_0, _1);}//////////////////////////////////template <typename BaseT0, typename BaseT1>inline typename impl::make_binary3<and_op, BaseT0, BaseT1>::typeoperator&(actor<BaseT0> const& _0, actor<BaseT1> const& _1){    return impl::make_binary3<and_op, BaseT0, BaseT1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  or lazy operator (infix |)/////////////////////////////////////////////////////////////////////////////////struct or_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<or_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<or_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<or_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<or_op, BaseT, T1>::typeoperator|(actor<BaseT> const& _0, T1 CREF _1){    return impl::make_binary1<or_op, BaseT, T1>::construct(_0, _1);}//////////////////////////////////template <typename T0, typename BaseT>inline typename impl::make_binary2<or_op, T0, BaseT>::typeoperator|(T0 CREF _0, actor<BaseT> const& _1){    return impl::make_binary2<or_op, T0, BaseT>::construct(_0, _1);}//////////////////////////////////template <typename BaseT0, typename BaseT1>inline typename impl::make_binary3<or_op, BaseT0, BaseT1>::typeoperator|(actor<BaseT0> const& _0, actor<BaseT1> const& _1){    return impl::make_binary3<or_op, BaseT0, BaseT1>::construct(_0, _1);}///////////////////////////////////////////////////////////////////////////////////  xor lazy operator (infix ^)/////////////////////////////////////////////////////////////////////////////////struct xor_op {    template <typename T0, typename T1>    struct result {        typedef typename binary_operator<xor_op, T0, T1>            ::result_type type;    };    template <typename T0, typename T1>    typename binary_operator<xor_op, T0, T1>::result_type    operator()(T0& _0, T1& _1) const    { return binary_operator<xor_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?