template<t> \ inline bool operator>(const a1& x,const a2& y); \ \ template<t> \ inline bool operator>=(const a1& x,const a2& y); \ \ template<t> \ inline bool operator<=(const a1& x,const a2& y); \ BOOST_FLYWEIGHT_COMPLETE_COMP_OPS_DECL( typename T1 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(1) BOOST_PP_COMMA() typename T2 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(2), flyweight< T1 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TEMPL_ARGS(1) >, flyweight< T2 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TEMPL_ARGS(2) >) #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) BOOST_FLYWEIGHT_COMPLETE_COMP_OPS_DECL( typename T1 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TYPENAME_TEMPL_ARGS(1) BOOST_PP_COMMA() typename T2, flyweight< T1 BOOST_PP_COMMA() BOOST_FLYWEIGHT_TEMPL_ARGS(1) >, T2)
{ namespace formulae { namespace mpdata { template<opts_t opts, int dim, class arr_3d_t> inline auto HOT_1_helper( const arr_3d_t &GC, const arr_3d_t &G, const rng_t &i, const rng_t &j, const rng_t &k ) return_macro(, ( 3 * GC(pi<dim>(i+h, j, k)) * abs(GC(pi<dim>(i+h, j, k))) / G_at_half<opts BOOST_PP_COMMA() dim>(G, i, j, k) - 2 * pow(GC(pi<dim>(i+h, j, k)), 3) / pow(G_at_half<opts BOOST_PP_COMMA() dim>(G, i, j, k), 2) - GC(pi<dim>(i+h, j, k)) ) / 3 ) template<opts_t opts, int dim, class arr_3d_t> inline auto HOT_2_helper( const arrvec_t<arr_3d_t> &GC, const arr_3d_t &G, const rng_t &i, const rng_t &j, const rng_t &k ) return_macro(, ( abs(GC[dim](pi<dim>(i+h, j, k))) - 2 * pow(GC[dim](pi<dim>(i+h, j, k)), 2) / G_at_half<opts BOOST_PP_COMMA() dim>(G, i, j, k)
/// This is how we're handling vectors. It is a work-around because vectors are handled specially /// by boost::program_options. It allows the command line to look something like /// /// --profileLengths 10 20 30 /// /// The TMP_EXTRA_STUFF must be set to include (at least) the ->multitoken() thing. /// It should also be unset at the bottom of the vector initializations. #undef TMP_EXTRA_STUFF #define TMP_EXTRA_STUFF ->multitoken() ///Vector definitions go here /// Make the expected number of deletions be .5 or 1.0 per sequence. /// Note that this will apply to the insertions, too, unless /// m_parameters.useDeletionsForInsertionsParameters is set to false. GALOSH_DEF_OPT(expectedDeletionsCounts,myVector<double>,myVector<double>(1,1.0) BOOST_PP_COMMA() string("1.0"),"Iterate through this set of expected deletions. Note that deletions-counts=insertion counts unless useDeletionsForInsertionsParameters is false"); /** * If useDeletionsForInsertionsParameters is false, the insertionOpen * value of the true profile will be set to ( expectedInsertionsCount / * profileLength ). * * UPDATE: This is now a pointer to a vector. Tests will be run foreach * expected_insertions_count in expectedInsertionCounts. If it is unspecified, * { 1.0 } will be used. * @see useDeletionsForInsertionsParameters */ GALOSH_DEF_OPT(expectedInsertionsCounts,myVector<double>,myVector<double>(1,1.0) BOOST_PP_COMMA() string("1.0"),"Iterate through this series of expected insertions. useDeletionsForInsertionsParameters must be false or this parameter is ignored."); /** * The deletionExtension value of the true profile will be the minimum of
#include <boost/preprocessor/punctuation/paren.hpp> #include <boost/preprocessor/tuple/eat.hpp> #define _MAX_ARGS 64 /* Python code for generating The TF_ARG_N() macros: for i in range(1, 32+1): line = '#define TF_ARG_%d(' % i for j in range(1, i): line += '_%d,' % j line += '_%d,...) _%d' % (i, i) print(line) */ // Make sure TF_ARG_N() supports at least BOOST_PP_LIMIT_TUPLE arguments. #define _TF_ARG_ERROR(a, b, c) #define _TF_ARG_TUPLE_OVERFLOW(a, b, c) BOOST_PP_IIF(BOOST_PP_EQUAL(1, \ BOOST_PP_EXPAND(BOOST_PP_CAT(TF_ARG_, _MAX_ARGS) BOOST_PP_LPAREN() \ _TF \ BOOST_PP_REPEAT(BOOST_PP_SUB(_MAX_ARGS, 2), _TF_NUM_ARGS_REP, _TF) \ BOOST_PP_COMMA() 1 BOOST_PP_RPAREN())), \ BOOST_PP_TUPLE_EAT(1), _TF_ARG_ERROR)(...) BOOST_PP_IIF(BOOST_PP_GREATER_EQUAL(_MAX_ARGS, BOOST_PP_LIMIT_TUPLE), \ BOOST_PP_TUPLE_EAT(1), _TF_ARG_TUPLE_OVERFLOW)(...) #endif