知识卡片

普通读书笔记卡 · 3648.b

带权图给每条边赋权

理解等级:初级

带权图为每条边关联一个权值,可记作从边集合到实数的函数 w:E→ℝ。

邻接表可把 w(u,v) 与对应邻接项一起存储;权值的业务意义由具体问题决定,不能一律解释为距离。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 第20章 基本图算法 · 查看原书依据

      Adjacency lists can also represent weighted graphs, that is, graphs for which each edge has an associated weight given by a weight function w : E → ℝ. For example, let G = (V, E) be a weighted graph with weight function w. Then you can simply store the weight w(u, v) of the edge (u, v) ∈ E with vertex v in u’s adjacency list.

    参考来源

    - 位置:《算法导论(第4版)》第20章《基本图算法》(OEBPS/chapter020.xhtml,文本字符[0,5000))。 - 结论依据:原文给出带权图定义及在邻接表中附带权值的方式。 - 原始内容:Adjacency lists can also represent weighted graphs , that is, graphs for which each edge has an associated weight given by a weight function w : E → ℝ . For example, let G = ( V , E ) be a weighted graph with weight function w . Then you can simply store the weight w ( u , v ) of the edge ( u , v ) ∈ E with vertex v in u ’s adjacency list.