A graph G = (V, E) consists of a set V of vertices and a set E edges, that is, unordered pairs Of vertices. Unless explicitly stated otherwise, we assume that the graph Is simple, that Is, it has no multiple edges And no self-loops. (使用迭代器来访问这个图之中的边连接的集合)
Graph
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| QueryEdge | 1 | query edges by directed node tuple. |
| GetEdgeByID | 1 | get a edge object by its unique reference id |
| GetConnectedVertex | 1 | 返回所有至少具有一条边连接的节点的集合 |
| AddVertex | 2 | Vertex.label should contains its index value before this method was called. |
| ExistVertex | 1 | 通过Vertex.label作为主键进行查询目标节点是否存在于当前的图对象之中 |
| ExistEdge | 2 | query edge item exists or not by edge id |
| GetEdge | 1 | get direct edge link |
| Insert | 1 | just add edges |
| AddEdges | 1 | 这个函数使用起来比较方便,但是要求节点都必须要存在于列表之中 |
| AddEdge | 1 | u and v is the property Vertex.label |
| CreateEdge | 1 | 这个函数仅仅是使用图对象中的node数据来创建edge对象,并不会添加edge到图中的edge列表中 |
| Delete | 2 | 只会删除边,并不会删除节点U和V |
| GetEnumerator | 1 | 因为图的主要关注点是放在节点对象的相互关系之上,所以在这里图对象是表现为一个边连接的集合 |
| Add | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| size | 1 | [numof(vertex), numof(edges)] |
| vertex | 1 | 这个图之中的所有的节点的集合. 请注意,这个只读属性是一个枚举集合, 所以为了减少性能上的损失,不可以过多的使用下标来访问集合元素 |
| graphEdges | 1 | get the enumeration of the internal edge list data. |
04 Fields
05 Members
String, String)query edges by directed node tuple.
| Name | Type | Description |
|---|---|---|
from | String | - |
returns nothing if target node is not exists in the index
String)get a edge object by its unique reference id
| Name | Type | Description |
|---|---|---|
id | String | - |
返回所有至少具有一条边连接的节点的集合
`0)Vertex.label should contains its index value before this method was called. (如果已经存在目标ID的节点,则无操作)
the input node vertex u must have the Vertex.ID index value assigned before calling this function for add into the current graph object.
| Name | Type | Description |
|---|---|---|
u | `0 | - |
String)假若目标label已经存在于顶点列表Graph.vertices之中, 那么将不会添加新的节点而是直接返回原来已经存在的节点
| Name | Type | Description |
|---|---|---|
label$ | String | - |
String)通过Vertex.label作为主键进行查询目标节点是否存在于当前的图对象之中
| Name | Type | Description |
|---|---|---|
name | String |
String, String)query edge item exists or not by edge id
| Name | Type | Description |
|---|---|---|
u | String | - |
`1)query edge item exists or not by edge id
| Name | Type | Description |
|---|---|---|
edge | `1 | - |
`0, `0)get direct edge link
| Name | Type | Description |
|---|---|---|
u | `0 | - |
v | `0 | - |
`1)just add edges
| Name | Type | Description |
|---|---|---|
edge | `1 | vertex nodes in this given edge object will be added into the graph if not exists. |
String, String())这个函数使用起来比较方便,但是要求节点都必须要存在于列表之中
| Name | Type | Description |
|---|---|---|
src | String | - |
targets | String() | a collection of the target vertex id |
String, String, Double)u and v is the property [Vertex.label](cref:P:Microsoft.VisualBasic.Data.GraphTheory.Vertex.label)
| Name | Type | Description |
|---|---|---|
u | String | - |
v | String | - |
weight | Double | - |
String, String, Double)这个函数仅仅是使用图对象中的node数据来创建edge对象,并不会添加edge到图中的edge列表中
| Name | Type | Description |
|---|---|---|
u$ | String | - |
v$ | String | - |
weight# | Double | - |
`0, `0)只会删除边,并不会删除节点U和V
| Name | Type | Description |
|---|---|---|
U | `0 | - |
V | `0 | - |
因为图的主要关注点是放在节点对象的相互关系之上,所以在这里图对象是表现为一个边连接的集合
[numof(vertex), numof(edges)]
这个图之中的所有的节点的集合. 请注意,这个只读属性是一个枚举集合, 所以为了减少性能上的损失,不可以过多的使用下标来访问集合元素
get the enumeration of the internal edge list data. (获取得到这个图中的所有的节点的边的集合,请注意, 这个只读属性是一个枚举集合,所以为了减少性能上的损失, 不可以过多的使用下标来访问集合元素.)
因为在这里使用了一个SortedDictionary来进行 存储,所以这个属性所返回的网络边连接的顺序与添加的时候的顺序会不一致
directed edge index
Graph.vertices和Graph.buffer哈希表分别使用了两种属性来对节点进行索引的建立:
- Graph.vertices使用Vertex.label来建立字符串索引
- Graph.buffer使用Vertex.ID来建立指针的索引
Visit nodes directly by index number
ValueTuple(Of String, String))