//使用gray code的解法 #include <iostream> #include <cmath> using namespace std #define ZERO 0 #define ONE 1 #define ODD 1 #define EVEN 0 #define RIGHT 1 #define LEFT 0 #define MAX 10
標(biāo)簽: include namespace iostream define
上傳時(shí)間: 2016-12-31
上傳用戶:luke5347
#include "iostream.h" #include "iomanip.h" #define N 20 //學(xué)習(xí)樣本個(gè)數(shù) #define IN 1 //輸入層神經(jīng)元數(shù)目 #define HN 8 //隱層神經(jīng)元數(shù)目 #define ON 1 //輸出層神經(jīng)元數(shù)目 double P[IN] //單個(gè)樣本輸入數(shù)據(jù) double T[ON] //單個(gè)樣本教師數(shù)據(jù) double W[HN][IN] //輸入層至隱層權(quán)值 double V[ON][HN] //隱層至輸出層權(quán)值 double X[HN] //隱層的輸入 double Y[ON] //輸出層的輸入 double H[HN] //隱層的輸出
標(biāo)簽: define include iostream iomanip
上傳時(shí)間: 2014-01-01
上傳用戶:凌云御清風(fēng)
//順序表的建立、查找、插入與刪除 #include <stdio.h> #include <malloc.h> #include <stdlib.h> #define ListSize 100 //表最大長(zhǎng)度 //結(jié)構(gòu)定義 typedef struct SeqList { int node[ListSize] //存放表結(jié)點(diǎn) int length //當(dāng)前表長(zhǎng)度 } SeqList //插入元素 insertList(SeqList *list, int e) { int i=list->length-1 //先將i指定為最后一項(xiàng) if(i>=ListSize-1) //表已經(jīng)達(dá)到最大長(zhǎng)度ListSize { printf("表已滿,不能增加新的項(xiàng)!\n")
標(biāo)簽: include gt lt malloc
上傳時(shí)間: 2014-01-17
上傳用戶:dongqiangqiang
include emccsoft s60_2x
上傳時(shí)間: 2013-12-19
上傳用戶:netwolf
#include <stdio.h> #include <stdlib.h> #define OK 1 #define OVERFLOW -2 typedef int status typedef struct LinkList{ //用帶表頭結(jié)點(diǎn)的有序鏈表表示多項(xiàng)式 float coef //系數(shù) int expn //指數(shù) struct LinkList *next //指向后繼的指針 }*polynomail //結(jié)構(gòu)體類型的指針
標(biāo)簽: include define OVERFLOW stdlib
上傳時(shí)間: 2014-12-06
上傳用戶:1079836864
PC與單片機(jī)雙向通訊智能溫控程序 #include <AT89X51.H> #include <intrins.h> #define Key_UP P1_0 #define Key_DOWN P1_1 #define Key_SET P1_2 #define RelayOutPort P2_0 #define LEDPort P0 #define DELPort P2_1 #define LEDTwoC P3_6 #define LEDThreeC P3_7 #define TMPort P2_7 #define INBUF_LEN 5 //數(shù)據(jù)長(zhǎng)度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 , 0 } //發(fā)送緩沖區(qū) unsigned char inbuf2[50] //接收緩沖區(qū) unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr TMOD |= 0x20 //TMOD: timer 1, mode 2, 8-bit reload PCON |= 0x80 //SMOD=1 TH1 = 0xFA //Baud:4800 fosc=11.0592MHz IE |= 0x90 //Enable Serial Interrupt TR1 = 1 // timer 1 run } //向串口發(fā)送一個(gè)字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0
標(biāo)簽: include intrins define Key_UP
上傳時(shí)間: 2014-11-29
上傳用戶:風(fēng)之驕子
VB遙控播放器紅外遙控解碼 #include <regX52.h> #define c(x) (x*110592/120000) sbit Ir_Pin=P3^2 sbit beep=P2^1 //sbit RELAY=P2^0 #define INBUF_LEN 4 //數(shù)據(jù)長(zhǎng)度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 } //發(fā)送緩沖區(qū) unsigned char inbuf2[50] //接收緩沖區(qū) unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr T2CON=0x30 TH2=0x00 TL2=0x00 RCAP2H=0xFF RCAP2L=0xDC TR2=1 } //向串口發(fā)送一個(gè)字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0
標(biāo)簽: include 110592 120000 define
上傳時(shí)間: 2013-12-21
上傳用戶:yph853211
遙控解碼通過電腦串口顯示 /* 晶振:11.0569MHz */ #include <REGX52.h> #define uchar unsigned char uchar data IRcode[4] //定義一個(gè)4字節(jié)的數(shù)組用來存儲(chǔ)代碼 uchar CodeTemp //編碼字節(jié)緩存變量 uchar i,j,k //延時(shí)用的循環(huán)變量 sbit IRsignal=P3^2 //HS0038接收頭OUT端直接連P3.2(INT0) /**************************延時(shí)0.9ms子程序**********************/ void Delay0_9ms(void) {uchar j,k for(j=18 j>0 j--) for(k=20 k>0 k--) } /***************************延時(shí)1ms子程序**********************/ void Delay1ms(void) {uchar i,j for(i=2 i>0 i--) for(j=230 j>0 j--) }
標(biāo)簽: uchar unsigned 11.0569 include
上傳時(shí)間: 2013-12-12
上傳用戶:Breathe0125
This course is about "distributed algorithms".Distributed algorithms include a wide range of parallel algorithms,which can be classified by a variety of attributes.
標(biāo)簽: algorithms Distributed distributed include
上傳時(shí)間: 2014-10-30
上傳用戶:baitouyu
:#include <stdlib.h>#include <stdio.h>#include <time.h> void InsertSort(int a[],int *(k1),int *(k2))//0:直接插入排序{ int i,j int temp *(k1)=0 *(k2)=0 for(i=0 i<149 i++) { temp=a[i+1] *(k2)++ ...
標(biāo)簽: include InsertSort gt lt
上傳時(shí)間: 2014-11-30
上傳用戶:362279997
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1