对一个运输商来说要把货运到收货地点选择最短的路线运输是其实现最大利润的要求,那么怎样选择最短的运输路线呢?在运输交通图中,我们设每一个城市为一个结点(vertextype类型)点并把他们分别用关键字代表(关键字int key ),也就是说把每个城市给出一个整数编码;一个城市直接到另一个城市的交通路线为边且这两个城市为相邻结点,不妨设这条路线的距离为边的权值(权值int weight ),易知距离越短运费就越低。这样就可以建立一个无向有权图,那么求最短的运输路线问题就转化为求图中一顶点到其余各个顶点的最短路径问题了。
上传时间: 2015-08-22
上传用户:ynsnjs
You will write a program for calculating person s Body Mass Index (BMI). The following formula is used: bmi = weight / length² , where weight is in kilograms and length is in meters.
标签: calculating following program formula
上传时间: 2013-12-09
上传用户:qq521
* CONSTRAINTS * This module does not handle data which is considered out of range by the * application(i.e. fixed constants which represent error condition) * * Maximum weight value must be limited to 128 to prevent an overflow * condition during the calculation. * * The internal data type must be large enough to handle the calculations. * The maximum possible internal value * = Max Input Value * (weight - 1) + Max Input Value * If a maximum weight of 128 is used, the internal data type should be 2 * times the size of the input data type.
标签: CONSTRAINTS considered module handle
上传时间: 2015-09-07
上传用户:qunquan
BP神经网络分类器 程序有两种运行状态,一个是学习,另外一个是分类。在学习状态下,在Dos命令符下输入bp learn,便开始学习了,学习的结果放在weight.dat中;在工作状态下,在Dos命令符下输入bp work,便开始识别classfyme.dat中的数据了,识别完成后,结果放在results.dat中。在bp运行的任何一种状态下,都不能手工打开weight.dat、Sample.dat、classfyme.dat、results.dat中的任何一种。~..~
上传时间: 2013-12-17
上传用户:skfreeman
设有一个SPJ数据库,包括S、P、J、SPJ四个关系模式: S(SNO,SNAME,STATUS,CITY) P(PNO,PNAME,COLOR,weight) J(JNO,JNAME,CITY) SPJ(SNO,PNO,JNO,QTY) 供应商表S由供应商代码SNO、供应商姓名SNAME、供应商状态STATUS、供应商所在城市名CITY组成。 零件表P由零件代码PNO、零件名PNAME、颜色COLOR、重量WETGHT组成。 工程项目表J由工程项目代码JNO、工程项目名JNAME、工程项目所在城市名CITY组成。 供应情况表SPJ由供应商代码SNO、零件代码PNO、工程项目代码JNO、供应数据QTY组成,表示某供应商供应某种零件给某工程项目的数量为QTY。 上述四表中的具体数据可以参考教材30、31页。
上传时间: 2015-12-23
上传用户:LIKE
% because we do not truncate and shift the convolved input % sequence, the delay of the desired output sequence wrt % the convolved input sequence need only be the delay % introduced by the ideal weight vector centred at n=5
标签: the convolved truncate sequence
上传时间: 2015-12-27
上传用户:www240697738
用分支限界法求解背包问题(0/1背包) 1.问题描述:已知有N个物品和一个可以容纳TOT重量的背包,每种物品I的重量为weight,价值为Value。一个只能全放入或者不放入,求解如何放入物品,可以使背包里的物品的总价值最大。 2.设计思想与分析:对物品的选取与否构成一棵解树,左子树表示装入,右表示不装入,通过检索问题的解树得出最优解,并用结点上界杀死不符合要求的结点。
上传时间: 2016-02-09
上传用户:我们的船长
Computes BER v EbNo curve for convolutional encoding / soft decision Viterbi decoding scheme assuming BPSK. Brute force Monte Carlo approach is unsatisfactory (takes too long) to find the BER curve. The computation uses a quasi-analytic (QA) technique that relies on the estimation (approximate one) of the information-bits weight Enumerating Function (WEF) using A simulation of the convolutional encoder. Once the WEF is estimated, the analytic formula for the BER is used.
标签: convolutional Computes encoding decision
上传时间: 2013-12-24
上传用户:咔乐坞
Swarm intelligence algorithms are based on natural behaviors. Particle swarm optimization (PSO) is a stochastic search and optimization tool. Changes in the PSO parameters, namely the inertia weight and the cognitive and social acceleration constants, affect the performance of the search process. This paper presents a novel method to dynamically change the values of these parameters during the search. Adaptive critic design (ACD) has been applied for dynamically changing the values of the PSO parameters.
标签: intelligence optimization algorithms behaviors
上传时间: 2014-01-08
上传用户:lgnf
构造哈夫曼树 哈弗曼树中没有度为一的节点,是标准的二叉树,所以有n个叶子结点时,需要一个长度为2n-1的一维数组存储哈弗曼树的结点。 (1)、n个叶子节点只有weight权值,处理非叶子节点,从ht[i](ht[1]~ht[n-1])中找到ht[i].weight最小的两个节点ht[s1]和ht[s2],这就是Select(int n,int &s1,int & s2,HTNode *ht)函数完成的功能。 (2)、调用select函数,并将ht[s1]和ht[s2]作为ht[l]的左右子树,即ht[s1]和ht[s2]双亲节点为ht[l],新的根节点的权值为其左右子树权值之和, ht[l].weight=ht[s1].weight+ht[s2].weight
上传时间: 2016-06-13
上传用户:ztj182002