单链表的查找、插入与删除。 设计算法,实现线性结构上的单链表的产生以及元素的查找、插入与删除。具体实现要求: 1. 从键盘输入20个整数,产生不带表头的单链表,并输入结点值。 2. 从键盘输入1个整数,在单链表中查找该结点的位置。若找到,则显示“找到了”;否则,则显示“找不到”。 3. 从键盘输入2个整数,一个表示欲插入的位置i,另一个表示欲插入的数值x,将x插入在对应位置上,输出单链表所有结点值,观察输出结果。 4. 从键盘输入1个整数,表示欲删除结点的位置,输出单链表所有结点值,观察输出结果。 5. 将单链表中值重复的结点删除,使所得的结果表中个结点值均不相同,输出单链表所有结点值,观察输出结果。 6. 删除其中所有数据值为偶数的结点,输出单链表所有结点值,观察输出结果。 7. 把单链表变成带表头结点的循环链表,输出循环单链表所有结点值,观察输出结果。 8. (★)将单链表分解成两个单链表A和B,使A链表中含有原链表中序号为奇数的元素,而B链表中含有原链表中序号为偶数的元素,且保持原来的相对顺序,分别输出单链表A和单链表B的所有结点值,观察输出结果。
标签: C++
上传时间: 2015-12-21
上传用户:bdyangfan
在包 hugeinteger 中创建功能类 HugeInteger,该类用来存放和操作一个不超过 40 位的大整数。 (1) 定义一个构造函数,用来对大整数进行初始化。参数为一个字符串。 (2) 定义 input 成员函数,实现大整数的重新赋值。参数为一个字符串,无返回 值。 (3) 定义 output 成员函数,将大整数输出到屏幕上。无参数无返回值。 (4) 定义 add 成员函数,实现两个大整数的加法。参数为一个 HugeInteger 对 象,无返回值,例如: HugeInteger A = new HugeInteger("12345"); HugeInteger B = new HugeInteger("1234"); A.add(B); 此时,A 为 13579,B 为 1234。 (5) 定义 sub 成员函数,实现两个大整数的减法。参数和返回值同 add 函数。 (6) 定义若干大整数关系运算的成员函数,包括 isEqualTo(等于,=)、 isNotEqualTo(不等于,≠)、isGreaterThan(大于,>)、isLessThan(小 于,<)、isGreaterThanOrEqualTo(大于等于,≥)和 isLessThanOrEqualTo (小于等于,≤)。这些函数的参数为一个 HugeInteger 对象,返回值为一个 布尔类型,表示关系运算的结果,例如: HugeInteger A = new HugeInteger("12345"); HugeInteger B = new HugeInteger("1234"); 那么此时 A.isGreaterThan(B)的结果应当为 True,表示 12345>1234。
上传时间: 2019-06-01
上传用户:idealist
This edition updates and continues the series of books based on the residential courses on radiowave propagation organised by the IEE/IET. The first course was held in 1974, with lectures by H. Page, P. Matthews, D. Parsons, M.W. Gough, P.A. Watson, E. Hickin, T. Pratt, P. Knight, T.B. Jones, P.A. Bradley, B. Burgess and H. Rishbeth.
标签: Propagation Radiowaves edition 3rd of
上传时间: 2020-05-31
上传用户:shancjb
It was only a few years ago that “ubiquitous connectivity” was recognized as the future of wireless communication systems. In the era of ubiquitous connectivity, it was expected that the broadband mobile Internet experience would be pervasive, and seamless connectivity on a global scale would be no surprise at all. The quality of service would be guaranteed no matter when/where/what the users wanted with the connectivity. Connectivity would even be extended to object-to-object communication, where no human intervention was required. All objects would become capable of autonomous communication.
标签: Protocols Radio LTE-A LTE for and
上传时间: 2020-06-01
上传用户:shancjb
用三点法实现机器人三维位置测量的研究摘 要 :提 出 了一 种 微 小 爬 壁 机 器 人 三 维 位 置 测 量 的新 方 法 。笔 者 通 过 深 入 分 析 研 究各 种 位 置 测 控 方 法 与 系 统 ,提 出采 用单 目视 觉方 法 中的 聚 焦法 ,以 CCD作 为 传 感 器 ,用 三 点 法 实现 对 机 器 人 的 三 维 位 置 测 量 。 验 证性 实验 结果表 明 ,本研 究提 出的测 量原 理和 系统是 正 确 可行 的 。 关键词 :机 器人 ;位置 测量 ;CCD传 感 器 ;单 目视 觉 ;摄 像 机 标 定 中 图分 类 号 :TP242.6 文 献 标 识 码 :B Abstract:A new 3D position measurementmethod Ofa wall—climbing micro robothas been researched.Researc— hing on the various position measuring and controlling method,theauthorhasputforwardanewprojecttomeas— ure the 3D position of the robot,in which the focusing method with singlecamera and CCD sensorhasbeen used to getthe position information.The elementary experiment has verified the principle and the system. Key words:robot;position detection;CCD sensor;single camera vision;camera caiibration 位置测量技 术是智 能机 器人 的关键 技术 ,是各 种 机器人控 制系统 中极 为重 要 的环节 ,也 是 国内外研 究 的热点所 在。 按 照测试 系统 与被 测机 器 人 的关 系 ,可 以将位 置 测量技术 分为接触 式和非接触式 两大类 。接触 式测量 系统 由于在测 量过程 中或多或少地 对机器人施 加 了载 荷 ,因而仅适用于静 态 位置测 量 。而动 态 位 置测量 系 统 主要分 5类 :①激光跟踪 系统 ;@ CCD交 互测量 收 稿 日期 :2001—07—03 基 金项 目:国家 863高科技 研 究 资助 项 目(9804-06);教 育 部 高 等 学校 骨干教 师 资助 计 3t,j项 目 作者 简 介 :张 智海 (1973一 ),男 ,工 学硕 士 ,主 要 研 究 方 向 为 智 能 机 器人 测 控 技 术 。 系统 ;③ 超声波 测量 系统 ;④ PSD(positionsensitivede— vice)位 置 测 量 系统 ;⑤ 带 有 接 近觉 传 感 器 的 测量 系 统 。位置测量 还可 以从另一个分类 角度划分为主动式 测量和被动 式测 量 。主动式测 量主要可 以分为结 构光方法和激光 自动聚焦法两类 。被 动式测量 主要 可 以分为双 目视 觉 、三 目视觉 、单 目视觉 等方法 。 对 比以上各种方法 的 优缺 点 ,针对 笔者 研制 的微 小爬壁机器人 的空 间三 维位 置 测量 的要 求 ,测量 系统 必须满足尺 寸小 、分 辨率 高 、稳定 性 和可 靠性 好 、时 间 响应快等特 点 ,提 出了采用 单 目视觉方法 中的聚焦法 , 选用 CCD作 为传感器 ,用 三点法实现对机器人 的三维 位置测量 ,并用 Matlab和 V
标签: 机器人
上传时间: 2022-02-12
上传用户:
SD卡 USB VGA DB9 RJ45 RJ22 通讯接口封装Altium Designer AD PCB封装库2D3D元件库文件PCB Library : 通讯接口.PcbLibDate : 2020/12/29Time : 14:31:34Component Count : 46Component Name-----------------------------------------------BM4-M003-BBM4-M003-BKBM4-M003-GBM4-M003-RBM4-M003-YDB9/P_ADB9/S_AMicro SDMICRO SIMMICRO SIM-BNano-SIM-ARJ-45A12RJ11-4P4C-LI-BKRJ11-4P4C-LI-GYRJ11-6P6C-BKRJ11-6P6C-GYRJ45_180RJ45-2RJ45-2LEDTF-1USB_A/P_AUSB_A/P_BUSB A/2-14USB A/2-17USB Type-C-6Pin_AUSB Type-C-16Pin_AUSB Type-C-24Pin_AUSB-A/S_AUSB-A/S_BUSB-A/S_CUSB-A/S_DUSB-A/S_EUSB-A/S_FUSB-B/S_AUSB-C/S_AUSB-C/S_BUSB-C/S_CUSB-micro_AUSB-MICRO_BUSB-micro_CUSB-MICRO_DUSB-MICRO_EUSB-MICRO_FUSB-MINI-AVGA15AVGA15B
上传时间: 2022-03-12
上传用户:得之我幸78
The purpose of this note is to present how to use the ST7 PWM/BRM for the generation of a50Hz si
上传时间: 2013-06-01
上传用户:huyanju
Abstract: A resistive feedback network is often used to set the output voltage of a power supply. A mechanical potentiometer (pot)conveniently solves the problem of adjusting a power supply. For easier automatic calibration, a mechanical pot can be replaced witha digital pot. This application note presents a calibration solution that uses a digital pot, because digipots are smaller, do not movewith age or vibration, and can be recalibrated remotely. This proposed solution reduces the susceptibility of the system to thetolerance of the digital pot's end-to-end resistance, making the solution optimal fordesigners. This application note also explainssome of the equations required to calculate the resistor chain values and to use a digital pot in this way. A spreadsheet withstandard reisistor values is available for easy calculations.
上传时间: 2013-10-31
上传用户:caiguoqing
Handheld electronic devices play a key role in our everydaylives. Because dependability is paramount, handhelds arecarefully engineered with lightweight power sources forreliable use under normal conditions. But no amount ofcareful engineering can prevent the mistreatment theywill undergo at the hands of humans. For example, whathappens when a factory worker drops a bar code scanner,causing the battery to pop out? Such events areelectronically unpredictable, and important data storedin volatile memory would be lost without some form ofsafety net—namely a short-term power holdup systemthat stores suffi cient energy to supply standby power untilthe battery can be replaced or the data can be stored inpermanent memory.
上传时间: 2013-11-05
上传用户:coeus
/*--------- 8051内核特殊功能寄存器 -------------*/ sfr ACC = 0xE0; //累加器 sfr B = 0xF0; //B 寄存器 sfr PSW = 0xD0; //程序状态字寄存器 sbit CY = PSW^7; //进位标志位 sbit AC = PSW^6; //辅助进位标志位 sbit F0 = PSW^5; //用户标志位0 sbit RS1 = PSW^4; //工作寄存器组选择控制位 sbit RS0 = PSW^3; //工作寄存器组选择控制位 sbit OV = PSW^2; //溢出标志位 sbit F1 = PSW^1; //用户标志位1 sbit P = PSW^0; //奇偶标志位 sfr SP = 0x81; //堆栈指针寄存器 sfr DPL = 0x82; //数据指针0低字节 sfr DPH = 0x83; //数据指针0高字节 /*------------ 系统管理特殊功能寄存器 -------------*/ sfr PCON = 0x87; //电源控制寄存器 sfr AUXR = 0x8E; //辅助寄存器 sfr AUXR1 = 0xA2; //辅助寄存器1 sfr WAKE_CLKO = 0x8F; //时钟输出和唤醒控制寄存器 sfr CLK_DIV = 0x97; //时钟分频控制寄存器 sfr BUS_SPEED = 0xA1; //总线速度控制寄存器 /*----------- 中断控制特殊功能寄存器 --------------*/ sfr IE = 0xA8; //中断允许寄存器 sbit EA = IE^7; //总中断允许位 sbit ELVD = IE^6; //低电压检测中断控制位 8051
上传时间: 2013-10-30
上传用户:yxgi5