网站建设内容论文做网站的基本条件

news/2025/9/25 1:52:22/文章来源:
网站建设内容论文,做网站的基本条件,建立网站报价,公司注册网上核名一直提交不成功boost::graph API简单小结 boost::graph是boost为图算法提供的API#xff0c;简单易用。 API说明 boost::add_vertex 创建一个顶点。 boost::add_edge 创建一条边。 boost::edges 获取所有的边。 boost::vertices 获取所有的顶点。 graph.operator[vertex_descriptor] 获…boost::graph API简单小结 boost::graph是boost为图算法提供的API简单易用。 API说明 boost::add_vertex 创建一个顶点。 boost::add_edge 创建一条边。 boost::edges 获取所有的边。 boost::vertices 获取所有的顶点。 graph.operator[vertex_descriptor] 获取顶点的属性Property。 graph.operator[edge_descriptor] 获取边的属性Property。 boost::out_edges 获取顶点的“出边”out edges即以当前顶点为出发点的边。 参考文档 https://theboostcpplibraries.com/boost.graph-algorithms https://zhuanlan.zhihu.com/p/338279100 https://www.boost.org/doc/libs/1_83_0/libs/graph/doc/quick_tour.html https://www.boost.org/doc/libs/1_83_0/libs/graph/doc/adjacency_list.html https://www.technical-recipes.com/2015/getting-started-with-the-boost-graph-library/ https://blog.csdn.net/Augusdi/article/details/105757441 代码示例 #include PSParametricModelingEngine.h#include QDebug #include algorithm #include iostream #include iterator #include utilityusing namespace std; using namespace boost;namespace {struct VertexProperty{int id;string name;};struct EdgeProperty{int id;int weight;};typedef boost::adjacency_listvecS, // 使用数组来存储vertex vecS,vecS, // 使用数组来存储vertex vecS,directedS, // 申明为有向图可以访问其out-edge,若要都能访问VertexProperty, // 定义顶点属性EdgeProperty // 定义边的属性PSGraph;typedef graph_traitsPSGraph::vertex_descriptor vertex_descriptor_t;void printVertices(){boost::adjacency_list g;boost::adjacency_list::vertex_descriptor v1 boost::add_vertex(g);boost::adjacency_list::vertex_descriptor v2 boost::add_vertex(g);boost::adjacency_list::vertex_descriptor v3 boost::add_vertex(g);boost::adjacency_list::vertex_descriptor v4 boost::add_vertex(g);std::cout v1 , v2 , v3 , v4 \n;}void printEdgeVector(){boost::adjacency_list g;boost::adjacency_list::vertex_descriptor v1 boost::add_vertex(g);boost::adjacency_list::vertex_descriptor v2 boost::add_vertex(g);boost::add_vertex(g);boost::add_vertex(g);std::pairboost::adjacency_list::edge_descriptor, bool p boost::add_edge(v1, v2, g);std::cout.setf(std::ios::boolalpha);std::cout p.second \n;p boost::add_edge(v1, v2, g);std::cout p.second \n;p boost::add_edge(v2, v1, g);std::cout p.second \n;std::pairboost::adjacency_list::edge_iterator, boost::adjacency_list::edge_iterator es boost::edges(g);std::copy(es.first, es.second, std::ostream_iteratorboost::adjacency_list::edge_descriptor{std::cout, \n});for (boost::adjacency_list::edge_iterator iterator es.first; iterator ! es.second; iterator){std::stringstream ss;ss (*iterator);qDebug() QString::fromUtf8(ss.str().c_str());}}void printEdgeSet(){typedef boost::adjacency_listboost::setS, boost::vecS, boost::undirectedS graph;graph g;boost::adjacency_list::vertex_descriptor v1 boost::add_vertex(g);boost::adjacency_list::vertex_descriptor v2 boost::add_vertex(g);boost::add_vertex(g);boost::add_vertex(g);std::pairgraph::edge_descriptor, bool p boost::add_edge(v1, v2, g);std::cout.setf(std::ios::boolalpha);std::cout p.second \n;p boost::add_edge(v1, v2, g);std::cout p.second \n;p boost::add_edge(v2, v1, g);std::cout p.second \n;std::pairgraph::edge_iterator, graph::edge_iterator es boost::edges(g);std::copy(es.first, es.second, std::ostream_iteratorgraph::edge_descriptor{std::cout, \n});for (graph::edge_iterator iterator es.first; iterator ! es.second; iterator){std::stringstream ss;ss (*iterator);qDebug() QString::fromUtf8(ss.str().c_str());}}int printDirectedGraph(){// 定义图类型使用vector存放顶点和边有向图typedef adjacency_listvecS, vecS, directedS graph_t;// 产生图对象有6个顶点graph_t g(6);// 加入边add_edge(1, 2, g);add_edge(1, 5, g);add_edge(2, 2, g);add_edge(2, 0, g);add_edge(3, 4, g);add_edge(4, 3, g);add_edge(5, 0, g);// 显示所有的顶点// 顶点迭代器类型typedef graph_traitsgraph_t::vertex_iterator vertex_iter;// 得到所有顶点vrange中的一对迭代器分别指向第一个顶点和最后的一个顶点之后。std::pairvertex_iter, vertex_iter vrange vertices(g);for (vertex_iter itr vrange.first; itr ! vrange.second; itr)qDebug() *itr;// 显示所有的边// 边迭代器类型typedef graph_traitsgraph_t::edge_iterator edge_iter;// 得到所有边erange中的一对迭代器分别指向第一条边和最后的一条边之后std::pairedge_iter, edge_iter erange edges(g);for (edge_iter itr erange.first; itr ! erange.second; itr)qDebug() source(*itr, g) -- target(*itr, g);return 0;};void printPSGraph(){PSGraph g; // 声明一个图VertexProperty vertex1{101, Vertex 1};VertexProperty vertex2{102, Vertex 2};VertexProperty vertex3{103, Vertex 3};VertexProperty vertex4{104, Vertex 4};EdgeProperty edge1{101, 1};EdgeProperty edge2{102, 2};EdgeProperty edge3{103, 3};EdgeProperty edge4{104, 4};EdgeProperty edge5{105, 5};EdgeProperty edge6{106, 6};vertex_descriptor_t vert1 boost::add_vertex(vertex1, g);vertex_descriptor_t vert2 boost::add_vertex(vertex2, g);vertex_descriptor_t vert3 boost::add_vertex(vertex3, g);vertex_descriptor_t vert4 boost::add_vertex(vertex4, g);auto e1 boost::add_edge(vert1, vert2, edge1, g);auto e2 boost::add_edge(vert2, vert3, edge2, g);auto e3 boost::add_edge(vert3, vert4, edge3, g);auto e4 boost::add_edge(vert4, vert1, edge4, g);auto e5 boost::add_edge(vert4, vert2, edge5, g);auto e6 boost::add_edge(vert4, vert3, edge6, g);typedef graph_traitsPSGraph::vertex_iterator vertex_iter;std::pairvertex_iter, vertex_iter vrange vertices(g);for (vertex_iter itr vrange.first; itr ! vrange.second; itr){auto prop g[*itr];qDebug() *itr : { prop.id , QString::fromUtf8(prop.name.c_str()) };typedef graph_traitsPSGraph GraphTraits;typename GraphTraits::out_edge_iterator out_i, out_end;typename GraphTraits::edge_descriptor e;for (boost::tie(out_i, out_end) out_edges(*itr, g); out_i ! out_end; out_i){e *out_i;auto prop g[e];qDebug() source(e, g) -- target(e, g) : { prop.id , prop.weight };}}typedef graph_traitsPSGraph::edge_iterator edge_iter;std::pairedge_iter, edge_iter erange edges(g);for (edge_iter itr erange.first; itr ! erange.second; itr){auto prop g[*itr];qDebug() source(*itr, g) -- target(*itr, g) : { prop.id , prop.weight };}} } // namespacevoid main() {// printEdgeSet();// printDirectedGraph();printPSGraph(); }

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/916484.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

外贸中间体做哪个网站好做网站图片用什么格式最好

文章目录1.MySQL服务的启动和停止2.MySQL服务的登录和退出3.MySQL的常见命令3.MySQL的语法规范4.SQL的语言分类1.MySQL服务的启动和停止 方式一:计算机——右击管理——服务 方式二:通过管理员身份运行 net start 服务名(启动服务&#xff0…

wordpress文章统计seo搜索引擎优化网站

博主个人微信小程序已经上线:【中二少年工具箱】。欢迎搜索试用 正文开始 专栏简介1. 总览2. node_modules3.public4.src5.assets6.components7.router8.stores9.views10.App.vue11.main.js12.index.html 专栏简介 本系列文章由浅入深,从基础知识到实战…

平湖手机网站建设怎样做分类网站

1.一【1】1、一般现在时(do); 2、一般过去时(did); 3、一般将来时( will do)(be going to do); 4、一般过去将来时( would do); 5、现在进行时( be doing); 6、过去进行时(was/were doing); 7、将来进行时( will be doing); 8、过去将来进行时( would be doing)(was/were going…

男人和女人做羞羞的免费网站广州网络营销选择

表现层就是看到的东西,比如你现在看到的当前页面控制层就将你的请求从页面传到后台代码逻辑层就是处理你的请求的代码DAO层就是将数据存到数据库中的代码数据库就是数据库了,存东西用的,DAO层就是将访问数据库的代码,数据库层是数…

惠州网站制作询问薇北京建网站的

正题 题目链接:https://www.luogu.com.cn/problem/P4302 题目大意 一个字符串,对于一个字符串AAA。可以将连续的nnn个AAA缩成n(A)n(A)n(A)。求最短的长度能够表述出给定字符串 解题思路 定义fi,jf_{i,j}fi,j​表示表示出i∼ji\sim ji∼j的字符串的最短方法。那么…

[智能驾驶/智能汽车] 《SAE J3016-202104:驾驶自动化分级》[转]

0 序言本标准的地位:实质上的智能驾驶(驾驶自动化)的国际标准。中国标准《GB/T 40429-2021 汽车驾驶自动化分级》——也是围绕此标准为核心进行制订。2021年5月3日,SAE International与国际标准化组织(ISO)共同宣…

[汽车] 智能网联汽车-智能驾驶-综述

概述:智能驾驶 / 自动驾驶 / 高级辅助驾驶(ADAS)汽车行业处在一个变革的时代,自动驾驶相关技术发展应用如火如荼。关注或者想了解这个领域的人也越来越多。本文的目标在于帮助自己、大家,对自动驾驶技术有一个全局的…

【stm32-FOC】初步认识 CMSIS-DSP

目录导入CMSIS-DSP库 使用CMSIS-DSP 点击查看本文开源的完整FOC工程https://gitee.com/best_pureer/stm32_focCMSIS-DSP库是ARM开源的、对ARM处理器优化的数学库,官方对其的介绍是一个针对Cortex-M和Cortex-A内核优化…

网站建设 淘宝客末班做导购网站如何获利

文章目录 单次调用进程池调用伪造和断言断言和判断的区别 前面我已经简单介绍了一点process facades,这里再进行一个补充的介绍。 可以也看看前面的介绍。 单次调用 use Illuminate\Support\Facades\Process;$result Process::run(ls -la);return $result->ou…

手机商店app下载湛江百度seo公司

基于springboot实现旅游路线规划系统演示 摘要 随着互联网的飞速发展以及旅游产业的逐渐升温,越来越多人通过互联网获取更多的旅游信息,包括参考旅游文纪等内容。通过参考旅游博主推荐的旅游景点和规划线路,参考计划着自己的旅行&#xff0c…

山西省建设厅网站官网wordpress调用当前分类描述

专利权人 广东电网有限责任公司摘要:本实用新型实施例公开了一种光储型虚拟同步机,包括逆变器、光伏列、储能装置、本地负荷、开关和电网,所述光伏阵列通过第一DC/DC转换器连接在所述逆变器的直流母线上,所述储能装置通过第二DC/D…

手机网站建设的影响网络广告投放渠道有哪些

1.前言 在12.0的系统rom开发中,在对某些特殊模块中关于数据的存储方面等需要新增分区来保存, 所以就需要在系统分区新增分区,接下来就来实现这个功能,看第四部分的新增分区的实现过程 2.mt6771新增分区功能实现四的核心类 device/mediatek/mt6771/ueventd.mt6771.rcdevice…

广州做网站 信科网络个人网站制作wordpress

电脑上资料多了之后,每次找资料很麻烦。因此,匠人写了这个批处理文件。1、把这个批处理文件放在资料目录。2、执行它,输入关键字。它回自动搜索整个目录以及下属目录中的所有文件名中包含该关键字的文件,并生成一个带超级连接的网…

US$368 Lonsdor K518ISE SKE-IT Smart Key Emulator 5 in 1 Set

Lonsdor K518ISE SKE-IT Smart Key Emulator 5 in 1 SetSKE-LT Introduction:Product name: SKE-LT Smart Key EmulatorBattery standard: CR2032=3V(Please install battery)SKE-LT Smart Key Emulator Functions:Bin…

做淘宝美工需要知道的网站双八网站建设

大家好,我是Workfine黄坤,很高兴能够再次为大家进行分享。衷心感谢大家一直以来对我们的厚爱和支持。新的一年,祝愿大家财源滚滚,身体健康,阖家幸福。 这是我们创业的第七个年头,进入这一行也有整整十年。…

馆陶网站建设云建站自动建站系统源码

参考 http://www.cnblogs.com/honpey/p/4575928.html kprobe是linux内核的一个重要特性,是一个轻量级的内核调试工具,同时它又是其他一些更高级的内核调试工具(比如perf和systemtap)的“基础设施”,4.0版本的内核中&a…

全球50个大网站开发语言什么是百度竞价排名服务

101向日葵远程向日葵软件相对来说,可以实现Windows、Mac、Linux、Android,IOS之间的跨平台互连,对于个人版本除开网络的连接速度和其他部分付费功能的限制,基本上针对个人,相关的功能也满足了个人的使用。‖正‖文‖1、…

US$1090 VVDI2 AUDI VW 4th amp; 5th IMMO Functions Authorization Service

VVDI2 AUDI 4th & 5th IMMO Functions Authorization ServiceIf you just buy VVDI2 basic function(SV86-C) andwant to get the functions for Audi 4th and 5th IMMO authorization, you can buy this service.…

提示词工程与上下文工程核心洞察总结报告

提示词工程与上下文工程核心洞察总结报告Posted on 2025-09-25 01:07 吾以观复 阅读(0) 评论(0) 收藏 举报关联知识库:提示词工程与上下文工程核心洞察总结报告提示词工程与上下文工程核心洞察总结报告 报告来源…