无向图的邻接矩阵

package com.answer.tu;

public class MatrixDG {//无向图的邻接矩阵
    private char[] mVexs;//顶点集合
    private int[][] mMatrix;//矩阵
    public MatrixDG(char[] vexs, char[][] edges){//顶点数组,边数组
        int vlen=vexs.length;
        int elen=edges.length;
        mVexs=new char[vlen];
        for(int i=0;i

 

你可能感兴趣的:(数据结构)