コード例 #1
0
  /*
   * (non-Javadoc)
   * @see de.hpi.bpt.hypergraph.abs.IDirectedHyperGraph#addEdge(java.util.Collection, java.util.Collection)
   */
  @SuppressWarnings("unchecked")
  public E addEdge(Collection<V> ss, Collection<V> ts) {
    if (ss == null || ts == null) return null;

    E e = (E) new AbstractDirectedHyperEdge<V>(this);
    e.addSourceAndTagetVertices(ss, ts);
    return e;
  }
コード例 #2
0
  /*
   * (non-Javadoc)
   * @see de.hpi.bpt.hypergraph.abs.IDirectedHyperGraph#addEdge(de.hpi.bpt.hypergraph.abs.IVertex, de.hpi.bpt.hypergraph.abs.IVertex)
   */
  @SuppressWarnings("unchecked")
  public E addEdge(V s, V t) {
    if (s == null || t == null) return null;

    E e = (E) new AbstractDirectedHyperEdge<V>(this);
    Collection<V> ss = new ArrayList<V>();
    ss.add(s);
    Collection<V> ts = new ArrayList<V>();
    ts.add(t);
    e.addSourceAndTagetVertices(ss, ts);
    return e;
  }