七.银行家算法程序代码 #include #include #include using namespace std; typedef struct Max1 // 资源的最大需求量 { int m_a; int m_b; int m_c; }Max; typedef struct Allocation1 //已分配的资源数 { int a_a; int a_b ; int a_c; }Allocation; typedef struct Need1 //还需要的资源数 { int n_a;
Arbitrary Length FFT ------------------------------------------------------------------------ NOTE : This is copyrighted material, NOT public domain. See below. ------------------------------------------------------------------------ Contents: This
#include "stdio.h" #include "conio.h" #include "string.h" #define MAX 5000 int start,end,nodenum; void save1(); void save2(); void main() { FILE *fp1,*fp2,*fp3; float ver[50]; int t[14],i,j,m; int num_node[4]; int node_number; int n umber=0; float v
hénon混沌序列和水印算法 图像分解和Logistics混沌序列a=imread('tu1.bmp'); ws1=size(a); %read secret image b=imread('tu2.bmp'); ws2=size(b); %read host image nb=imresize(b,ws1(1:2)); %change two images into the same size key=-0.400001; %the initial value of henon chaoti
protected int N=999;//种群大小 protected int x[]=new int[N] ;//父代x表现型 protected int y[]=new int[N];//父代y表现型 protected int code_x[][]=new int[N][8];//父代x基因型 protected int code_y[][]=new int[N][8];//父代y基因型 protected double suff[]=new double[N];//个体适应度 pro
DES算法加密解密控件for C Builder --------- 可以将需要加密的文字加密成16进制或非16进制 的字符串;也可以反过来解密之。 --------------- 操作十分方便,只需放入本控件, 然后调用4个加解密函数即可轻松完成! ----------------- Copy this directory to bcb working directory opening des.bpk and install. Example: String x,y; x = WCDE
此为用C#写的A*算法源代码 using System; using System.Collections.Generic; using System.Text; using System.Drawing; namespace EtSoft.AStarLib { public class AStar { private StarNodeCollection openList = new StarNodeCollection(); private StarNodeCollection close