• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ BOOST_PREVENT_MACRO_SUBSTITUTION函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了BOOST_PREVENT_MACRO_SUBSTITUTION函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,代码来源:write_svg.hpp


示例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,代码来源:wavefront.hpp


示例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,代码来源:sequential_vertex_coloring.hpp


示例4: norm

template<class T, class Policies> inline
T 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,代码来源:utility.hpp


示例5: abs

template<class T, class Policies> inline
interval<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,代码来源:utility.hpp


示例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,代码来源:biconnected_components.hpp


示例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,代码来源:eccentricity.hpp


示例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,代码来源:format_implementation.hpp


示例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,代码来源:floyd_warshall_shortest.hpp


示例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,代码来源:johnson_all_pairs_shortest.hpp


示例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,代码来源:biconnected_components.hpp


示例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,代码来源:graph_geometric_consistency.hpp


示例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,代码来源:graph_geometric_consistency.hpp


示例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,代码来源:acosh.cpp


示例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,代码来源:comp_ellint_1f.cpp


示例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,代码来源:xor_combine.hpp


示例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,代码来源:comp_ellint_3f.cpp


示例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,代码来源:erfl.cpp


示例19: commit

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


示例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,代码来源:llround.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ BOOST_RANGE_CONCEPT_ASSERT函数代码示例发布时间:2022-05-30
下一篇:
C++ BOOST_PP_INC函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap