CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - 9-1 9-2
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
Compress-Decompress algrithms
STL
Data structs
Algorithm
AI-NN-PR
matlab
Bio-Recognize
Crypt_Decrypt algrithms
mathematica
Maple
DataMining
Big Data
comsol
physical calculation
chemical calculation
simulation modeling
Search - 9-1 9-2 - List
[
Data structs
]
定点运算器
DL : 0
实现二进制定点运算: 1.定点整数补码加法 2.定点整数补码减法 3.定点小数Booth补码一位乘法 4.定点小数原码一位除法(加减交替法) 5.定点小数补码一位除法(加减交替法) 6.定点小数原码一位乘法 7.定点小数原码两位乘法 8.定点整数原码乘法 9.定点整数原码除法-achieve binary fixed point operations : 1. Sentinel integral complement Adder 2. Sentinel integral complement subtraction 3. Sentinel minority Booth complement a multiplication 4. Sentinel a few original code division (Modified alternate) 5. Sentinel minority complement one division (Modified alternate) 6 . sentinel decimal multiplication an original seven yards. sentinel original code two decimal multiplication 8. sentinel integer multiplication original nine yards. sentinel Integer original code division
Date
: 2025-12-25
Size
: 351kb
User
:
陈婷
[
Data structs
]
HugeInt_C++
DL : 0
将大数看作一个n进制数组,对于目前的32位系统而言n可以取值为2的32次方,即0x10000000, 假如将一个1024位的大数转化成0x10000000进制,它就变成了32位,而每一位的取值范围就不是0-1 或0-9,而是0-0xffffffff。我们正好可以用一个无符号长整数来表示这一数值。所以1024位的大数 就是一个有32个元素的unsigned long数组。而且0x100000000进制的数组排列与2进制流对于计算机 来说,实际上是一回事,但是我们完全可以针对unsigned long数组进行“竖式计算”,而循环规模 被降低到了32次之内,并且算法很容易理解。-Will be large numbers as a n-band array, on the current 32-bit systems can n value of 2 32-th power, that is 0x10000000, if a 1024 large numbers into hexadecimal 0x10000000, it changed became 32, and each range is not 0-1 or 0-9, but 0-0xffffffff. We just can use a unsigned long integer to express this value. Therefore, large numbers of 1024 is a 32 element array of unsigned long. 0x100000000 hex array and array with 2-band flow for the computer, the fact is one thing, but we can be an array of unsigned long for a vertical calculation , and circle size was reduced to 32 times, the algorithm and it is easy to understand.
Date
: 2025-12-25
Size
: 1.77mb
User
:
杨杰
[
Data structs
]
TriMat
DL : 0
在目录“\上三角矩阵类的实现”中给定了文件triMat.cpp、triMat.h,请把triMat.h文件中的9个填空位置补上正确的代码,使triMat.cpp能完成上三角矩阵的加、减、乘运算。要求输入: 输入矩阵维数:4 输入矩阵a的元素(包括0): 1 2 3 4 0 1 2 3 0 0 1 2 0 0 0 1 输入矩阵b的元素(包括0): 1 2 3 4 0 1 2 3 0 0 1 2 0 0 0 1 -in the directory "\ triangular matrices on the achievement," given the document triMat.cpp. triMat.h invited to triMat.h documents fill up the nine positions make up the correct code, so triMat.cpp complete triangular matrix on the addition, subtraction, multiplication. Importation : input matrix dimension : a four input matrix elements (including 0) : 1 2 3 4 0 1 2 3 0 0 1 2 0 0 0 1 b of the input matrix elements (including 0) : 1 2 3 4 0 1 2 3 0 0 1 2 0 0 0 1
Date
: 2025-12-25
Size
: 572kb
User
:
李昭明
[
Data structs
]
tree
DL : 1
表达式类型的实现: 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).
Date
: 2025-12-25
Size
: 57kb
User
:
[
Data structs
]
1-2dictory
DL : 0
算法实现题2-9 排列的字典序问题 « 问题描述: n个元素{1,2, , n }有n!个不同的排列。将这n!个排列按字典序排列,并编号为0,1,…, n!-1。每个排列的编号为其字典序值。例如,当n=3时,6 个不同排列的字典序值如下: 字典序值 0 1 2 3 4 5 排列 123 132 213 231 312 321 « 编程任务: 给定n 以及n 个元素{1,2, , n }的一个排列,计算出这个排列的字典序值,以及按字 典序排列的下一个排列。-Algorithm 2-9 title sequence with the dictionary problem ?Problem Description: n elements (1,2,
Date
: 2025-12-25
Size
: 12kb
User
:
kobewylb
[
Data structs
]
jisuanqi
DL : 0
计算器程序,c++语言实现,利用栈,可执行复杂的4则运算如8-1+(2-1)*9/3,vc++6编译通过-Calculator program, c++ Language, using the stack, executable complex such as the four computing 8-1+ (2-1)* 9/3, vc++ 6 compiler through
Date
: 2025-12-25
Size
: 384kb
User
:
rbk
[
Data structs
]
BSTAVT
DL : 0
本学期所有数据结构的大作业一,设A与B分别为两个带有头结点的有序循环链表(所谓有序是指链接点按数据域值大小链接,本题不妨设按数据域值从小到大排列),list1和list2分别为指向两个链表的指针。请写出将这两个链表合并为一个带头结点的有序循环链表的算法。二,本次实验的题目为表达式求值,要求设计一个程序,演示用算符优先法对算术表达式求值的过程。 即编写程序把前缀表达式转换成后缀表达式,并计算结果。用以下三组数据测试程序: 3*(7-2); 2*(6+2*(3+6*(6+6)))+(6+6)*3+2; 8/(9-9)。三,用三元组存储稀疏矩阵,并实现稀疏矩阵的转置,两个稀疏矩阵和与积的运算四,哈夫曼编/译码器 完成Huffman 编码的译码过程。即输入一个码串,请翻译成相应的字符串。要求有编码过程和解码过程。-err
Date
: 2025-12-25
Size
: 1.54mb
User
:
张欣
[
Data structs
]
LongestIncSubSeq
DL : 0
求最长单调递增子序列。举例:原数组:1 5 1 3 1 56 21 6 86 2 1 6 5 22 1 5 9 62 1 3 56 31 1 56 3 1 1 66 3 1 6 6 3 1 6 6 1 结果: the longest monotonically increasing sub-sequence: Length: 14 Content:-Seeking the longest monotonically increasing subsequence. For example: The original array: 1 5 1,315,621,686,216,522,159 62 1 3 5,631,156,311,663,166,316 6 1 Results: the longest monotonically increasing sub- sequence: Length: 14 Content: 1 1 1 1 1 1 1 1 1 1 6 6 6 6
Date
: 2025-12-25
Size
: 51kb
User
:
陈晨
[
Data structs
]
erchashu
DL : 0
二叉树的操作 1.先序创建二叉树 2.中序递归遍历二叉树 3.先序非递归遍历二叉树 4.中序非递归遍历二叉树 5.后序非递归遍历二叉树 6.层次遍历二叉树 7.求二叉树的高度 8.求二叉树叶子数 9.退出程序-Binary operation 1. The first order to create a binary tree 2. In order recursive binary tree traversal 3. Preorder traversal non-recursive binary tree 4. In order traversal non-recursive binary tree 5. After the second order non-recursive traversal Tree 6. Level 7 traversing a binary tree. demand a high degree of binary tree 8. seek a binary tree leaf number 9. exit
Date
: 2025-12-25
Size
: 1.85mb
User
:
JIA
[
Data structs
]
sort
DL : 0
使用简单数组实现下面各种排序算法,并进行比较。 排序算法: 1、插入排序 2、希尔排序 3、冒泡排序 4、快速排序 5、简单选择排序 6、堆排序(选作) 7、归并排序(选作) 8、基数排序(选作) 9、其他 -Using a simple array to achieve the following various sorting algorithms, and compared. Sorting algorithm: 1, 2, insertion sort, Shell sort 3, 4, bubble sort, quick sort 5, 6, a simple selection sort, heap sort (selected for) 7, merge sort (selected for) 8, radix sort (chosen as) 9, other
Date
: 2025-12-25
Size
: 935kb
User
:
莫凡
[
Data structs
]
btree
DL : 0
(1)二叉树的创建操作; (2)二叉树的销毁操作; (3)二叉树的先序遍历的递归算法; (4)二叉树的中序遍历的递归算法; (5)二叉树的后序遍历的递归算法; (6)二叉树的先序遍历的非递归算法; (7)二叉树的中序遍历的非递归算法; (8)二叉树的后序遍历的非递归算法; (9)二叉树的层次遍历算法; -(1) the creation of binary operations (2) the destruction of binary operations (3) preorder traversal the binary tree the recursive algorithm (4) in the binary tree the recursive traversal algorithm (5 ) after traversing the binary tree the recursive algorithm (6) binary tree preorder traversal of the non-recursive algorithm (7) binary tree in order traversal non-recursive algorithm (8) after the binary tree order traversal non-recursive algorithm (9) the level of binary tree traversal algorithm
Date
: 2025-12-25
Size
: 201kb
User
:
不悔
[
Data structs
]
hhhhy
DL : 0
1. 实现循环双链表各种基本运算的算法,完成如下功能: (1) 初始化循环双链表h; (2) 依次采用尾插法插入a, b, c, d, e元素; (3) 输出循环双链表h; (4) 输出循环双链表h长度; (5) 判断循环双链表h是否为空; (6) 输出循环双链表h的第3个元素; (7) 输出元素a的位置; (8) 在第4个元素位置上插入f元素; (9) 输出循环双链表h; (10) 删除h的第3个元素; (11) 输出循环双链表h; (12) 释放循环双链表h。 -1. To achieve circular double-linked list of basic operations of the algorithm, complete the following functions: (1) initialize the circular doubly linked list h (2) followed by the end of interpolation into a, b, c, d, e element (3 ) circular double-linked list output h (4) the length of the output circular doubly linked list h (5) to determine whether the circular double-linked list is empty h (6) circular double-linked list output of the first three elements h (7) output elements a, location (8) in the first four elements of f elements into position (9) circular double-linked list output h (10) to delete the first three elements h (11) circular double-linked list output h (12) release cycle double-linked list h.
Date
: 2025-12-25
Size
: 260kb
User
:
赖洋洋
[
Data structs
]
Shell-Sort
DL : 0
对{9,8,7,6,5,4,3,2,1,0},采用希尔排序(Shell Sort),d=5,2,1,输出每趟排序结果。-Of {9,8,7,6,5,4,3,2,1,0}, using the shell sort (Shell Sort), d = 5,2,1, sorting out the results of each trip.
Date
: 2025-12-25
Size
: 7kb
User
:
lsy
[
Data structs
]
Heapsort
DL : 0
对{6,8,7,9,0,1,3,2,4,5},采用堆排序(Heapsort),输出每趟的建堆和排序结果。-Of {6,8,7,9,0,1,3,2,4,5}, using heap sort (Heapsort), the output of the construction of the heap for each trip and the results.
Date
: 2025-12-25
Size
: 12kb
User
:
lsy
[
Data structs
]
QuickSort
DL : 0
对{6,8,7,9,0,1,3,2,4,5},采用快速排序(Quicksort),输出每趟的排序结果。-Of {6,8,7,9,0,1,3,2,4,5}, using quick sort (Quicksort), output per trip of the results.
Date
: 2025-12-25
Size
: 8kb
User
:
lsy
[
Data structs
]
SX23
DL : 0
编写一个函数sort(int A[],int n),函数的功能是用选择法对数组进行由小到大的排序,其中n为数组A的元素个数。在主函数中输入10个数据,调用函数排序,然后输出排序好的10个数据。(输入数据:6,8,9,1,2,5,4,7,3,18)-Write a function sort (int A [], int n), the function is the function selection method for sorting an array of small to large, where n is the number of elements in the array A. In the main function of data input 10, call the function sort, and then outputs the sorted 10 data. (Input data: 6,8,9,1,2,5,4,7,3,18)
Date
: 2025-12-25
Size
: 2kb
User
:
macaihong
[
Data structs
]
DBMM
DL : 0
单表密码 定义: 1、 明表: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 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 2、 明文 they will arrive tomorrow 3、 密钥 K=Monday 4、 密码实现 1) 将明文与密钥转为数字串: K=(12,14,13,3,0,24) M=(19,7,4,24,22,8,11,11,0,17,17,8,21,4,19,14,12,14,17,17,14,22,) 2)将明文数字串依密钥长度分段,并逐一与密钥数字相加(模26),得到密文数字串。 19 7 4 24 22 8… 12 14 13 3 0 24… 5 21 17 1 22 6 C=(5,21,17,1,22,6,23,25,13,20 。。。) 3) 密文数字串转换为字母串 c=(FVRBWG XZNURG HSGRMM DFBZ) 5、 解密:模26减运算 1) C=(5,21,17,1,22,6,23,25,13,20 。。。) 2)模26减运算 5 21 17 1 22 6 — 12 14 13 3 0 24… -7 7 4 -2 22 -18 + 26 26 26 26 26 26 M=(19 7 4 24 22 8…) 3)将M转换为字符串,得到明文。 they will arrive tomorrow-Single table code
Date
: 2025-12-25
Size
: 4kb
User
:
lss
[
Data structs
]
456
DL : 0
插入一组数、时鲜用于计算素数的算法。假定我们要找出小于10的所有素数,其中共有2,3,4,5,6,7,8,9,10九个数,然后取走最小的数2并声明它就素数,然后筛掉2的倍数。重复上面的步骤直到空筛时,就可选出所有素数。-ruihiur heef bu vbuy bui buo bui bi bi bfuei buifwe buiw
Date
: 2025-12-25
Size
: 4kb
User
:
李四
[
Data structs
]
xuescjglxt
DL : 0
1、 成绩的录入:包括学生学号、姓名、性别和各门课程成绩的录入。\n" <<" 2、 成绩的查询:可以根据学号或姓名查询某个学生的成绩。\n" <<" 3、 成绩的修改:可以根据学号或姓名来修改相应的学生的成绩。\n" <<" 4、 数据的删除:可以根据学号或姓名指定删除某个学生的数据。\n" <<" 5、 成绩的统计分析:平均成绩。\n" <<" 6、 总成绩和平均成绩的查询:可以根据学号或姓名查询。\n" <<" 7、 浏览所有学生信息。\n" <<" 8、 将所有学生信息保存成文件。\n" <<" 9、 打开指定的数据文件。\n" <<" 10、 按总成绩排序输出学生信息。\n" <<" 11、 按学号顺序输出学生信息,并可保存成文件。\-1, the results of entry: the students learn number, name, gender and various courses results entry. \ N " < < " 2, the results query: according to the student number or name query the results of a student. \ N " < < " 3, modification of the results: according to the student number or name to modify the corresponding student achievement. \ N " < < " 4, data delete: delete a student' s data can be specified according to the student number or name. \ N " < < " 5, the results of statistical analysis: grade point average. \ N " < < " 6, the total score and grade point average of queries: queries based on student number or name. \ N " < < " View all student information. \ N " < < " 8, all students save files. \ N " < < " 9 to open the specified data file. \ N " < < " 10, sort output by a total score of student information. \ N " < < " 11, the output of student
Date
: 2025-12-25
Size
: 623kb
User
:
莫宇
[
Data structs
]
zhongshu
DL : 0
众数问题,半数集问题。还有算法书本2.5 2.9习题 每个问题代码均有运行时间统计代码在里面-Plural, half of the episodes. 2.5 2.9 Exercises algorithm books each code are run-time statistics code inside
Date
: 2025-12-25
Size
: 4.24mb
User
:
烽
«
1
2
3
4
5
6
7
8
9
10
»
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.