fr.umlv.gramofone.graphs
Class Edges

java.lang.Object
  extended by fr.umlv.gramofone.graphs.Edges
All Implemented Interfaces:
java.io.Serializable

public class Edges
extends java.lang.Object
implements java.io.Serializable

Manage all edges of a graph

Author:
fsikora
See Also:
Serialized Form

Constructor Summary
Edges()
           
 
Method Summary
 void add(Edge e)
          add an edge add (u,v) and (v,u)
 void clear()
          delete all existing edges
 boolean contains(Edge e)
          return true if the edge e exists in the grpah
 java.util.HashSet<Edge> getEdges()
          Get all edges of a graph
 java.util.Set<java.lang.Integer> neighbors(int u)
          get all the neighbors of a node u
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Edges

public Edges()
Method Detail

add

public void add(Edge e)
add an edge add (u,v) and (v,u)

Parameters:
e -

clear

public void clear()
delete all existing edges


contains

public boolean contains(Edge e)
return true if the edge e exists in the grpah

Parameters:
e -
Returns:

neighbors

public java.util.Set<java.lang.Integer> neighbors(int u)
get all the neighbors of a node u

Parameters:
u -
Returns:

getEdges

public java.util.HashSet<Edge> getEdges()
Get all edges of a graph

Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object