cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/network/topologies/readers/TopologyReaderBrite.java
private void parseNodeString(String nodeLine) {
        // first test to step to the next parsing-state (edges)
        if (nodeLine.contains("Edges:")) {
            state = PARSE_EDGES;
            return;
        }

        // List of fields in the line to parse
        // NodeID, xpos, ypos, inDegree, outDegree, AS_id, type(router/AS)
        final Integer[] parsedFields = {0, 0, 0};
        if(!parseLine(nodeLine, parsedFields, Integer::valueOf)){
            return;
        }

        final Point2D coordinates = new Point2D(parsedFields[1], parsedFields[2]);
        final TopologicalNode topoNode = new TopologicalNode(parsedFields[0], coordinates);
        graph.addNode(topoNode);
    }
/**
     * Parses nodes inside a line from the BRITE file.
     *
     * @param nodeLine A line read from the file
     */
Parses nodes inside a line from the BRITE file.
@param nodeLine A line read from the file
Parses nodes inside a line from the BRITE file . @param nodeLine A line read from the file
private void parseNodeString(String nodeLine) {
        if (nodeLine.contains("Edges:")) {
            state = PARSE_EDGES;
            return;
        }
        final Integer[] parsedFields = {0, 0, 0};
        if(!parseLine(nodeLine, parsedFields, Integer::valueOf)){
            return;
        }
        final Point2D coordinates = new Point2D(parsedFields[1], parsedFields[2]);
        final TopologicalNode topoNode = new TopologicalNode(parsedFields[0], coordinates);
        graph.addNode(topoNode);
    }
private void parseNodeString ( String nodeLine ) { if ( nodeLine . contains ( "Edges:" ) ) { state = PARSE_EDGES ; return ; } final Integer [ ] parsedFields = { 0 , 0 , 0 } ; if ( ! parseLine ( nodeLine , parsedFields , Integer :: valueOf ) ) { return ; } final Point2D coordinates = new Point2D ( parsedFields [ 1 ] , parsedFields [ 2 ] ) ; final TopologicalNode topoNode = new TopologicalNode ( parsedFields [ 0 ] , coordinates ) ; graph . addNode ( topoNode ) ; }
Parses nodes inside a line from the BRITE file.
Parses nodes inside a line from the BRITE file .
// first test to step to the next parsing-state (edges) // List of fields in the line to parse // NodeID, xpos, ypos, inDegree, outDegree, AS_id, type(router/AS)