metodo para añadir una arista no dirigida

Technology

metodo para añadir una arista no dirigida


public boolean addAristaNoDirigido(Vertice origen,
Vertice destino, int peso) {
if (vertices.size() > 1) {
if (origen != null && destino!=null) {
origen.getAristas().add(new Arista(destino,
peso));
destino.getAristas().add(new Arista(origen,
peso));
return true;
}
return false;
}
return false;
}

Post a Comment

0 Comments