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

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

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

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

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

示例1: BOOST_CONCEPT_ASSERT

std::vector<typename Observator::observable_type> Metropolis<ConfigurationType, Step, RandomNumberGenerator>::do_metropolis_simulation(const TemperatureType& beta){  // Check the concept of the observator  BOOST_CONCEPT_ASSERT((Concepts::ObservatorConcept<Observator,ConfigurationType>));  // Check the concept of the observable  BOOST_CONCEPT_ASSERT((Concepts::ObservableConcept<typename Observator::observable_type>));  // Call the accumulator function using the VectorAccumulator  Details::Metropolis::VectorAccumulator<typename Observator::observable_type> measurements_accumulator;  do_metropolis_simulation<Observator>(beta, measurements_accumulator);  // Return the plain data  return measurements_accumulator.internal_vector;}
开发者ID:SpeckFleck,项目名称:mocasinns,代码行数:14,


示例2: add_edge_aggregator

 bool add_edge_aggregator(const std::string& key,                          EdgeMapType map_function,                          FinalizerType finalize_function) {   BOOST_CONCEPT_ASSERT((graphlab::Serializable<ReductionType>));   BOOST_CONCEPT_ASSERT((graphlab::OpPlusEq<ReductionType>));   aggregator_type* aggregator = get_aggregator();   if(aggregator == NULL) {     logstream(LOG_FATAL) << "Aggregation not supported by this engine!"                          << std::endl;     return false; // does not return   }   return aggregator->template add_edge_aggregator<ReductionType>     (key, map_function, finalize_function); } // end of add edge aggregator
开发者ID:Bhushan1002,项目名称:SFrame,代码行数:14,


示例3: evaluate

typename range_value_type<CVsRange>::typeevaluate( std::size_t degree,          const CVsRange& cvs,          const KnotsRange& knots,          typename range_value_type<KnotsRange>::type u){    BOOST_CONCEPT_ASSERT(( boost::RandomAccessRangeConcept<CVsRange>));    BOOST_CONCEPT_ASSERT(( boost::RandomAccessRangeConcept<KnotsRange>));    std::size_t span = find_span( degree, boost::size( cvs), knots, u);    boost::array<typename range_value_type<KnotsRange>::type, NURBS_MAX_BASIS_DEGREE> N;    basis_functions( degree, u, span, knots, N.begin());    return evaluate( degree, cvs, N, span, u);}
开发者ID:elanifegnirf,项目名称:ramenlibs,代码行数:15,


示例4: all_degree_centralities

inline voidall_degree_centralities(const Graph& g, CentralityMap cent, Measure measure){    BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));    typedef typename graph_traits<Graph>::vertex_descriptor Vertex;    typedef typename graph_traits<Graph>::vertex_iterator VertexIterator;    BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<CentralityMap,Vertex> ));    typedef typename property_traits<CentralityMap>::value_type Centrality;    VertexIterator i, end;    for(boost::tie(i, end) = vertices(g); i != end; ++i) {        Centrality c = degree_centrality(g, *i, measure);        put(cent, *i, c);    }}
开发者ID:AbhinavJain13,项目名称:turicreate,代码行数:15,


示例5: check_nsphere

void check_nsphere(S& to_check, RT radius, CT center_x, CT center_y, CT center_z){    BOOST_CONCEPT_ASSERT( (bg::concept::ConstNsphere<S>) );    BOOST_CONCEPT_ASSERT( (bg::concept::Nsphere<S>) );    BOOST_CHECK_EQUAL(bg::get_radius<0>(to_check), radius);    BOOST_CHECK_EQUAL(bg::get<0>(to_check), center_x);    BOOST_CHECK_EQUAL(bg::get<1>(to_check), center_y);    if (bg::dimension<S>::value >= 3)    {        BOOST_CHECK_EQUAL(bg::get<2>(to_check), center_z);    }}
开发者ID:manctl,项目名称:boost,代码行数:15,


示例6: run_d_ary_heap_test

void run_d_ary_heap_test(void){    typedef boost::heap::d_ary_heap<int, boost::heap::arity<D>,                                         boost::heap::stable<stable>,                                         boost::heap::compare<std::less<int> >,                                         boost::heap::allocator<std::allocator<int> > > pri_queue;    BOOST_CONCEPT_ASSERT((boost::heap::PriorityQueue<pri_queue>));    run_concept_check<pri_queue>();    run_common_heap_tests<pri_queue>();    run_iterator_heap_tests<pri_queue>();    run_copyable_heap_tests<pri_queue>();    run_moveable_heap_tests<pri_queue>();    run_reserve_heap_tests<pri_queue>();    run_merge_tests<pri_queue>();    run_ordered_iterator_tests<pri_queue>();    if (stable) {        typedef boost::heap::d_ary_heap<q_tester, boost::heap::arity<D>,                                                  boost::heap::stable<stable>                                       > stable_pri_queue;        run_stable_heap_tests<stable_pri_queue>();    }#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)    cmpthings ord;    boost::heap::d_ary_heap<thing, boost::heap::arity<D>, boost::heap::compare<cmpthings>, boost::heap::stable<stable> > vpq(ord);    vpq.emplace(5, 6, 7);#endif}
开发者ID:MillenniumBlood,项目名称:Boost.1.54.0,代码行数:33,


示例7: point_angle_compare

 point_angle_compare( const Point& origin, const NumberComparisonPolicy& cmp = NumberComparisonPolicy() )     : m_origin( origin )     , m_reference( 1., 0. )     , m_cmp(cmp) {     BOOST_CONCEPT_ASSERT((Point2DConcept<Point>)); }
开发者ID:brandon-kohn,项目名称:geometrix,代码行数:7,


示例8: possible_edges

 inline typename graph_traits<Graph>::degree_size_type possible_edges(const Graph& g, std::size_t k, directed_tag) {     BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> ));     typedef typename graph_traits<Graph>::degree_size_type T;     return T(k) * (T(k) - 1); }
开发者ID:00liujj,项目名称:dealii,代码行数:7,


示例9: mean_clustering_coefficient

inline typename property_traits<ClusteringMap>::value_typemean_clustering_coefficient(const Graph& g, ClusteringMap cm){    BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));    typedef typename graph_traits<Graph>::vertex_descriptor Vertex;    typedef typename graph_traits<Graph>::vertex_iterator VertexIterator;    BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<ClusteringMap,Vertex> ));    typedef typename property_traits<ClusteringMap>::value_type Coefficient;    Coefficient cc(0);    VertexIterator i, end;    for(boost::tie(i, end) = vertices(g); i != end; ++i) {        cc += get(cm, *i);    }    return cc / Coefficient(num_vertices(g));}
开发者ID:00liujj,项目名称:dealii,代码行数:16,


示例10: spectral_to_xyz

color3_t<typename range::value_type<ConstRandomAccessRange>::type, xyz_t>spectral_to_xyz( const CieXYZCurves& cie_xyz_curves,                 T min_wavelength, T max_wavelenght,                 const ConstRandomAccessRange& values){    BOOST_CONCEPT_ASSERT(( CieXYZFit<CieXYZCurves>));    typedef typename boost::range_iterator<const ConstRandomAccessRange>::type iterator_type;    typedef typename range::value_type<ConstRandomAccessRange>::type real_type;    std::size_t num_samples = boost::size( values);    real_type w = min_wavelength;    real_type w_step = max_wavelenght - min_wavelength / static_cast<real_type>( num_samples);    color3_t<real_type, xyz_t> result( 0);    for( iterator_type it( boost::begin( values)), e( boost::end( values)); it != e; ++it)    {        iterator_type next( it + 1);        if( next != e)        {            real_type avg(( *it + *next) * real_type( 0.5));            result.x += cie_xyz_curves.X( w) * avg;            result.y += cie_xyz_curves.Y( w) * avg;            result.z += cie_xyz_curves.Z( w) * avg;        }        w += w_step;    }    return result;}
开发者ID:elanifegnirf,项目名称:ramenlibs,代码行数:33,


示例11: run_d_ary_heap_mutable_test

void run_d_ary_heap_mutable_test(void){    typedef boost::heap::d_ary_heap<int, boost::heap::mutable_<true>,                                            boost::heap::arity<D>,                                            boost::heap::stable<stable>                                           > pri_queue;    BOOST_CONCEPT_ASSERT((boost::heap::MutablePriorityQueue<pri_queue>));    run_common_heap_tests<pri_queue>();    run_moveable_heap_tests<pri_queue>();    run_reserve_heap_tests<pri_queue>();    run_mutable_heap_tests<pri_queue>();    run_merge_tests<pri_queue>();    run_ordered_iterator_tests<pri_queue>();    if (stable) {        typedef boost::heap::d_ary_heap<q_tester, boost::heap::mutable_<true>,                                                boost::heap::arity<D>,                                                boost::heap::stable<stable>                                               > stable_pri_queue;        run_stable_heap_tests<stable_pri_queue>();    }}
开发者ID:cpascal,项目名称:af-cpp,代码行数:26,


示例12: constraints

 void constraints() {     BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> ));     vis.examine_vertex(u,g);     vis.finish_vertex(u,g);     vis.examine_edge(e,g); }
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:7,


示例13: apply

        static void apply(ApplyMethod)        {            typedef typename parameter_type_of                <                    ApplyMethod, 0                >::type ptype;            typedef typename parameter_type_of                <                    ApplyMethod, 1                >::type sptype;            // 1) must define meta-function return_type            typedef typename strategy::distance::services::return_type<Strategy, ptype, sptype>::type rtype;            // 2) must define underlying point-distance-strategy            typedef typename strategy::distance::services::strategy_point_point<Strategy>::type stype;            BOOST_CONCEPT_ASSERT                (                    (concept::PointDistanceStrategy<stype, Point, PointOfSegment>)                );            Strategy *str = 0;            ptype *p = 0;            sptype *sp1 = 0;            sptype *sp2 = 0;            rtype r = str->apply(*p, *sp1, *sp2);            boost::ignore_unused_variable_warning(str);            boost::ignore_unused_variable_warning(r);        }
开发者ID:7modelsan,项目名称:kbengine,代码行数:33,


示例14: depth_first_search

  void  depth_first_search(const VertexListGraph& g, DFSVisitor vis, ColorMap color,                     typename graph_traits<VertexListGraph>::vertex_descriptor start_vertex)  {    typedef typename graph_traits<VertexListGraph>::vertex_descriptor Vertex;    BOOST_CONCEPT_ASSERT(( DFSVisitorConcept<DFSVisitor, VertexListGraph> ));    typedef typename property_traits<ColorMap>::value_type ColorValue;    typedef color_traits<ColorValue> Color;    typename graph_traits<VertexListGraph>::vertex_iterator ui, ui_end;    for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {      Vertex u = implicit_cast<Vertex>(*ui);      put(color, u, Color::white()); vis.initialize_vertex(u, g);    }    if (start_vertex != implicit_cast<Vertex>(*vertices(g).first)){ vis.start_vertex(start_vertex, g);      detail::depth_first_visit_impl(g, start_vertex, vis, color,                                     detail::nontruth2());    }    for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {      Vertex u = implicit_cast<Vertex>(*ui);      ColorValue u_color = get(color, u);      if (u_color == Color::white()) {       vis.start_vertex(u, g);        detail::depth_first_visit_impl(g, u, vis, color, detail::nontruth2());      }    }  }
开发者ID:Bia10,项目名称:clrn,代码行数:28,


示例15: run_d_ary_heap_test

void run_d_ary_heap_test(void){    typedef boost::heap::d_ary_heap<int, boost::heap::arity<D>,                                         boost::heap::stable<stable>,                                         boost::heap::compare<std::less<int> >,                                         boost::heap::allocator<std::allocator<int> > > pri_queue;    BOOST_CONCEPT_ASSERT((boost::heap::PriorityQueue<pri_queue>));    run_concept_check<pri_queue>();    run_common_heap_tests<pri_queue>();    run_iterator_heap_tests<pri_queue>();    run_copyable_heap_tests<pri_queue>();    run_moveable_heap_tests<pri_queue>();    run_reserve_heap_tests<pri_queue>();    run_merge_tests<pri_queue>();    run_ordered_iterator_tests<pri_queue>();    if (stable) {        typedef boost::heap::d_ary_heap<q_tester, boost::heap::arity<D>,                                                  boost::heap::stable<stable>                                       > stable_pri_queue;        run_stable_heap_tests<stable_pri_queue>();    }}
开发者ID:cpascal,项目名称:af-cpp,代码行数:27,


示例16: BOOST_AUTO_TEST_CASE_TEMPLATE

BOOST_AUTO_TEST_CASE_TEMPLATE(Iterator, T, InMemoryStorages){  T ims;  BOOST_CONCEPT_ASSERT((boost::InputIterator<InMemoryStorage::const_iterator>));  for (int i = 0; i < 10; i++) {    std::ostringstream convert;    convert << i;    Name name("/" + convert.str());    shared_ptr<Data> data = makeData(name);    ims.insert(*data);  }  InMemoryStorage::const_iterator it = ims.begin();  InMemoryStorage::const_iterator tmp1 = it;  BOOST_REQUIRE(tmp1 == it);  InMemoryStorage::const_iterator tmp2 = tmp1++;  BOOST_REQUIRE(tmp2 != tmp1);  tmp2 = ++tmp1;  BOOST_REQUIRE(tmp2 == tmp1);  int i = 0;  for (;it != ims.end(); it++) {    std::ostringstream convert;    convert << i;    Name name("/" + convert.str());    BOOST_CHECK_EQUAL(it->getName(), name);    BOOST_CHECK_EQUAL((*it).getName(), name);    i++;  }}
开发者ID:named-data-ndnSIM,项目名称:ndn-cxx,代码行数:32,


示例17: BOOST_GRAPH_ENABLE_IF_MODELS_PARM

inline voidwrite_graphviz(std::ostream& out, const Graph& g, VertexPropertiesWriter vpw, EdgePropertiesWriter epw, GraphPropertiesWriter gpw, VertexID vertex_id BOOST_GRAPH_ENABLE_IF_MODELS_PARM(Graph,vertex_list_graph_tag)){    BOOST_CONCEPT_ASSERT((EdgeListGraphConcept<Graph>));    typedef typename graph_traits<Graph>::directed_category cat_type;    typedef graphviz_io_traits<cat_type> Traits;    std::string name = "G";    out << Traits::name() << " " << name << " {" << std::endl;    gpw(out); //print graph properties    typename graph_traits<Graph>::vertex_iterator i, end;    for(tie(i,end) = vertices(g); i != end; ++i) {        out << get(vertex_id, *i);        vpw(out, *i); //print vertex attributes        out << ";" << std::endl;    }    typename graph_traits<Graph>::edge_iterator ei, edge_end;    for(tie(ei, edge_end) = edges(g); ei != edge_end; ++ei) {        out << get(vertex_id, source(*ei, g)) << Traits::delimiter() << get(vertex_id, target(*ei, g)) << " ";        epw(out, *ei); //print edge attributes        out << ";" << std::endl;    }    out << "}" << std::endl;}
开发者ID:bacchante95,项目名称:fritzing,代码行数:33,


示例18: test_all_2d

void test_all_2d(){    P1 p;    P2 sp1, sp2;    bg::read_wkt("POINT(1 1)", p);    bg::read_wkt("POINT(0 0)", sp1);    bg::read_wkt("POINT(2 3)", sp2);    typedef typename bg::strategy::distance::projected_point        <            P1,            P2        > strategy_type;    BOOST_CONCEPT_ASSERT        (            (bg::concept::PointSegmentDistanceStrategy<strategy_type>)        );    strategy_type strategy;    typedef typename bg::strategy::distance::services::return_type<strategy_type>::type return_type;    return_type d = strategy.apply(p, sp1, sp2);    BOOST_CHECK_CLOSE(d, return_type(0.27735203958327), 0.001);}
开发者ID:ArkanaLord,项目名称:libboost,代码行数:25,


示例19: test_distance

void test_distance(double lon1, double lat1, double lon2, double lat2, double expected_km){    // Set radius type, but for integer coordinates we want to have floating point radius type    typedef typename bg::promote_floating_point        <            typename bg::coordinate_type<P1>::type        >::type rtype;    typedef bg::srs::spheroid<rtype> stype;    typedef bg::strategy::distance::thomas<stype> thomas_type;    BOOST_CONCEPT_ASSERT        (             (bg::concepts::PointDistanceStrategy<thomas_type, P1, P2>)        );    thomas_type thomas;    typedef typename bg::strategy::distance        ::services::return_type<thomas_type, P1, P2>::type return_type;    P1 p1;    P2 p2;    bg::assign_values(p1, lon1, lat1);    bg::assign_values(p2, lon2, lat2);    BOOST_CHECK_CLOSE(thomas.apply(p1, p2), return_type(1000.0 * expected_km), 0.001);    BOOST_CHECK_CLOSE(bg::distance(p1, p2, thomas), return_type(1000.0 * expected_km), 0.001);}
开发者ID:alexeykuzmin0,项目名称:ThePlatform,代码行数:31,


示例20: heap_merge

void heap_merge(Heap1 & lhs, Heap2 & rhs){    BOOST_CONCEPT_ASSERT((boost::heap::PriorityQueue<Heap1>));    BOOST_CONCEPT_ASSERT((boost::heap::PriorityQueue<Heap2>));    // if this assertion is triggered, the value_compare types are incompatible    BOOST_STATIC_ASSERT((boost::is_same<typename Heap1::value_compare, typename Heap2::value_compare>::value));    const bool same_heaps = boost::is_same<Heap1, Heap2>::value;    typedef typename boost::mpl::if_c<same_heaps,                                      detail::heap_merge_same<Heap1>,                                      detail::heap_merge_emulate<Heap1, Heap2>                                     >::type heap_merger;    heap_merger::merge(lhs, rhs);}
开发者ID:13W,项目名称:icq-desktop,代码行数:17,


示例21: test_geometry

void test_geometry(G const& geometry, int expected_size = 0){#if defined(BOOST_GEOMETRY_TEST_RING)    BOOST_CONCEPT_ASSERT( (boost::geometry::concept::ConstRing<G>) );#elif defined(BOOST_GEOMETRY_TEST_MULTI_POINT)    BOOST_CONCEPT_ASSERT( (boost::geometry::concept::ConstMultiPoint<G>) );#else    BOOST_CONCEPT_ASSERT( (boost::geometry::concept::ConstLinestring<G>) );#endif    typedef typename boost::geometry::point_type<G>::type P;    typedef typename boost::geometry::coordinate_type<P>::type C;    // Check range-like behaviour    BOOST_CHECK_EQUAL(boost::size(geometry), expected_size);}
开发者ID:nurF,项目名称:Brute-Force-Game-Engine,代码行数:17,


示例22: simplify_insert

inline void simplify_insert(Geometry const& geometry, OutputIterator out,                              Distance const& max_distance, Strategy const& strategy){    concept::check<Geometry const>();    BOOST_CONCEPT_ASSERT( (geometry::concept::SimplifyStrategy<Strategy>) );    dispatch::simplify_insert<Geometry>::apply(geometry, out, max_distance, strategy);}
开发者ID:PAV38,项目名称:PDAL,代码行数:8,


示例23: constraints

 void constraints() {   BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> ));   vis.examine_edge(e, g);   vis.edge_relaxed(e, g);   vis.edge_not_relaxed(e, g);   vis.edge_minimized(e, g);   vis.edge_not_minimized(e, g); }
开发者ID:13W,项目名称:icq-desktop,代码行数:8,


示例24: get_cell

        data_type& get_cell(const Point& point)        {			BOOST_CONCEPT_ASSERT(( Point2DConcept<Point> ));			GEOMETRIX_ASSERT( is_contained( point ) );            boost::uint32_t i = m_gridTraits.get_x_index(get<0>(point));            boost::uint32_t j = m_gridTraits.get_y_index(get<1>(point));            return get_cell(i,j);        }
开发者ID:brandon-kohn,项目名称:geometrix,代码行数:8,


示例25: invariant_kalman_update

typename boost::enable_if_c< is_continuous_belief_state<BeliefState>::value &&                             (belief_state_traits<BeliefState>::representation == belief_representation::gaussian) &&                             (belief_state_traits<BeliefState>::distribution == belief_distribution::unimodal),void >::type invariant_kalman_update(const InvariantSystem& sys,				     const StateSpaceType& state_space,				     BeliefState& b_x,				     const InputBelief& b_u,				     const MeasurementBelief& b_z,				     typename discrete_sss_traits<InvariantSystem>::time_type t = 0) {  //here the requirement is that the system models a linear system which is at worse a linearized system  // - if the system is LTI or LTV, then this will result in a basic Kalman Filter (KF) update  // - if the system is linearized, then this will result in an Extended Kalman Filter (EKF) update  BOOST_CONCEPT_ASSERT((pp::TopologyConcept< StateSpaceType >));  BOOST_CONCEPT_ASSERT((InvariantDiscreteSystemConcept<InvariantSystem, StateSpaceType>));  BOOST_CONCEPT_ASSERT((ContinuousBeliefStateConcept<BeliefState>));  BOOST_CONCEPT_ASSERT((ContinuousBeliefStateConcept<InputBelief>));  BOOST_CONCEPT_ASSERT((ContinuousBeliefStateConcept<MeasurementBelief>));  typedef typename discrete_sss_traits<InvariantSystem>::point_type StateType;  typedef typename discrete_sss_traits<InvariantSystem>::output_type OutputType;  typedef typename continuous_belief_state_traits<BeliefState>::covariance_type CovType;  typedef typename covariance_mat_traits< CovType >::matrix_type MatType;  typedef typename mat_traits<MatType>::value_type ValueType;  typedef typename invariant_system_traits<InvariantSystem>::invariant_frame_type InvarFrame;  typedef typename invariant_system_traits<InvariantSystem>::invariant_error_type InvarErr;  typedef typename invariant_system_traits<InvariantSystem>::invariant_correction_type InvarCorr;    typename discrete_linear_sss_traits<InvariantSystem>::matrixC_type C;  typename discrete_linear_sss_traits<InvariantSystem>::matrixD_type D;    StateType x = b_x.get_mean_state();  MatType P = b_x.get_covariance().get_matrix();  sys.get_output_function_blocks(C, D, state_space, t, x, b_u.get_mean_state());    vect_n<ValueType> e =     to_vect<ValueType>(sys.get_invariant_error(state_space, x, b_u.get_mean_state(), b_z.get_mean_state(), t + sys.get_time_step()));    mat< ValueType, mat_structure::rectangular, mat_alignment::column_major > CP = C * P;  mat< ValueType, mat_structure::symmetric > S(CP * transpose_view(C) + b_z.get_covariance().get_matrix());  linsolve_Cholesky(S,CP);  mat< ValueType, mat_structure::rectangular, mat_alignment::row_major > K(transpose_view(CP));     b_x.set_mean_state( sys.apply_correction(state_space, x, from_vect<InvarCorr>(K * e), b_u.get_mean_state(), t + sys.get_time_step()) );  InvarFrame W = sys.get_invariant_posterior_frame(state_space, x, b_x.get_mean_state(), b_u.get_mean_state(), t + sys.get_time_step());  b_x.set_covariance( CovType( MatType( W * ((mat< ValueType, mat_structure::identity>(K.get_row_count()) - K * C) * P) * transpose_view(W) ) ) );};
开发者ID:ahmadyan,项目名称:ReaK,代码行数:46,


示例26: apply

    static inline calculation_type apply(Point1 const& p1, Point2 const& p2)    {        BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point1>) );        BOOST_CONCEPT_ASSERT( (concept::ConstPoint<Point2>) );        // Calculate distance using Pythagoras        // (Leave comment above for Doxygen)        assert_dimension_equal<Point1, Point2>();        return detail::compute_pythagoras            <                Point1, Point2,                dimension<Point1>::value,                calculation_type            >::apply(p1, p2);    }
开发者ID:0xDEC0DE8,项目名称:mcsema,代码行数:17,


示例27: check_transforms

// this checks whether the requirements of TransformConcept are satisfied for all transforms.// if you add a new transform type, include it here!void check_transforms(){#ifdef BOOST_CONCEPT_ASSERT    BOOST_CONCEPT_ASSERT((TransformConcept<Translate>));    BOOST_CONCEPT_ASSERT((TransformConcept<Scale>));    BOOST_CONCEPT_ASSERT((TransformConcept<Rotate>));    BOOST_CONCEPT_ASSERT((TransformConcept<HShear>));    BOOST_CONCEPT_ASSERT((TransformConcept<VShear>));    BOOST_CONCEPT_ASSERT((TransformConcept<Zoom>));    BOOST_CONCEPT_ASSERT((TransformConcept<Affine>)); // Affine is also a transform#endif    // check inter-transform multiplication    Affine m;    Translate t(Translate::identity());    Scale s(Scale::identity());    Rotate r(Rotate::identity());    HShear h(HShear::identity());    VShear v(VShear::identity());    Zoom z(Zoom::identity());    // notice that the first column is always the same and enumerates all transform types,    // while the second one changes to each transform type in turn.    m = t * t; m = t * s; m = t * r; m = t * h; m = t * v; m = t * z;    m = s * t; m = s * s; m = s * r; m = s * h; m = s * v; m = s * z;    m = r * t; m = r * s; m = r * r; m = r * h; m = r * v; m = r * z;    m = h * t; m = h * s; m = h * r; m = h * h; m = h * v; m = h * z;    m = v * t; m = v * s; m = v * r; m = v * h; m = v * v; m = v * z;    m = z * t; m = z * s; m = z * r; m = z * h; m = z * v; m = z * z;}
开发者ID:Spin0za,项目名称:inkscape,代码行数:32,


示例28: operator

    inline return_type operator()(P1 const& p1, P2 const& p2) const    {        BOOST_CONCEPT_ASSERT( (concept::ConstPoint<P1>) );        BOOST_CONCEPT_ASSERT( (concept::ConstPoint<P2>) );        // Calculate distance using Pythagoras        // (Leave comment above for Doxygen)        assert_dimension_equal<P1, P2>();        return return_type(detail::compute_pythagoras            <                P1, P2,                dimension<P1>::value,                calculation_type            >::apply(p1, p2));    }
开发者ID:4x4falcon,项目名称:fosm-merkaartor,代码行数:18,



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


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