您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ BOOST_PREVENT_MACRO_SUBSTITUTION函数代码示例

51自学网 2021-06-01 19:52:39
  C++
这篇教程C++ BOOST_PREVENT_MACRO_SUBSTITUTION函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中BOOST_PREVENT_MACRO_SUBSTITUTION函数的典型用法代码示例。如果您正苦于以下问题:C++ BOOST_PREVENT_MACRO_SUBSTITUTION函数的具体用法?C++ BOOST_PREVENT_MACRO_SUBSTITUTION怎么用?C++ BOOST_PREVENT_MACRO_SUBSTITUTION使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了BOOST_PREVENT_MACRO_SUBSTITUTION函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: apply

    static inline void apply(std::basic_ostream<Char, Traits>& os,                Box const& box, std::string const& style, int size)    {        // Prevent invisible boxes, making them >=1, using "max"        BOOST_USING_STD_MAX();        typedef typename coordinate_type<Box>::type ct;        ct x = geometry::get<geometry::min_corner, 0>(box);        ct y = geometry::get<geometry::min_corner, 1>(box);        ct width = max BOOST_PREVENT_MACRO_SUBSTITUTION(1,                    geometry::get<geometry::max_corner, 0>(box) - x);        ct height = max BOOST_PREVENT_MACRO_SUBSTITUTION (1,                    geometry::get<geometry::max_corner, 1>(box) - y);        os << "<rect x=/"" << x << "/" y=/"" << y           << "/" width=/"" << width << "/" height=/"" << height           << "/" style=/"" << style << "/"/>";    }
开发者ID:Belial2010,项目名称:Pedestrian-Detection-Project,代码行数:18,


示例2: max_wavefront

 typename graph_traits<Graph>::vertices_size_type max_wavefront(const Graph& g, VertexIndexMap index) {   BOOST_USING_STD_MAX();   typename graph_traits<Graph>::vertices_size_type b = 0;   typename graph_traits<Graph>::vertex_iterator i, end;   for (boost::tie(i, end) = vertices(g); i != end; ++i)     b = max BOOST_PREVENT_MACRO_SUBSTITUTION(b, ith_wavefront(*i, g, index));   return b; }
开发者ID:00liujj,项目名称:dealii,代码行数:10,


示例3: sequential_vertex_coloring

  typename property_traits<ColorMap>::value_type  sequential_vertex_coloring(const VertexListGraph& G, OrderPA order,                              ColorMap color)  {    typedef graph_traits<VertexListGraph> GraphTraits;    typedef typename GraphTraits::vertex_descriptor Vertex;    typedef typename property_traits<ColorMap>::value_type size_type;        size_type max_color = 0;    const size_type V = num_vertices(G);    // We need to keep track of which colors are used by    // adjacent vertices. We do this by marking the colors    // that are used. The mark array contains the mark    // for each color. The length of mark is the    // number of vertices since the maximum possible number of colors    // is the number of vertices.    std::vector<size_type> mark(V,                                 std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION());        //Initialize colors     typename GraphTraits::vertex_iterator v, vend;    for (tie(v, vend) = vertices(G); v != vend; ++v)      put(color, *v, V-1);        //Determine the color for every vertex one by one    for ( size_type i = 0; i < V; i++) {      Vertex current = get(order,i);      typename GraphTraits::adjacency_iterator v, vend;            //Mark the colors of vertices adjacent to current.      //i can be the value for marking since i increases successively      for (tie(v,vend) = adjacent_vertices(current, G); v != vend; ++v)        mark[get(color,*v)] = i;             //Next step is to assign the smallest un-marked color      //to the current vertex.      size_type j = 0;      //Scan through all useable colors, find the smallest possible      //color that is not used by neighbors.  Note that if mark[j]      //is equal to i, color j is used by one of the current vertex's      //neighbors.      while ( j < max_color && mark[j] == i )         ++j;            if ( j == max_color )  //All colors are used up. Add one more color        ++max_color;      //At this point, j is the smallest possible color      put(color, current, j);  //Save the color of vertex current    }        return max_color;  }
开发者ID:Aantonb,项目名称:gotham,代码行数:55,


示例4: norm

template<class T, class Policies> inlineT norm(const interval<T, Policies>& x){  typedef interval<T, Policies> I;  if (interval_lib::detail::test_input(x)) {    typedef typename Policies::checking checking;    return checking::nan();  }  BOOST_USING_STD_MAX();  return max BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<T>(-x.lower()), x.upper());}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:11,


示例5: abs

template<class T, class Policies> inlineinterval<T, Policies> abs(const interval<T, Policies>& x){  typedef interval<T, Policies> I;  if (interval_lib::detail::test_input(x))    return I::empty();  if (!interval_lib::user::is_neg(x.lower())) return x;  if (!interval_lib::user::is_pos(x.upper())) return -x;  BOOST_USING_STD_MAX();  return I(static_cast<T>(0), max BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast<T>(-x.lower()), x.upper()), true);}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:11,


示例6: back_edge

      void back_edge(const Edge& e, Graph& g)      {        BOOST_USING_STD_MIN();        if ( target(e, g) != get(pred, source(e, g)) ) {          S.push(e);          put(lowpt, source(e, g),              min BOOST_PREVENT_MACRO_SUBSTITUTION(get(lowpt, source(e, g)),                                                   get(dtm, target(e, g))));        }      }
开发者ID:Albermg7,项目名称:boost,代码行数:11,


示例7: radius_and_diameter

inline std::pair<typename property_traits<EccentricityMap>::value_type,                    typename property_traits<EccentricityMap>::value_type>radius_and_diameter(const Graph& g, EccentricityMap ecc){    function_requires< VertexListGraphConcept<Graph> >();    typedef typename graph_traits<Graph>::vertex_descriptor Vertex;    typedef typename graph_traits<Graph>::vertex_iterator VertexIterator;    function_requires< ReadablePropertyMapConcept<EccentricityMap, Vertex> >();    typedef typename property_traits<EccentricityMap>::value_type Eccentricity;    VertexIterator i, end;    tie(i, end) = vertices(g);    Eccentricity radius = get(ecc, *i);    Eccentricity diameter = get(ecc, *i);    for(i = boost::next(i); i != end; ++i) {        Eccentricity cur = get(ecc, *i);        radius = min BOOST_PREVENT_MACRO_SUBSTITUTION (radius, cur);        diameter = max BOOST_PREVENT_MACRO_SUBSTITUTION (diameter, cur);    }    return std::make_pair(radius, diameter);}
开发者ID:Amplifying,项目名称:intensityengine,代码行数:21,


示例8: size

typename std::basic_string<Ch, Tr, Alloc>::size_type  basic_format<Ch,Tr, Alloc>::size () const {    BOOST_USING_STD_MAX();    size_type sz = prefix_.size();    unsigned long i;    for(i=0; i < items_.size(); ++i) {        const format_item_t& item = items_[i];        sz += item.res_.size();        if( item.argN_ == format_item_t::argN_tabulation)            sz = max BOOST_PREVENT_MACRO_SUBSTITUTION (sz,                    static_cast<size_type>(item.fmtstate_.width_) );        sz += item.appendix_.size();    }    return sz;}
开发者ID:uvbs,项目名称:SupportCenter,代码行数:15,


示例9: floyd_warshall_noninit_dispatch

 bool floyd_warshall_noninit_dispatch(const VertexAndEdgeListGraph& g,    DistanceMatrix& d, WeightMap w,    const bgl_named_params<P, T, R>& params) {   typedef typename property_traits<WeightMap>::value_type WM;    return floyd_warshall_all_pairs_shortest_paths(g, d, w,     choose_param(get_param(params, distance_compare_t()),        std::less<WM>()),     choose_param(get_param(params, distance_combine_t()),        closed_plus<WM>()),     choose_param(get_param(params, distance_inf_t()),        std::numeric_limits<WM>::max BOOST_PREVENT_MACRO_SUBSTITUTION()),     choose_param(get_param(params, distance_zero_t()),        WM())); }
开发者ID:Albermg7,项目名称:boost,代码行数:16,


示例10: johnson_dispatch

 bool johnson_dispatch(VertexAndEdgeListGraph& g,                   DistanceMatrix& D,                  const bgl_named_params<P, T, R>& params,                  Weight w, VertexID id) {   typedef typename property_traits<Weight>::value_type WT;      return johnson_all_pairs_shortest_paths     (g, D, id, w,     choose_param(get_param(params, distance_compare_t()),        std::less<WT>()),     choose_param(get_param(params, distance_combine_t()),        closed_plus<WT>()),     choose_param(get_param(params, distance_inf_t()),        std::numeric_limits<WT>::max BOOST_PREVENT_MACRO_SUBSTITUTION()),      choose_param(get_param(params, distance_zero_t()), WT()) ); }
开发者ID:13W,项目名称:icq-desktop,代码行数:18,


示例11: finish_vertex

      void finish_vertex(const Vertex& u, Graph& g)      {        BOOST_USING_STD_MIN();        Vertex parent = get(pred, u);        bool is_art_point = false;        if ( get(dtm, parent) > get(dtm, u) ) {          parent = get(pred, parent);          is_art_point = true;        }        if ( parent == u ) { // at top          if ( get(dtm, u) + 1 == get(dtm, get(pred, u)) )            is_art_point = false;        } else {          put(lowpt, parent,              min BOOST_PREVENT_MACRO_SUBSTITUTION(get(lowpt, parent),                                                   get(lowpt, u)));          if (get(lowpt, u) >= get(dtm, parent)) {            if ( get(dtm, parent) > get(dtm, get(pred, parent)) ) {              put(pred, u, get(pred, parent));              put(pred, parent, u);            }            while ( get(dtm, source(S.top(), g)) >= get(dtm, u) ) {              put(comp, S.top(), c);              S.pop();            }            put(comp, S.top(), c);              S.pop();            ++c;            if ( S.empty() ) {              put(pred, u, parent);              put(pred, parent, u);            }          }        }        if ( is_art_point )          *out++ = u;      }
开发者ID:Albermg7,项目名称:boost,代码行数:40,


示例12: clique

    inline void    clique (const Clique& c, Graph2& g)    {        if (c.size () >= min_size)        {            BOOST_USING_STD_MAX();            maximum = std::max BOOST_PREVENT_MACRO_SUBSTITUTION (maximum, c.size());            //save clique...            typename Clique::const_iterator i, end = c.end ();            //std::vector<void *> * cc = new std::vector<void *> (c.size ());            std::vector<size_t> * cc = new std::vector<size_t> (c.size ());            cliques.push_back (cc);            size_t p;            for (i = c.begin (); i != end; ++i, ++p)            {                //cc->at (p) = static_cast<void *> (*i);                cc->at (p) = (*i);            }            n_cliques++;        }        else        {            return;        }        // Simply assert that each vertex in the clique is connected        // to all others in the clique.        /*typename Clique::const_iterator i, j, end = c.end();         for(i = c.begin(); i != end; ++i) {         for(j = c.begin(); j != end; ++j) {         if(i != j) {         BOOST_ASSERT(edge(*i, *j, g).second);         }         }         }*/    }
开发者ID:martin-velas,项目名称:v4r,代码行数:39,


示例13: clique

    inline void    clique (const Clique& c, Graph2& g)    {        if (c.size () >= min_size_)        {            BOOST_USING_STD_MAX();            maximum_ = std::max BOOST_PREVENT_MACRO_SUBSTITUTION (maximum_, c.size());            //save clique...            typename Clique::const_iterator i, end = c.end ();            std::vector<size_t> * cc = new std::vector<size_t> (c.size ());            cliques_.push_back (cc);            size_t p;            for (i = c.begin (); i != end; ++i, ++p)                cc->at (p) = (*i);            n_cliques_++;        }        else            return;    }
开发者ID:Cerarus,项目名称:v4r,代码行数:22,


示例14: BOOST_PREVENT_MACRO_SUBSTITUTION

extern "C" double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x){    return c_policies::acosh BOOST_PREVENT_MACRO_SUBSTITUTION(x);}
开发者ID:richard-nellist,项目名称:idl4k,代码行数:4,


示例15: BOOST_PREVENT_MACRO_SUBSTITUTION

extern "C" float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x){    return c_policies::ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(x);}
开发者ID:pombredanne,项目名称:lshkit,代码行数:4,


示例16: BOOST_PREVENT_MACRO_SUBSTITUTION

 result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return std::max BOOST_PREVENT_MACRO_SUBSTITUTION((_rng1.min)(), (_rng2.max)()); }
开发者ID:mdutton3,项目名称:InternedSymbols,代码行数:1,


示例17: BOOST_PREVENT_MACRO_SUBSTITUTION

extern "C" float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu){   return c_policies::ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(k, nu);}
开发者ID:Amano-Ginji,项目名称:lshkit,代码行数:4,


示例18: BOOST_PREVENT_MACRO_SUBSTITUTION

extern "C" long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x){   return c_policies::erf BOOST_PREVENT_MACRO_SUBSTITUTION(x);}
开发者ID:coxlab,项目名称:boost_patched_for_objcplusplus,代码行数:4,


示例19: commit

 // Commit the resize transaction. void commit() {   old_size_     = std::numeric_limits<size_t>::max BOOST_PREVENT_MACRO_SUBSTITUTION(); }
开发者ID:DoBuiThao,项目名称:hoxchess,代码行数:6,


示例20: BOOST_PREVENT_MACRO_SUBSTITUTION

extern "C" long long BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x){    return c_policies::llround BOOST_PREVENT_MACRO_SUBSTITUTION(x);}
开发者ID:richard-nellist,项目名称:idl4k,代码行数:4,


示例21: BOOST_PREVENT_MACRO_SUBSTITUTION

extern "C" long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x){   return c_policies::cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(nu, x);}
开发者ID:coxlab,项目名称:boost_patched_for_objcplusplus,代码行数:4,


示例22: BOOST_PREVENT_MACRO_SUBSTITUTION

extern "C" double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x){   return c_policies::sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(n, x);}
开发者ID:Amano-Ginji,项目名称:lshkit,代码行数:4,


示例23: BOOST_PREVENT_MACRO_SUBSTITUTION

 result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return std::numeric_limits<result_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
开发者ID:Alexander--,项目名称:Wesnoth-1.8-for-Android,代码行数:1,


示例24: get_indices

    slice::range<RandomAccessIterator>    get_indices( const RandomAccessIterator& begin,                 const RandomAccessIterator& end) const    {        // This is based loosely on PySlice_GetIndicesEx(), but it has been        // carefully crafted to ensure that these iterators never fall out of        // the range of the container.        slice::range<RandomAccessIterator> ret;        typedef typename iterator_difference<RandomAccessIterator>::type difference_type;        difference_type max_dist = abt_boost::detail::distance(begin, end);        object slice_start = this->start();        object slice_stop = this->stop();        object slice_step = this->step();        // Extract the step.        if (slice_step == object()) {            ret.step = 1;        }        else {            ret.step = extract<long>( slice_step);            if (ret.step == 0) {                PyErr_SetString( PyExc_IndexError, "step size cannot be zero.");                throw_error_already_set();            }        }        // Setup the start iterator.        if (slice_start == object()) {            if (ret.step < 0) {                ret.start = end;                --ret.start;            }            else                ret.start = begin;        }        else {            difference_type i = extract<long>( slice_start);            if (i >= max_dist && ret.step > 0)                throw std::invalid_argument( "Zero-length slice");            if (i >= 0) {                ret.start = begin;                BOOST_USING_STD_MIN();                std::advance( ret.start, min BOOST_PREVENT_MACRO_SUBSTITUTION(i, max_dist-1));            }            else {                if (i < -max_dist && ret.step < 0)                    throw std::invalid_argument( "Zero-length slice");                ret.start = end;                // Advance start (towards begin) not farther than begin.                std::advance( ret.start, (-i < max_dist) ? i : -max_dist );            }        }        // Set up the stop iterator.  This one is a little trickier since slices        // define a [) range, and we are returning a [] range.        if (slice_stop == object()) {            if (ret.step < 0) {                ret.stop = begin;            }            else {                ret.stop = end;                std::advance( ret.stop, -1);            }        }        else {            difference_type i = extract<long>(slice_stop);            // First, branch on which direction we are going with this.            if (ret.step < 0) {                if (i+1 >= max_dist || i == -1)                    throw std::invalid_argument( "Zero-length slice");                if (i >= 0) {                    ret.stop = begin;                    std::advance( ret.stop, i+1);                }                else { // i is negative, but more negative than -1.                    ret.stop = end;                    std::advance( ret.stop, (-i < max_dist) ? i : -max_dist);                }            }            else { // stepping forward                if (i == 0 || -i >= max_dist)                    throw std::invalid_argument( "Zero-length slice");                if (i > 0) {                    ret.stop = begin;                    std::advance( ret.stop, (std::min)( i-1, max_dist-1));                }                else { // i is negative, but not more negative than -max_dist                    ret.stop = end;                    std::advance( ret.stop, i-1);                }            }        }        // Now the fun part, handling the possibilites surrounding step.        // At this point, step has been initialized, ret.stop, and ret.step        // represent the widest possible range that could be traveled//.........这里部分代码省略.........
开发者ID:jbruestle,项目名称:aggregate_btree,代码行数:101,


示例25: BOOST_PREVENT_MACRO_SUBSTITUTION

extern "C" float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x){    return c_policies::round BOOST_PREVENT_MACRO_SUBSTITUTION(x);}
开发者ID:pombredanne,项目名称:lshkit,代码行数:4,



注:本文中的BOOST_PREVENT_MACRO_SUBSTITUTION函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ BOOST_RANGE_CONCEPT_ASSERT函数代码示例
C++ BOOST_PP_INC函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。