文件名称:tree

  • 所属分类:
  • 数据结构常用算法
  • 资源属性:
  • [Windows] [Visual C] [源码]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 57kb
  • 下载次数:
  • 1次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。

介绍说明--下载内容均来自于网络,请自行研究使用

表达式类型的实现:

1、  一个表达式和一颗二叉树之间,存在着自然的对应关系。

2、  假设算术表达式Expression内可以含有变量(a~z)、常量(0~9)和二元运算符(+,-,*,/,^)。实现一下操作。

(1)  ReadExpr(E)——以字符序列的形式输入语法正确的前缀表示式并构造表达式E。

(2)  WritrExpr(E)——用带括弧的中缀表示式输出表达式E。

(3)  Assign(V,c)——实现对变量V的赋值(V=c),变量的初值为0。

(4)  Value(E)——对算术表达式E求值。

(5)  CompoundExpr(P,E1,E2)——构造一个新的复合表达式(E1)P (E2)。

-Realize the type of expression: one, an expression, and between a binary tree, there is a natural correspondence between. 2, assuming that the arithmetic expression Expression can contain variables (a ~ z), constant (0 ~ 9) and binary operators ( ,-,*,/,^)。 You realize the operation. (1) ReadExpr (E)- sequence of characters in the form of input grammar correct prefix expressions and tectonic expression of E. (2) WritrExpr (E)- used within parentheses express output infix expression E. (3) Assign (V, c)- realize the value V of the variables (V = c), variable initial value is 0. (4) Value (E)- on the arithmetic expression E is evaluated. (5) CompoundExpr (P, E1, E2)- Construction of a new composite expression (E1) P (E2).相关搜索: tree
表达式类型的实现
二叉树
表达式
infix
expression
to
expression
tree
prefix
tree
composite
INPUT

(系统自动生成,下载前可以参看下载内容)

下载文件列表

tree

....\Debug

....\fun.cpp

....\fun.h

....\ReadMe.txt

....\StdAfx.cpp

....\StdAfx.h

....\tree.cpp

....\tree.dsp

....\tree.dsw

....\tree.ncb

....\tree.opt

....\tree.plg

....\treefun.cpp

实验报告tree.doc

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org