虫虫首页|资源下载|资源专辑|精品软件
登录|注册

weight

  • matlab 0-1背包问题

    遗传算法已经成为组合优化问题的近似最优解的一把钥匙。它是一种模拟生物进化过程的计算模型,作为一种新的全局优化搜索算法,它以其简单、鲁棒性强、适应并行处理以及应用范围广等特点,奠定了作为21世纪关键智能计算的地位。 背包问题是一个典型的组合优化问题,在计算理论中属于NP-完全问题, 其计算复杂度为,传统上采用动态规划来求解。设w是经营活动 i 所需要的资源消耗,M是所能提供的资源总量,p是人们经营活动i得到的利润或收益,则背包问题就是在资源有限的条件下, 追求总的最大收益的资源有效分配问题。

    标签: matlab 背包问题

    上传时间: 2018-04-26

    上传用户:jiazhe110125

  • ADS 1256的中文翻译资料

    TI生产的24位模数转换芯片ADS 1256的中文翻译资料,可以帮助使用者用更快的时间读懂芯片结构进而投入开发工作,缩短前期准备时间。

    标签: 1256 ADS 翻译 中文

    上传时间: 2018-04-27

    上传用户:ffffdf

  • 3GPP协议

    3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Further advancements for E-UTRA; LTE-Advanced feasibility studies in RAN WG4 (Release 9)

    标签: 3GPP 协议

    上传时间: 2018-04-28

    上传用户:doforfuture

  • 数据结构实验

    #include <stdio.h>   #include <stdlib.h> ///链式栈      typedef struct node   {       int data;       struct node *next;   }Node,*Linklist;      Linklist Createlist()   {       Linklist p;       Linklist h;       int data1;       scanf("%d",&data1);       if(data1 != 0)       {           h = (Node *)malloc(sizeof(Node));           h->data = data1;           h->next = NULL;       }       else if(data1 == 0)       return NULL;       scanf("%d",&data1);       while(data1 != 0)       {           p = (Node *)malloc(sizeof(Node));           p -> data = data1;           p -> next = h;           h = p;           scanf("%d",&data1);       }       return h;   }      void Outputlist(Node *head)   {       Linklist p;       p = head;       while(p != NULL )       {           printf("%d ",p->data);           p = p->next;       }       printf("\n");   }      void Freelist(Node *head)   {       Node *p;       Node *q = NULL;       p = head;       while(p != NULL)       {           q = p;           p = p->next;           free(q);       }   }      int main()   {       Node *head;       head = Createlist();          Outputlist(head);          Freelist(head);          return 0;   }   2.顺序栈 [cpp] view plain copy #include <iostream>   #include <stdio.h>   #include <stdlib.h> ///顺序栈   #define MaxSize 100      using namespace std;      typedef

    标签: 数据结构 实验

    上传时间: 2018-05-09

    上传用户:123456..

  • 数据结构实验

    #include <iostream> #include <stdio.head> #include <stdlib.head> #include <string.head> #define ElemType int #define max 100 using namespace std; typedef struct node1 { ElemType data; struct node1 *next; }Node1,*LinkList;//链栈 typedef struct { ElemType *base; int top; }SqStack;//顺序栈 typedef struct node2 { ElemType data; struct node2 *next; }Node2,*LinkQueue; typedef struct node22 { LinkQueue front; LinkQueue rear; }*LinkList;//链队列 typedef struct { ElemType *base; int front,rear; }SqQueue;//顺序队列 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 //1.采用链式存储实现栈的初始化、入栈、出栈操作。 LinkList CreateStack()//创建栈 { LinkList top; top=NULL; return top; } bool StackEmpty(LinkList s)//判断栈是否为空,0代表空 { if(s==NULL) return 0; else return 1; } LinkList Pushead(LinkList s,int x)//入栈 { LinkList q,top=s; q=(LinkList)malloc(sizeof(Node1)); q->data=x; q->next=top; top=q; return top; } LinkList Pop(LinkList s,int &e)//出栈 { if(!StackEmpty(s)) { printf("栈为空。"); } else { e=s->data; LinkList p=s; s=s->next; free(p); } return s; } void DisplayStack(LinkList s)//遍历输出栈中元素 { if(!StackEmpty(s)) printf("栈为空。"); else { wheadile(s!=NULL) { cout<<s->data<<" "; s=s->next; } cout<<endl; } } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 //2.采用顺序存储实现栈的初始化、入栈、出栈操作。 int StackEmpty(int t)//判断栈S是否为空 { SqStack.top=t; if (SqStack.top==0) return 0; else return 1; } int InitStack() { SqStack.top=0; return SqStack.top; } int pushead(int t,int e) { SqStack.top=t; SqStack.base[++SqStack.top]=e; return SqStack.top; } int pop(int t,int *e)//出栈 { SqStack.top=t; if(!StackEmpty(SqStack.top)) { printf("栈为空."); return SqStack.top; } *e=SqStack.base[s.top]; SqStack.top--; return SqStack.top; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 //3.采用链式存储实现队列的初始化、入队、出队操作。 LinkList InitQueue()//创建 { LinkList head; head->rear=(LinkQueue)malloc(sizeof(Node)); head->front=head->rear; head->front->next=NULL; return head; } void deleteEle(LinkList head,int &e)//出队 { LinkQueue p; p=head->front->next; e=p->data; head->front->next=p->next; if(head->rear==p) head->rear=head->front; free(p); } void EnQueue(LinkList head,int e)//入队 { LinkQueue p=(LinkQueue)malloc(sizeof(Node)); p->data=e; p->next=NULL; head->rear->next=p; head->rear=p; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 //4.采用顺序存储实现循环队列的初始化、入队、出队操作。 bool InitQueue(SqQueue &head)//创建队列 { head.data=(int *)malloc(sizeof(int)); head.front=head.rear=0; return 1; } bool EnQueue(SqQueue &head,int e)//入队 { if((head.rear+1)%MAXQSIZE==head.front) { printf("队列已满\n"); return 0; } head.data[head.rear]=e; head.rear=(head.rear+1)%MAXQSIZE; return 1; } int QueueLengthead(SqQueue &head)//返回队列长度 { return (head.rear-head.front+MAXQSIZE)%MAXQSIZE; } bool deleteEle(SqQueue &head,int &e)//出队 { if(head.front==head.rear) { cout<<"队列为空!"<<endl; return 0; } e=head.data[head.front]; head.front=(head.front+1)%MAXQSIZE; return 1; } int gethead(SqQueue head)//得到队列头元素 { return head.data[head.front]; } int QueueEmpty(SqQueue head)//判断队列是否为空 { if (head.front==head.rear) return 1; else return 0; } void travelQueue(SqQueue head)//遍历输出 { wheadile(head.front!=head.rear) { printf("%d ",head.data[head.front]); head.front=(head.front+1)%MAXQSIZE; } cout<<endl; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 //5.在主函数中设计一个简单的菜单,分别测试上述算法。 int main() { LinkList top=CreateStack(); int x; wheadile(scanf("%d",&x)!=-1) { top=Pushead(top,x); } int e; wheadile(StackEmpty(top)) { top=Pop(top,e); printf("%d ",e); }//以上是链栈的测试 int top=InitStack(); int x; wheadile(cin>>x) top=pushead(top,x); int e; wheadile(StackEmpty(top)) { top=pop(top,&e); printf("%d ",e); }//以上是顺序栈的测试 LinkList Q; Q=InitQueue(); int x; wheadile(scanf("%d",&x)!=-1) { EnQueue(Q,x); } int e; wheadile(Q) { deleteEle(Q,e); printf("%d ",e); }//以上是链队列的测试 SqQueue Q1; InitQueue(Q1); int x; wheadile(scanf("%d",&x)!=-1) { EnQueue(Q1,x); } int e; wheadile(QueueEmpty(Q1)) { deleteEle(Q1,e); printf("%d ",e); } return 0; }

    标签: 数据结构 实验

    上传时间: 2018-05-09

    上传用户:123456..

  • UTM投影正反转换程序

    UTM投影正反转换程序 本程序是常用地图投影系列小程序之一,程序能用于不同基准面、单点及批量数据的UTM投影正、反转换,UTM与高斯-克吕格投影的相互转换,UTM正投影时的输入经纬度数据可以是度、度分及度分秒格式。

    标签: UTM 投影 转换 程序

    上传时间: 2018-05-15

    上传用户:c258520314

  • 结巴分词包

    结巴中文分词包,使用Python进行编写的,比较好用  支持三种分词模式: - 精确模式,试图将句子最精确地切开,适合文本分析; - 全模式,把句子中所有的可以成词的词语都扫描出来, 速度非常快,但是不能解决歧义; - 搜索引擎模式,在精确模式的基础上,对长词再次切分,提高召回率,适合用于搜索引擎分词。

    标签: 中文分词

    上传时间: 2018-06-04

    上传用户:吓人的土豆

  • 算法与数据结构课程设计

    拓扑排序 ---排课表----数据结构

    标签: 算法 数据结构

    上传时间: 2018-08-05

    上传用户:ningcaichen

  • C程序设计语言(完美中文版).pdf

    C程序设计语言(完美中文版).pdf C程序设计语言(完美中文版).pdf

    标签: pdf C程序设计 语言

    上传时间: 2018-08-20

    上传用户:superhou

  • 单片机步进电机控制器的设计-仿真+源码

    通过单片机设计步进电机控制现调速,快速启停,正反转控制及制动等

    标签: 单片机 仿真 步进电机 控制器 源码

    上传时间: 2018-10-21

    上传用户:18351330226