-
一个求解Josephus问题的函数
#include
#include
#define NULL 0
#include
typedef struct Lnode
{
int data;
struct Lnode *next;
}Josephus;
void CreateList(Josephus*&L,int n)//建立循环链表
{
int i;
Josephus *p,*s;
s=(Josephus*)malloc(sizeof(Josephus));
s->data=1;
L=p=s;
for(i=2;idata=i;
p->next=s;
p=s;
}
p->next=L;
}
void DeleteList(Josephus*&L,Josephus*p,Josephus*q)
{
q->next=p->next;
free(p);
}
void Josephus1(Josephus*&L,int s,int m)
- 2022-01-27 23:12:59下载
- 积分:1
-
compression algorithm test procedure (North Jimmy computer
压缩算法测试程序(北理计算机系老浪字做)-compression algorithm test procedure (North Jimmy computer-old wave character)
- 2022-03-23 06:13:34下载
- 积分:1
-
强大的三角剖分函数库(含调用代码)
//强大的三角剖函数库
//不仅能满足一般Delaunay三角剖分(DT)、约束Delaunay三角剖分(CDT)还能输入
//最小角度或最大面积条件加密三角形(CCDT),并能处理边界内的洞
//本版本对原程序进行了少量修改,经测试可以满足Delaunay TIN、土方计算等开发需要。
//原作者:Jonathan Richard Shewchuk 美国加州大学伯克利分校
//修改人:倪尧 修改日期:2013-7-25 QQ:627957087
- 2023-07-12 05:55:03下载
- 积分:1
-
C语言作的四色验证1.需求分析问题描述:证明了可以用不多于4种颜色对n个区域着色,而满足相邻的区域具有不同的颜色输入形式 : 暂定最多50个区域,如需证明更多区...
C语言作的四色验证1.需求分析问题描述:证明了可以用不多于4种颜色对n个区域着色,而满足相邻的区域具有不同的颜色输入形式 : 暂定最多50个区域,如需证明更多区域,修改#define S 50 即可;以整形形式输入(取值范围1-32767)用户需要证明的区域数目,相联的一对矩阵; 输出形式:以0和1输出关联矩阵,和以blue yellow orange pink形式输出每个区域相对应证明出的颜色;-C language does four colors confirm 1. demands analyses
question description: Had proven may use not to be many to 4 kind of
colors to n region coloration, but satisfies the neighboring region to
have the different color input form: Establishes provisionally more
than 50 regions, if must prove more regions, revise#define S 50 then;
Region number (value scope 1-32767) the user needs to prove which by
the reshaping form input, unites a pair of matrix; Output form: By 0
and 1 output incidence matrixs, with form outputs the color by blue
yellow orange the pink which each region corresponds proves;
- 2022-10-20 02:35:04下载
- 积分:1
-
matrix eigenvalue of the largest power France. For engineering calculation, Matr...
矩阵的最大特征值的幂法.
对于工程计算而言,矩阵的特征值和特征向量都是相当重要和常见的数据,这里给出的幂法是一种常见的求解方法,用的是迭代的思想。
符号说明:
1A为待求的矩阵,
2Uk,Vk为迭代用的列向量。
3最后的最大特征值maxLamda由最后一次的max(Uk)-----求Uk中的绝对值最大的元素的绝对值.所决定。
而maxLamda所对应的特征向量由最后一次迭代的Vk所决定.
主要的想法就是先选一个不为0的初始向量U0!=0,然后按下面的式子迭代。
-matrix eigenvalue of the largest power France. For engineering calculation, Matrix eigenvalues and eigenvectors are very important and common data, here is the power law is a common solution, using the iterative thinking. Symbol : 1A of the question for the matrix, 2Uk, Vk iteration of the column vector. The final three largest eigenvalue maxLamda from last max (uk Hoffmann for the uk the largest absolute value of the absolute value of the element. by decision. While maxLamda corresponding eigenvectors from the last iteration of Vk decision. The main idea was first choice not one of the initial vector 0 U0! = 0, then by the following formula iteration.
- 2022-12-15 11:10:03下载
- 积分:1
-
该程序是用C语言写的采用了动量方法的BP神经网络,它具有极其强大的扩展性,可用于函数的逼近及分类识别等各方面,语言书写规范,其中大量使用了动态分配一、二维数组的...
该程序是用C语言写的采用了动量方法的BP神经网络,它具有极其强大的扩展性,可用于函数的逼近及分类识别等各方面,语言书写规范,其中大量使用了动态分配一、二维数组的方法,该网络实例中实现的是对某一函数的逼近,输入层为二层,中间层可自己设定多达十几层,逼近精度非常精确。读者可根据自己的需要设定各层的数目以及相应的训练样本进行训练与测试。-The program is written in C language using the momentum method of BP neural network, which has extremely powerful scalability, can be used for function approximation and classification in areas such as language specification, including large-scale use of a dynamically allocated one, two dimensional array of methods, examples of the network realize that the approximation of a function, for the second input layer, middle layer can be set as many as a dozen layers, close to very precise accuracy. Readers may need to be set in accordance with its own number of floors and the corresponding training samples for training and testing.
- 2022-09-23 15:35:02下载
- 积分:1
-
FP增长树
FP增长算法中频繁项集挖掘中的一个。它可用于查找数据库中设置的频繁项目。它会以树结构格式的输出。它比Apriori算法,因为没有候选人的产生更有效率。强关联规则生成的执行输出。
- 2022-07-09 09:20:51下载
- 积分:1
-
moment program for electromagnetic computing
moment program for electromagnetic computing -moment program for electromagnetic computing
- 2022-04-30 12:09:36下载
- 积分:1
-
一个比较全面的数值分析类库的DLL文件,使用方便
一个比较全面的数值分析类库的DLL文件,使用方便-A more comprehensive numerical analysis of the class library DLL files, easy to use
- 2023-07-20 20:00:03下载
- 积分:1
-
特征值提取程序
信号分解后进行特征值提取。包含均值、方根幅值、均方根值、最大值、标准差、偏斜度、峭度、峰值因子、裕度因子、波形因子、脉冲因子、方差等多种特征值,可以进行多个或者单个特征值的输出。在模式识别领域或者是振动噪声分析领域很有用处。
- 2023-03-06 22:00:03下载
- 积分:1