欢迎来到冰豆网! | 帮助中心 分享价值,成长自我!
冰豆网
全部分类
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • 党团工作>
  • ImageVerifierCode 换一换
    首页 冰豆网 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    人工智能实验王浩算法Word下载.docx

    • 资源ID:22586674       资源大小:49.94KB        全文页数:27页
    • 资源格式: DOCX        下载积分:12金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要12金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    人工智能实验王浩算法Word下载.docx

    1、struct node char *s; type kind; int polar; node *next; node *child; int start;struct step step *child; step *brother; node *lhead; node *rhead; int count; char name30;/初始化,输入表达式int inite(char *s,node *head) int len=strlen(s); int j=0,polar=1; node *current=NULL; node *last=NULL; if(s=NULL)return 0;

    2、last=head; while(ilen) if(si=|) if(!(si+1A|si+1kind=or;s=NULL;next=NULL;child=NULL;polar=polar;start=0; if(last-kind=level&last-child=NULL) last-child=current; elsenext=current; last=current; i+; else if(si= current=(node*)malloc(sizeof(node); current-kind=and; if(last- last- else last=current; i+;)

    3、return 0; polar=1-polar;- if(si+1!|(si+2!si+2!(si+2|si+2)|i=0)return 0;kind=detrusion; i=i+2; if(si+1!|si+2!)|(si+3!si+3!(si+3|si+3)|i=0)&kind=equal; i=i+3; else if(si|sikind=variable; s=(char*)malloc(MAX_L*sizeof(char); j=0; while(si)|(sis)j=si; j+; if(si!si!0) (current-s)j=; polar=1;|si= s=(char*)

    4、malloc(2*sizeof(char);s)0=si;s)1=kind=level; polar=1; if(!inite(s,last)return 0; P return 1; else return 0; return 1;/复制函数node* clone(node *parent) node *son=NULL; if(parent=NULL)return NULL; son=(node*)malloc(sizeof(node); son-kind=parent-kind;polar=parent-polar;s=parent-s;start=parent-start; if(pa

    5、rent-next!=NULL) son-next=clone(parent-next); elsechild!child=clone(parent-child); return son;void remove(node *head) current=head; if(current=NULL)return; if(current-current-child-kind=variable&next=NULL) current-polar=(current-polar=current-polar);polar=1; while(current-child=current-child;=NULL)r

    6、emove(current-void restruct(node* head) node *newone=NULL,*newtwo=NULL,*newthree=NULL,*newfour=NULL,*newcurrent=NULL; int order=1; while(order while(current! if(current-kind=variable|current-kind=level)&order=1) if(current-=NULL&next-kind=and) newone=(node*)malloc(sizeof(node); newone-polar=0; if(la

    7、st-kind=level) last-child=newone; elsenext=newone;next=current-next; current-polar=1-current- current=newone; last=current; current=current- else if(current-order=2)kind=or) newone=(node*)malloc(sizeof(node);order=3)kind=equal) newtwo=(node*)malloc(sizeof(node); newtwo- newthree=(node*)malloc(sizeof

    8、(node); newthree- newfour=(node*)malloc(sizeof(node); newfour-child=newtwo; next=newthree;next=newfour; newcurrent=clone(current); newcurrent-child=newcurrent-next=newcurrent-next=newcurrent; else if(current-order=4) restruct(current); current=current- order+;void show(node *head) while(current! if(current- if(current-polar=0)printf();start!=1|(current-polar=0&=NULL)printf( show(current-) current=current-


    注意事项

    本文(人工智能实验王浩算法Word下载.docx)为本站会员主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2022 冰点文档网站版权所有

    经营许可证编号:鄂ICP备2022015515号-1

    收起
    展开