A B C D E G H I L N P R S T
A
- add(Edge<V>) - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.GraphNode
-
新增一条边
- add(E) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- add(int, E) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- add(E) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
添加一个元素
- add(int, E) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- addAll(Collection<? extends E>) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- addAll(int, Collection<? extends E>) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
在指定位置,添加所有元素列表。
- addAll(Collection<? extends E>) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- addAll(int, Collection<? extends E>) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- addEdge(Edge<V>) - 接口 中的方法com.github.houbb.data.struct.core.util.graph.IDirectGraph
-
新增边
- addEdge(Edge<V>) - 类 中的方法com.github.houbb.data.struct.core.util.graph.ListDirectGraph
-
- addVertex(V) - 接口 中的方法com.github.houbb.data.struct.core.util.graph.IDirectGraph
-
新增顶点
- addVertex(V) - 类 中的方法com.github.houbb.data.struct.core.util.graph.ListDirectGraph
-
- ArrayList<E> - com.github.houbb.data.struct.core.util.list中的类
-
数组链表
(1)实现基本功能
(2)提升性能
(3)抽象基础父类
构造器是有缺陷的,因为无法区分到底是 size 还是单个元素信息。
- ArrayList() - 类 的构造器com.github.houbb.data.struct.core.util.list.ArrayList
-
无参构造器
默认大小为 8
- ArrayList(int) - 类 的构造器com.github.houbb.data.struct.core.util.list.ArrayList
-
指定大小创建对象
B
- bfs(V) - 接口 中的方法com.github.houbb.data.struct.api.IBFS
-
广度遍历
- bfs(V) - 类 中的方法com.github.houbb.data.struct.core.util.graph.ListDirectGraph
-
广度优先遍历
https://www.cnblogs.com/brucekun/p/8503042.html
队列中的元素为灰色,未访问过的为白色,已访问的为黑色。
C
- clear() - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- clear() - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- com.github.houbb.data.struct - 程序包 com.github.houbb.data.struct
-
数据结构实现
(1)jdk 默认实现
(2)额外有用的实现
- com.github.houbb.data.struct.api - 程序包 com.github.houbb.data.struct.api
-
数据结构的接口
- com.github.houbb.data.struct.core - 程序包 com.github.houbb.data.struct.core
-
核心实现:
(1)模拟 jdk 实现,最好做简化和优化。
- com.github.houbb.data.struct.core.util.graph - 程序包 com.github.houbb.data.struct.core.util.graph
-
- com.github.houbb.data.struct.core.util.graph.component - 程序包 com.github.houbb.data.struct.core.util.graph.component
-
- com.github.houbb.data.struct.core.util.list - 程序包 com.github.houbb.data.struct.core.util.list
-
- com.github.houbb.data.struct.core.util.map - 程序包 com.github.houbb.data.struct.core.util.map
-
- com.github.houbb.data.struct.core.util.queue - 程序包 com.github.houbb.data.struct.core.util.queue
-
- com.github.houbb.data.struct.core.util.stack - 程序包 com.github.houbb.data.struct.core.util.stack
-
- com.github.houbb.data.struct.util - 程序包 com.github.houbb.data.struct.util
-
- contains(Object) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- contains(Object) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
遍历整个链表,判断是否存在该元素
(1)二者不为空,且相等
(2)对象为 null,且链表中也有元素为 null
(3)如果链表为 null,直接返回 false。
- containsAll(Collection<?>) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- containsAll(Collection<?>) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
是否包含所有
(1)如果结合为 null,则认为不包含。
D
- DefaultMapEntry<K,V> - com.github.houbb.data.struct.core.util.map中的类
-
默认的 map entry
TODO: 调整为 fluent 模式。
- DefaultMapEntry() - 类 的构造器com.github.houbb.data.struct.core.util.map.DefaultMapEntry
-
- dfs(V) - 接口 中的方法com.github.houbb.data.struct.api.IDFS
-
深度遍历
深度优先搜索在搜索过程中访问某个顶点后,需要递归地访问此顶点的所有未访问过的相邻顶点。
- dfs(V) - 类 中的方法com.github.houbb.data.struct.core.util.graph.ListDirectGraph
-
E
- Edge<V> - com.github.houbb.data.struct.core.util.graph.component中的类
-
边的信息
- Edge(V, V) - 类 的构造器com.github.houbb.data.struct.core.util.graph.component.Edge
-
- EMPTY_ARRAY - 类 中的静态变量com.github.houbb.data.struct.core.util.list.Lists
-
Shared empty array instance used for empty instances.
- entrySet() - 类 中的方法com.github.houbb.data.struct.core.util.map.HashMap
-
- equals(Object) - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.Edge
-
G
- get(V) - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.GraphNode
-
获取目标边
- get(int) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- get(int) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- getEdge(int, int) - 接口 中的方法com.github.houbb.data.struct.core.util.graph.IDirectGraph
-
获取边信息
- getEdge(int, int) - 类 中的方法com.github.houbb.data.struct.core.util.graph.ListDirectGraph
-
- getEdgeSet() - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.GraphNode
-
- getFrom() - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.Edge
-
- getKey() - 类 中的方法com.github.houbb.data.struct.core.util.map.DefaultMapEntry
-
- getTo() - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.Edge
-
- getValue() - 类 中的方法com.github.houbb.data.struct.core.util.map.DefaultMapEntry
-
- getVertex() - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.GraphNode
-
- getVertex(int) - 接口 中的方法com.github.houbb.data.struct.core.util.graph.IDirectGraph
-
获取顶点
- getVertex(int) - 类 中的方法com.github.houbb.data.struct.core.util.graph.ListDirectGraph
-
- getWeight() - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.Edge
-
- GraphNode<V> - com.github.houbb.data.struct.core.util.graph.component中的类
-
完整的节点信息:
(1)顶点
(2)边
二者的集合。
- GraphNode(V) - 类 的构造器com.github.houbb.data.struct.core.util.graph.component.GraphNode
-
初始化一個節點
H
- hash(Object) - 类 中的静态方法com.github.houbb.data.struct.util.HashUtil
-
Retrieve object hash code and applies a supplemental hash function to the
result hash, which defends against poor quality hash functions.
- hashCode() - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.Edge
-
- HashMap<K,V> - com.github.houbb.data.struct.core.util.map中的类
-
自己实现的 hash map
(1)所有的 hash 值相同的元素,放在同一个桶中
(2)新增时
2.1 hash 值相同,且 equals() 的,则认为相同,使用替换。
- HashMap() - 类 的构造器com.github.houbb.data.struct.core.util.map.HashMap
-
- HashMap(int) - 类 的构造器com.github.houbb.data.struct.core.util.map.HashMap
-
初始化 hash map
- HashUtil - com.github.houbb.data.struct.util中的类
-
hash 工具类
I
- IBFS<V> - com.github.houbb.data.struct.api中的接口
-
- IDFS<V> - com.github.houbb.data.struct.api中的接口
-
- IDirectGraph<V> - com.github.houbb.data.struct.core.util.graph中的接口
-
有向图接口
对于定点+边的操作:
(1)增加
(2)删除
(3)获取
- indexFor(int, int) - 类 中的静态方法com.github.houbb.data.struct.util.HashUtil
-
Returns index for hash code h.
- indexOf(Object) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- indexOf(Object) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- isEmpty() - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- isEmpty() - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- iterator() - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- iterator() - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
L
- lastIndexOf(Object) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- lastIndexOf(Object) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- LinkedList<E> - com.github.houbb.data.struct.core.util.list中的类
-
链表
- LinkedList() - 类 的构造器com.github.houbb.data.struct.core.util.list.LinkedList
-
- ListDirectGraph<V> - com.github.houbb.data.struct.core.util.graph中的类
-
链表实现的有向图
邻接链表(Adjacency List)实现的有向图
- ListDirectGraph() - 类 的构造器com.github.houbb.data.struct.core.util.graph.ListDirectGraph
-
初始化有向图
- listIterator() - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- listIterator(int) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- listIterator() - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- listIterator(int) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- Lists - com.github.houbb.data.struct.core.util.list中的类
-
数组工具类
(1)ArrayList
(2)LinkedList
(3)CowList
(4)SkipList
N
- newArrayList(E...) - 类 中的静态方法com.github.houbb.data.struct.core.util.list.Lists
-
创建 arrayList
P
- put(K, V) - 类 中的方法com.github.houbb.data.struct.core.util.map.HashMap
-
存储一个值
- putAll(Map<? extends K, ? extends V>) - 类 中的方法com.github.houbb.data.struct.core.util.map.HashMap
-
批量添加,为了避免多次 rehash 可以首先扩容完成后,在进行相关元素的存储。
R
- remove(V) - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.GraphNode
-
获取目标边
- remove(Object) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- remove(int) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- remove(Object) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
移除一个元素
整体流程:从头开始遍历,对比二者的内容是否相同。
- remove(int) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
移除指定位置的元素
- removeAll(Collection<?>) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
移除集合所有信息
(1)批量删除,避免多次合并集合。
- removeAll(Collection<?>) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- removeEdge(Edge<V>) - 接口 中的方法com.github.houbb.data.struct.core.util.graph.IDirectGraph
-
移除边
- removeEdge(Edge<V>) - 类 中的方法com.github.houbb.data.struct.core.util.graph.ListDirectGraph
-
- removeVertex(V) - 接口 中的方法com.github.houbb.data.struct.core.util.graph.IDirectGraph
-
删除顶点
- removeVertex(V) - 类 中的方法com.github.houbb.data.struct.core.util.graph.ListDirectGraph
-
- retainAll(Collection<?>) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
返回两个集合的公共部分。
- retainAll(Collection<?>) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
S
- set(int, E) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- set(int, E) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- setFrom(V) - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.Edge
-
- setKey(K) - 类 中的方法com.github.houbb.data.struct.core.util.map.DefaultMapEntry
-
- setTo(V) - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.Edge
-
- setValue(V) - 类 中的方法com.github.houbb.data.struct.core.util.map.DefaultMapEntry
-
- setWeight(double) - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.Edge
-
- size() - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- size() - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- subList(int, int) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
截取整个列表
这个列表和 jdk 内置的不同,是属于一份拷贝。
- subList(int, int) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
T
- toArray() - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
- toArray(T[]) - 类 中的方法com.github.houbb.data.struct.core.util.list.ArrayList
-
将当前 list 的元素返回到入参数组中。
- toArray() - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- toArray(T[]) - 类 中的方法com.github.houbb.data.struct.core.util.list.LinkedList
-
- toString() - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.Edge
-
- toString() - 类 中的方法com.github.houbb.data.struct.core.util.graph.component.GraphNode
-
A B C D E G H I L N P R S T
Copyright © 2020. All rights reserved.