• Verilog

    Verilog Syntax整数数值表示方法数字声明时,合法的基数格式有 4 中,包括:十进制(‘d 或 ‘D),十六进制(‘h 或 ‘H),二进制(’b 或 ‘B),八进制(’o 或 ‘O)。数值可指明位宽,也可不指明位宽。 12345678910111213141516171819// BINARY representations3'b010; // size=3 bits, ...
  • Chapter 11 - Sorting (2)

    Chapter 11 - Sorting (2)

    定义 注意 补充、解释 其他 1 Quick Sort快速排序的核心是分而治之,步骤如下: 选主元(Pivot):从数组中任选一个元素作为基准值 划分(Partition):将数组拆分为两部分 —— 左边所有元素≤主元,右边所有元素≥主元 递归排序:分别递归排序左右两个子数组 合并:左右子数组有序后,自然与主元拼接成完整有序数组 123456void Quicksort(Element...
  • Chapter 9 - Relations

    定义 注意 补充、解释 其他 1 Relations and Their PropertiesDefinitionA binary relation $R$ from a set $A$ to a set $B$ is a subset of $A\times B$. 例如,从A到B的函数f的图像就是一个从A到B的关系A={1,0,-1}, B={0,1}R...
  • Chapter 4 - Sequential Circuits

    Chapter 4 - Sequential Circuits

    1 Sequential Circuit DefinitionA circuit whose output depends not only on the present input but also on the history of the input iscalled a sequential circuit. Figure 4-1(a) is block diagram of a s...
  • Chapter 11 - Sorting (1)

    Chapter 11 - Sorting (1)

    定义 注意 补充、解释 其他 1 Preliminaries12345678void X_Sort(ElementType A[], int N){ //...}/*N是整数存在> <,而且是唯一允许的对输入数据的操作(比较排序)*/ 2 Insertion Sort想象你抽扑克牌你先抽到8,当然,拿在手里接着抽到K,没问题,在8右边抽到9,放到8和...
  • Chapter 10 - DFS & BFS

    Chapter 10 - DFS & BFS

    定义 注意 补充、解释 其他 1 Depth-First Search and Breadth-First Search 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727...
  • Chapter 9 - Network Flow & MST

    Chapter 9 - Network Flow & MST

    定义 注意 补充、解释 其他 1 Network Flow Problem从s到t,有若干管道,每个管道的数字代表每秒流过的最大容量,如果每秒有5立方米的水从s流出,每秒从s到t流过的最大量是多少(不考虑水流经管道的时间)?左边流出3,这个3在a处流一份到d,这样总共就能流出5,最大 一个简单的算法如图所示,每次找到一条从s到t的路径(不能有环)(增广路径 augmenting path)...
  • Chapter 8 - Graph-Shortest Paths

    Chapter 8 - Graph-Shortest Paths

    定义 注意 补充、解释 其他 1 Shortest Paths如果图中存在负权环(环上所有边的代价之和为负数),则最短路径不存在 —— 因为可以绕环无限次,让路径长度无限减小。若图中无负权环,定义源点到自身的最短路径长度为 0。 1234567891011121314151617181920void Unweighted(Table T) { int CurrDist; ...
  • Chapter 3 - Algorithms

    1 AlgorithmsAn algorithm is a finite set of precise instructions for performing a computation or for solving a problem. Example: Can we develop a procedure that takes as input a computer program a...
  • 2026五一假期

    春学期真的是很忙啊啊,夏学期估计更忙……所以都没怎么写了,这个五一假期稍微写下,看要做些啥吧 5.2 微积分 学习 微积分 作业 复习大物(补充知识点) 大物历年卷 离散笔记 随便学点
1234