dburyak

Graph example

Jun 28th, 2019
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.18 KB | None | 0 0
  1. class Node<N> {
  2.     N data
  3. }
  4.  
  5. class Edge<N, E> {
  6.     E data
  7.     Node<N> from
  8.     Node<N> to
  9. }
  10.  
  11. class Graph<N, E> {
  12.     Set<Node<N>> nodes
  13.     Set<Edge<N, E>> edges
  14. }
Add Comment
Please, Sign In to add comment