edu.uci.ics.jung.graph.Graph.addEdge()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(171)

本文整理了Java中edu.uci.ics.jung.graph.Graph.addEdge()方法的一些代码示例,展示了Graph.addEdge()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.addEdge()方法的具体详情如下:
包路径:edu.uci.ics.jung.graph.Graph
类名称:Graph
方法名:addEdge

Graph.addEdge介绍

[英]Adds edge e to this graph such that it connects vertex v1 to v2. Equivalent to addEdge(e, new Pair(v1, v2)). If this graph does not contain v1, v2, or both, implementations may choose to either silently add the vertices to the graph or throw an IllegalArgumentException. If this graph assigns edge types to its edges, the edge type of e will be the default for this graph. See Hypergraph.addEdge() for a listing of possible reasons for failure.
[中]将边e添加到此图形,以便它将顶点v1连接到v2。相当于addEdge(e, new Pair(v1, v2))。如果此图不包含v1v2或两者,则实现可以选择以静默方式将顶点添加到图中或抛出IllegalArgumentException。如果此图形将边类型指定给其边,则此图形的默认边类型为e。有关失败的可能原因列表,请参见Hypergraph.addEdge()

代码示例

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Graph#addEdge(Object, Object, Object,
 *      EdgeType)
 */
@Override
public synchronized boolean addEdge(E e, V v1, V v2,
    EdgeType edgeType) {
  return delegate.addEdge(e, v1, v2, edgeType);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see Hypergraph#addEdge(Object, Collection, EdgeType)
 */
@Override
public boolean addEdge(E edge, Collection<? extends V> vertices,
    EdgeType edge_type) {
  return delegate.addEdge(edge, vertices, edge_type);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Graph#addEdge(java.lang.Object,
 *      java.lang.Object, java.lang.Object)
 */
@Override
public boolean addEdge(E e, V v1, V v2) {
  return delegate.addEdge(e, v1, v2);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Graph#addEdge(java.lang.Object,
 *      java.lang.Object, java.lang.Object,
 *      edu.uci.ics.jung.graph.util.EdgeType)
 */
@Override
public boolean addEdge(E e, V v1, V v2, EdgeType edgeType) {
  return delegate.addEdge(e, v1, v2, edgeType);
}

代码示例来源:origin: net.sf.jung/jung-api

/**
 * @see edu.uci.ics.jung.graph.Graph#addEdge(java.lang.Object, java.lang.Object, java.lang.Object)
 */
public boolean addEdge(E e, V v1, V v2) {
  return delegate.addEdge(e, v1, v2);
}

代码示例来源:origin: net.sf.jung/jung-visualization

public boolean addEdge(E edge, Collection<? extends V> vertices,
    EdgeType edgeType) {
  return graph.addEdge(edge, vertices, edgeType);
}
public boolean addEdge(E edge, Collection<? extends V> vertices) {

代码示例来源:origin: net.sf.jung/jung-api

/**
 * @see edu.uci.ics.jung.graph.Graph#addEdge(Object, Object, Object)
 */
public synchronized boolean addEdge(E e, V v1, V v2) {
  return delegate.addEdge(e, v1, v2);
}

代码示例来源:origin: net.sf.jung/jung-api

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addEdge(java.lang.Object, java.util.Collection)
 */
public synchronized boolean addEdge(E hyperedge, Collection<? extends V> vertices) {
  return delegate.addEdge(hyperedge, vertices);
}

代码示例来源:origin: net.sf.jung/jung-api

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addEdge(Object, Collection, EdgeType)
 */
public synchronized boolean addEdge(E e, Collection<? extends V> 
  vertices, EdgeType edgeType) 
{
  return delegate.addEdge(e, vertices, edgeType);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addEdge(Object, Collection,
 *      EdgeType)
 */
@Override
public synchronized boolean addEdge(E e,
    Collection<? extends V> vertices, EdgeType edgeType) {
  return delegate.addEdge(e, vertices, edgeType);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addEdge(java.lang.Object,
 *      java.util.Collection)
 */
@Override
public synchronized boolean addEdge(E hyperedge,
    Collection<? extends V> vertices) {
  return delegate.addEdge(hyperedge, vertices);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addEdge(java.lang.Object,
 *      java.util.Collection)
 */
@Override
public boolean addEdge(E edge, Collection<? extends V> vertices) {
  return delegate.addEdge(edge, vertices);
}

代码示例来源:origin: net.sf.jung/jung-api

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addEdge(java.lang.Object, java.util.Collection)
 */
public boolean addEdge(E edge, Collection<? extends V> vertices) {
  return delegate.addEdge(edge, vertices);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Graph#addEdge(Object, Object, Object)
 */
@Override
public synchronized boolean addEdge(E e, V v1, V v2) {
  return delegate.addEdge(e, v1, v2);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addEdge(java.lang.Object,
 *      java.util.Collection)
 */
@Override
public boolean addEdge(E hyperedge, Collection<? extends V> vertices) {
  return delegate.addEdge(hyperedge, vertices);
}

代码示例来源:origin: net.sf.jung/jung-api

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addEdge(java.lang.Object, java.util.Collection)
 */
public boolean addEdge(E hyperedge, Collection<? extends V> vertices) {
  return delegate.addEdge(hyperedge, vertices);
}

代码示例来源:origin: net.sf.jung/jung-graph-impl

private static void createEdge(
    Graph<String, Number> g,
    String v1Label,
    String v2Label,
    int weight) {
    g.addEdge(new Double(Math.random()), v1Label, v2Label);
}

代码示例来源:origin: net.sf.jung/jung-visualization

public void actionPerformed(ActionEvent e) {
    graph.addEdge(edgeFactory.get(),
        other, vertex);
    vv.repaint();
  }
});

代码示例来源:origin: net.sf.jung/jung-visualization

public void actionPerformed(ActionEvent e) {
    graph.addEdge(edgeFactory.get(),
        other, vertex, EdgeType.DIRECTED);
    vv.repaint();
  }
});

代码示例来源:origin: net.sf.jung/jung-visualization

public void endEdgeCreate(BasicVisualizationServer<V, E> vv, V endVertex) {
  if(startVertex != null) {
    Graph<V,E> graph = vv.getGraphLayout().getGraph();
    graph.addEdge(edgeFactory.get(), startVertex, endVertex, edgeType);
    vv.repaint();
  }
  startVertex = null;
  edgeType = EdgeType.UNDIRECTED;
  edgeEffects.endEdgeEffects(vv);
  edgeEffects.endArrowEffects(vv);
}

相关文章