代码搜索结果

找到约 33,766 项符合 Algorithm 的代码

gcd.c

int gcd(int a, int b) /* A simple example of the Euclidean algorithm: */ /* Compute g = (a,b), where a>0 and b>0 */ /* (A better function would include sign checking) */ /* Copyright 2004 by Todd K.

memmem.c

/* * memmem.c * * Find a byte string inside a longer byte string * * This uses the "Not So Naive" algorithm, a very simple but * usually effective algorithm, see: * * http://www-igm.univ-mlv.f

algorithm.txt

1. Compression algorithm (deflate) The deflation algorithm used by gzip (also zip and zlib) is a variation of LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in the input dat

randomprime.cpp

// 输入: 所需素数的长度 512 比特及一个安全参数 t // 输出; 一个随机的 512 比特素数 #include #include #include #include #include #include "PrimeTable.hpp" int main()

contents.m

% Genetic Optimization Toolbox % % Main interface % ga.m The Genetic Algorithm % initializega.m Initialization function for float and binary % repres

炒饭问题1.cpp

#include using namespace std; #include int time(int *a,int n) { int i=1,j=0,b[1000]; int t=a[0]; b[0]=a[0]; while(i

炒饭问题.cpp

#include using namespace std; #include int a[1000]; main() { int i,n,s; while(scanf("%d",&n)!=EOF) { s=0; for(i=0;i

km_demo.m

% Demo for the kmeans algorithm % First, generate sample data % We will test with 4 clusters in 3 dimensions, % by generating random data with gaussian density, variance 1, % with means (0,0,0)

ratematch.c

/* RateMatch performs the basic HSDPA Rate Matching algorithm The calling syntax is: y = RateMatch( x, X_i, e_ini, e_plus, e_minus ) y = output of rate matching algorithm