Figure-topological-sort
代码说明:
说明: 拓扑排序 对一个 有向无环图 G进行拓扑排序,是将G中所有顶点排成一个线性序列,使得图中任 意一对顶点u和v,若u,v ∈E,则u在线性序列中出现在v之前。 通常,这样的线性序列称为满足拓扑次序的序列,简称 拓扑序列 。 注意: ①若将图中顶点按拓扑次序排成一行,则图中所有的有向边均是从左指向右的。 ②若图中存在有向环,则不可能使顶点满足拓扑次序。 ③一个DAG的拓扑序列通常表示某种方案切实可行。 (Topological sort In a directed acyclic graph G topological sort, is all vertices will G formed a linear sequence, make diagram post Meaning a pair of vertex u and v, if u, v ∈ E, then u in linear sequence in which they appear in v before. Usually, such linear sequence sequence of topological order called meet, abbreviation topology sequence. Note: (1) if the diagram according to the topology order line vertices, then figure all from left to right edge are pointing. (2) if the figure to exist in the ring, is impossible to have the vertex meet topological sequence. (3) a DAG topological sequence usually expressed some scheme is feasible. )
下载说明:请别用迅雷下载,失败请重下,重下不扣分!