代码搜索:相差法
找到约 10,000 项符合「相差法」的源代码
代码结果 10,000
www.eeworm.com/read/269229/11104547
cpp xuanze1.cpp
//选择排序法xuanze1.cpp
#include
#include
#include
#include
#define N 10
void gensort(int b[],int n)
{int i,j,k;
for(i=0;i
www.eeworm.com/read/269229/11104556
cpp xuanze4.cpp
//选择排序法(函数模板)xuanze4.cpp
// 排序不改变原数组各元素的值
#include
#include
#include
#include
#include
#define M 10
template
void sortp(T d[],T *pd
www.eeworm.com/read/269229/11104873
h tree.h
//树的孩子兄弟表示法为存储结构的结构体Tree.h
template class Tree;
template struct TreeNode
{friend class Tree;//树类为友元
private:
TreeNode *firstChild;//第一个孩子结点指针域
TreeNode *nextSibli
www.eeworm.com/read/269229/11105187
cpp erfenfa1.cpp
//二分查找法(递归调用)erfenfa1.cpp
#include
#include
#include
double a[10]={1.1,1.3,1.5,1.7,1.9,2.1,2.3,2.5,2.7,2.9};
void binsrch(int s,int r,double x)
{int m;
m=(s+r)
www.eeworm.com/read/268719/11124590
cpp newton.cpp
float f(float x[],float y[],int s,int t)//牛顿插值法,用以返回差商
{
if(t==s+1)
return (y[t]-y[s])/(x[t]-x[s]);
else
return (f(x,y,s+1,t)-f(x,y,s,t-1))/(x[t]-x[s]);
}
www.eeworm.com/read/268481/11136820
h 10_4.h
#ifndef SEARCH_METHODS
#define SEARCH_METHODS
//用顺序查找法在数组list中查找值为key的元素
//若找到,返回该元素下标,否则返回-1
template
int SeqSearch(T list[], int n, T key)
{
for(int i=0;i < n;i++)
if (l
www.eeworm.com/read/268467/11137233
cpp package.cpp
#include
#define N 6
int main(){
//从N个背包(每个背包中w[k])中选取总重为T的背包,共有多少种选法
int w[N]={1,8,3,4,5,2}; //6个背包
int T=10; //总重
int k=0
www.eeworm.com/read/410943/11263547
asm 流水灯2.asm
;查表法广告流水灯
ORG 00H
MOV P2,#80H
START: MOV DPTR,#TABLE ; 将表的地址存入数据指针
LOOP: CLR A
MOVC A,@A+DPTR ;到数据指针所指的地址取码
CJNE A,#01,LOOP1 ; 取出的码是否01H
www.eeworm.com/read/247721/12626341
m funfminu.m
options(6)=1;%拟牛顿法的DFP公式
options(7)=0;%混合的二次型和三次型插值
[x,options]=fminu('funrosen',[-1.2,2],options)
y=options(8) %输出在最后极值点的函数值
n=options(10)%给出函数计算次数
www.eeworm.com/read/247654/12637522
m funfminu.m
options(6)=1;%拟牛顿法的DFP公式
options(7)=0;%混合的二次型和三次型插值
[x,options]=fminu('funrosen',[-1.2,2],options)
y=options(8) %输出在最后极值点的函数值
n=options(10)%给出函数计算次数