Opération de Matrices
Opération de MatriceOn considère un graphe orienté G=(S, A) qui peut être représenté selon l’une des structures suivantes : Une matrice d’adjacence. Une liste d’adjacence. Une file des successeurs. Pour chaque type de représentation, écrire les algorithmes suivants : Détermination des successeurs找出给定顶点的所有后继顶点 MatAdj123456789void somSucc1(int s, MatAdj m) { int n = m.nbSom; //顶点数量 for (int i = 0; i < n; i++) { if (m.mat[s][i] == 1) { //...
Carre et Bipartition de Graphe
图的平方(G²)定义对于一个图 G = (V, E),它的平方图 G² 是一个具有相同顶点集 V 的新图,其中: 如果 u 和 v 在原图 G 中的最短路径距离 d_G(u, v) ≤ 2,则在 G² 中添加一条边 (u, v)。 换句话说,在平方图中,原图中相邻的顶点仍然相邻,且所有原图中距离为 2 的顶点在平方图中会直接相连。 数学表示设原图 G 的邻接矩阵为 A,则平方图 G² 的邻接矩阵 A² 可以通过矩阵乘法计算:A² = A + A²其中: A 是原图的邻接矩阵,A² 计算了两步可达的顶点对。 A² 的非零元素表示原图中两步可达的顶点,它们会在平方图中直接相连。 下面分别对MatAdj和ListeAdj两种图的结构实现图的平方: MatAdj123456789101112131415161718MatAdj carre_MA(MatAdj g) { int n = g.nbSom; MatAdj g2 = allocMatAdj(n); for (int s = 0; s < n; s++) { ...
Graphe_Matrices
Matrice d‘incidence(关联矩阵)Matrice d’incidence sommets-Arcs(有向图)定义(顶点-弧的关联矩阵)在图论中,关联矩阵(Matrice d’incidence) 是一种描述图中顶点与边(或弧)之间关系的矩阵。定义: 顶点-弧关联矩阵是一个矩阵,用于表示图中每个顶点与每个弧之间的关系。对于一个有向图或无向图的每个弧,矩阵中包含表示该弧和顶点之间的关联信息。 假设图有 n 个顶点和 m 条弧(边),则顶点-弧关联矩阵是一个 n \times m 的矩阵,其中: 每一行代表一个顶点(1,2,3,4) 每一列代表一个弧(或边)(a1,a2,a3…) 结构:123456typedef struct { int nbSom; //顶点数量(矩阵行数) int nbAcs; //弧数量(矩阵列数) int **mat; //二维数组用于存矩阵数据(-1,,0,1) //TCout **cout; //二维数组用于储存权重数据}MatIncidente; Matrice...
Graphe基础知识
Graphe non orientéG = (S,A) 连通(connexité)在无向图中,顶点v到顶点w之间有路径存在,则称v和w是连通的 连通图(Graphe connexe)若图G中任意两个顶点之间都直接或间接连通,则称图G为连通图,否则为非连通图 连通分量(Composante connexe)无向图中的极大连通子图称为连通分量 Graphe orientéG = (S,A) On note l’arc (s,t)par s->t 强连通(forte connexité)在有向图中,如果有一对顶点v和w,从v到w和w到v之间都有路径,则称这两个顶点是强连通的 强连通图(Graphe forte connexité)若有向图G中任意一对顶点都是强连通的,则称图G为强连通图 强连通分量(Composante fortement connexe (CFC))有向图中的极大强连通子图称为有向图的强连通分量 ###完全图 graphe valuéG = (S,A,C) ordre d’un graphe (图的阶数)Le nombre de sommets d’un...
Micro_TP1
Rapport de Micro TP1JIN Zhuoyuan 22213816Exercice1ex1.Que contient le fichier startup_stm32f446retx.s ? Que permet-il selon vous ?Contenu :Le fichier startup_stm32f446retx.s est un fichier d’assemblage. Il contient principalement le code de démarrage pour le microcontrôleur STM32F446RETx. Il inclut la définition de la table des vecteurs d’interruption, l’initialisation de la pile, l’initialisation des segments de données (.data et .bss), l’appel à la fonction SystemInit pour configurer...
Micro_TP2
TP2 Rapport de MicroJIN Zhuoyuan 22213816Ex11.1 Op1 Op2 Type...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment





