title: scala: directed and undirected edges of Graphs
body: <p>If a directed Edge is implemented something like:</p>
  
  <pre><code>class EdgeImpl(origin: Node, dest: Node) {
      def from = origin
      def to = dest
    }
  </code></pre>
  
  <p>then which is the difference for implementing an <code>undirected Edge</code> while when we create a new <code>Edge</code> we also have to say in both cases: <code>new EdgeImpl(node1, node2)</code>? I do not get the difference in implementation :( </p>
  
  <h2>Edit</h2>
  
  <p>I was analyzing, more concretely, this <a href="http://docs.scala-lang.org/tutorials/tour/explicitly-typed-self-references.html" rel="nofollow">example</a> </p>