-
基于mpi的矩阵相乘的并行算法
使用MPI做并行计算时,根据程序的具体要求,可按任务进行分配或数据进行分配。根据矩阵乘积的特点,这里按数据进行分配,即每个计算机节点计算不同的数据,由于矩阵数据的特点,这里按行进行数据分块。矩阵乘法在于对矩阵进行分块,然后交由各进程执行,最后将计算结果传递给主进程。
假设是M*N,计算前,将矩阵N发送给所有从进程,然后将矩阵M分块,将M中数据按行分给各从进程,在从进程中计算M中部分行数据和N的乘积,最后将结果发送给主进程。这里为了方便,有多少进程,就将M分了多少块,除最后一块外的其他数据块大小都相等,最后一块是剩下的数据,大小大于等于其他数据块大小,因为矩阵行数不一定整除进程数。最后一块数据在主进程中计算,其他的在从进程中计算。
- 2023-03-04 12:35:03下载
- 积分:1
-
Check1 (0). Caption = "soap" Check1 (1). Caption = "soap" Ch...
Check1(0).Caption = "香皂" Check1(1).Caption = "肥皂" Check1(2).Caption = "牙膏" Check1(3).Caption = "洗衣粉" Label1(0).Caption = "5.8元" Label1(1).Caption = "2.5元" Label1(2).Caption = "7.9元" Label1(3).Caption = "6.4元"-Check1 (0). Caption = "soap" Check1 (1). Caption = "soap" Check1 (2). Caption = "toothpaste" Check1 (3). Caption = "detergent" Label1 (0). Caption = "5 .8 million "Label1 (1). Caption = "2.5 yuan" Label1 (2). Caption = "7.9 yuan" Label1 (3). Caption = "6.4 yuan"
- 2022-01-25 16:20:06下载
- 积分:1
-
蚁群算法matlab源代码
蚁群算法的matlab源代码实现,十分实用。
- 2022-01-29 02:49:07下载
- 积分:1
-
二进制搜索
源代码和越南船民和 frm 如何用算法二进制搜索搜索的数组中。它是有用的培训和学习 vb 二进制搜索
- 2022-02-18 13:44:44下载
- 积分:1
-
Numerical method of procedure: to accelerate the iterative Gauss
数值计算方法的程序:
加速迭代
牛顿迭代
Gauss
杜里特尔分解法
克洛特
追赶法
平方根法
改进平方根法
雅可比迭代
高斯 赛德尔迭代
拉格朗日插值法
分段线性插值
分段抛物线插值-Numerical method of procedure: to accelerate the iterative Gauss-Newton iterative decomposition method克洛特Ritter Duri law to catch up with the square root of the square root method to improve the Jacobi iterative method iterative high斯赛德尔piecewise linear Lagrange interpolation interpolation sub-parabolic interpolation
- 2022-09-28 01:20:02下载
- 积分:1
-
procedures for the three mixed vector plot calculated using Matlab to achieve
本程序提供三矢量混合积的计算,采用matlab实现-procedures for the three mixed vector plot calculated using Matlab to achieve
- 2022-10-23 12:45:03下载
- 积分:1
-
Algorithm design in the 0
算法设计中的0-1背包问题,递归的应用
算法设计中的0-1背包问题,递归的应用-Algorithm design in the 0-1 knapsack problem, recursive application of algorithm design in the 0-1 knapsack problem, recursive application of
- 2022-02-26 18:53:13下载
- 积分:1
-
差分进化算法
Differential evolution: A simple and efficient heuristic for global optimization over continuous spaces.
This code implements a basic multi-objective optimization algorithm based on Diferential Evolution (DE) algorithm. When one objective is optimized, the standard DE runs; if two or more objectives are optimized, the greedy selection step in DE algorithm is performed using a dominance relation.
- 2022-07-08 18:06:29下载
- 积分:1
-
新型GA算法
一种好的改进遗传算法function [opy,optimy]=GA(pt,gennum,psize)% 输入参数:% pt m*n的加工时间矩阵(n是工件数目,m是机器数目)由已知给的T矩阵,可得n=100,m=10% gennum 迭代的次数(代数)% psize 种群的规模大小%输出参数:% opy 最优的Makespan值pc=0.9;%交叉因子pm=0.1;%变异因子[m,n]=size(pt);current_gen=1;%current_gen means the current generationnewgen=zeros(psize,n+1); %mewgen is the new generation of the populationnewgen(1:psize,1:n)=rand(psize,n);%主种群初始化,0-1之间的随机数 %Generalize the initial groupfather=zeros(2,n); %father is used to store the two genes for crossover and mutation avgen=zeros(1,gennum); %avgen is the matrix of the average of all the generationsoptimx=zeros(1,n);optimy=ones(1,gennum);%Generalize the initial groupfor i=1:psize [Ya,pop(i,1:n)]=sort(newgen(i,1:n));%种群排序,实数编码转换为自然数编码 随机生成的0-1之间的小数进行排序然后取每个从小到大数对应的位置 newg
- 2022-03-18 14:25:18下载
- 积分:1
-
为规范和解决poj 1699
poj 1699的代码和方法说明,个人原创
-the codes and solution for poj 1699
- 2022-06-15 09:10:35下载
- 积分:1