cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/network/topologies/BriteNetworkTopology.java
private double[][] createBwMatrix(TopologicalGraph graph, boolean directed) {
        final int nodes = graph.getNumberOfNodes();

        double[][] mtx = new double[nodes][nodes];

        // cleanup matrix
        for (int i = 0; i < nodes; i++) {
            for (int j = 0; j < nodes; j++) {
                mtx[i][j] = 0.0;
            }
        }

        for (final TopologicalLink edge : graph.getLinksList()) {
            mtx[edge.getSrcNodeID()][edge.getDestNodeID()] = edge.getLinkBw();
            if (!directed) {
                mtx[edge.getDestNodeID()][edge.getSrcNodeID()] = edge.getLinkBw();
            }
        }

        return mtx;
    }
/**
     * Creates the matrix containing the available bandwidth between every pair
     * of nodes.
     *
     * @param graph topological graph describing the topology
     * @param directed true if the graph is directed; false otherwise
     * @return the bandwidth graph
     */
Creates the matrix containing the available bandwidth between every pair
of nodes.

@param graph topological graph describing the topology
@param directed true if the graph is directed; false otherwise
@return the bandwidth graph
Creates the matrix containing the available bandwidth between every pair of nodes . @param graph topological graph describing the topology @param directed true if the graph is directed ; false otherwise @return the bandwidth graph
private double[][] createBwMatrix(TopologicalGraph graph, boolean directed) {
        final int nodes = graph.getNumberOfNodes();
        double[][] mtx = new double[nodes][nodes];
        for (int i = 0; i < nodes; i++) {
            for (int j = 0; j < nodes; j++) {
                mtx[i][j] = 0.0;
            }
        }
        for (final TopologicalLink edge : graph.getLinksList()) {
            mtx[edge.getSrcNodeID()][edge.getDestNodeID()] = edge.getLinkBw();
            if (!directed) {
                mtx[edge.getDestNodeID()][edge.getSrcNodeID()] = edge.getLinkBw();
            }
        }
        return mtx;
    }
private double [ ] [ ] createBwMatrix ( TopologicalGraph graph , boolean directed ) { final int nodes = graph . getNumberOfNodes ( ) ; double [ ] [ ] mtx = new double [ nodes ] [ nodes ] ; for ( int i = 0 ; i < nodes ; i ++ ) { for ( int j = 0 ; j < nodes ; j ++ ) { mtx [ i ] [ j ] = 0.0 ; } } for ( final TopologicalLink edge : graph . getLinksList ( ) ) { mtx [ edge . getSrcNodeID ( ) ] [ edge . getDestNodeID ( ) ] = edge . getLinkBw ( ) ; if ( ! directed ) { mtx [ edge . getDestNodeID ( ) ] [ edge . getSrcNodeID ( ) ] = edge . getLinkBw ( ) ; } } return mtx ; }
Creates the matrix containing the available bandwidth between every pair
 of nodes.
Creates the matrix containing the available bandwidth between every pair of nodes .
// cleanup matrix