public int searchIndexGraphNode(GraphNode nodo){//searches the position of the node in the list.
        for(int i=0;i<graph_nodes.getLength();i++){
            if(nodo.equals(graph_nodes.get(i)))
                return i;
        }
        return -1;
    }