zoukankan      html  css  js  c++  java
  • lecture 7

    1. makefile: 定义了一系列规则指定了文件的编译顺序,以及哪些文件需要重新编译。在make指令下,整个工程将自动开始编译。如果这个工程没有编译过,那么我们的所有C文件都要编译并被链接;若只是工程中的几个文件被修改,则重新编译这几个文件并链接即可

    target...:prerequisties...
    command

    target为目标文件,可以为object file或者执行文件;prerequisities为生成target所需要的文件,command为make需要执行的命令。prerequisites如果有一个以上文件比target时间要新的话,command所定义的命令就会被执行

    2. graphs

    3. a graph with V vertices has at most V(V-1)/2 edges

    原因: (v, w) 与(w, v) 代表相同的edge (in an undirected graph)

    本身不予考虑,如(v, v)

    if E is closer to V^2, the graph is dense; if E is closer to V, the graph is sparse

    4. for an edge e that connects vertices v and w:

    v and w are adjacent (neighbours), e is incident on both v and w

    degree of a vertex v = number of edges incident on v

    vertex = node, edge = arc = link

    5. path: 一系列顶点的排序(可理解为连续的edge,从一个edge指向另一个)

    sample path: 所有vertices和edges都不同的path

    cycle:同simple一样但是第一个vertex等于最后一个vertex

    length of path or cycle: #edges

    6. connected graph: vertex与其他所有vertex之间都有path连接(若一个graph不是connected的,它有大于两个connected components)

    complete graph Kv: vertex与其他所有vertex之间都有edge(直接相连而不是通过其他点,在一个complete graph, E=V(V-1)/2)

    7. tree: 不形成cycles的connected graph

    spanning tree:包含所有vertices的tree

    clique:complete subgraph

     

    8. 

     

     

    9. graph representation

    (a) Array of edges

     

    (b) Adjacency Matrix Representation

     

    对于undirected graph可以只存储一半的数据(如(0, 1), (1, 0)的值一样)

    (c) Adjacency List Representation

     

    A[0]=<1, 3>指(0, 1), (0, 3)的值为1

    !!!

     

  • 相关阅读:
    数据库存储过程和触发器
    现在输入 n 个数字, 以逗号, 分开; 然后可选择升或者 降序排序;
    我们在 web 应用开发过程中经常遇到输出某种编码的字 符, 如 iso8859-1 等, 如何输出一个某种编码的字符串?
    Linux常用命令
    Linux系统基础优化及常用命令
    基于DBUtils实现数据库连接池、蓝图及上下文管理
    Flask基础
    01-Flask入门
    Linux基础系统优化
    Linux中 用户管理与文件权限
  • 原文地址:https://www.cnblogs.com/eleni/p/11673274.html
Copyright © 2011-2022 走看看