metodo para añadir arista dirigida grafos

Technology

metodo para añadir arista dirigida grafos


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

Post a Comment

0 Comments