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

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

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

Graph.addVertex介绍

暂无

代码示例

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

/**
 * adds root as a root of the tree
 * @param root the initial tree root
 */
public void setRoot(V root) {
  delegate.addVertex(root);
}

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

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addVertex(java.lang.Object)
 */
public boolean addVertex(V vertex) {
  return delegate.addVertex(vertex);
}

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

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addVertex(java.lang.Object)
 */
public synchronized boolean addVertex(V vertex) {
  return delegate.addVertex(vertex);
}

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

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addVertex(java.lang.Object)
 */
@Override
public boolean addVertex(V vertex) {
  return delegate.addVertex(vertex);
}

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

/**
 * adds root as a root of the tree
 * 
 * @param root
 *            the initial tree root
 */
public void setRoot(V root) {
  delegate.addVertex(root);
}

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

/**
 * @see edu.uci.ics.jung.graph.Hypergraph#addVertex(java.lang.Object)
 */
@Override
public synchronized boolean addVertex(V vertex) {
  return delegate.addVertex(vertex);
}

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

public boolean addVertex(V vertex) {
  return graph.addVertex(vertex);
}
public boolean containsEdge(E edge) {

代码示例来源:origin: SINTEF-9012/cloudml

private void createVertice(Vertex v) {
  graph.addVertex(v);
}

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

/**
 * create some vertices
 * @param count how many to create
 * @return the Vertices in an array
 */
private void createVertices() {
  for (String city : map.keySet()) {
    graph.addVertex(city);
  }
}

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

/**
 * create some vertices
 * @param count how many to create
 * @return the Vertices in an array
 */
private Integer[] createVertices(int count) {
  Integer[] v = new Integer[count];
  for (int i = 0; i < count; i++) {
    v[i] = new Integer(i);
    graph.addVertex(v[i]);
  }
  return v;
}

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

/**
 * create some vertices
 * @param count how many to create
 * @return the Vertices in an array
 */
private Integer[] createVertices(int count) {
  Integer[] v = new Integer[count];
  for (int i = 0; i < count; i++) {
    v[i] = new Integer(i);
    graph.addVertex(v[i]);
  }
  return v;
}

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

/**
 * create some vertices
 * @param count how many to create
 * @return the Vertices in an array
 */
private Integer[] createVertices(int count) {
  Integer[] v = new Integer[count];
  for (int i = 0; i < count; i++) {
    v[i] = new Integer(i);
    graph.addVertex(v[i]);
  }
  return v;
}

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

private void initialize(Set<V> seedVertices) {
  mGraph = graphFactory.get();
  vertex_index = new ArrayList<V>(2 * init_vertices);
  index_vertex = new HashMap<V, Integer>(2 * init_vertices);
  for (int i = 0; i < init_vertices; i++) {
    V v = vertexFactory.get();
    mGraph.addVertex(v);
    vertex_index.add(v);
    index_vertex.put(v, i);
    seedVertices.add(v);
  }
  mElapsedTimeSteps = 0;
}

代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer

/**
 * Adds a vertex to the graph.
 * @param vertex The vertex.
 * @return <code>true</code> if success.
 */
public boolean addVertex(Object vertex)
{
  if (delegate.addVertex(vertex) == true) {
    internal_addVertex(vertex);
    return true;
  } else {
    return false;
  }
}

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

private void initialize(Set<V> seedVertices) {
  mGraph = graphFactory.create();
  vertex_index = new ArrayList<V>(2 * init_vertices);
  index_vertex = new HashMap<V, Integer>(2 * init_vertices);
  for (int i = 0; i < init_vertices; i++) {
    V v = vertexFactory.create();
    mGraph.addVertex(v);
    vertex_index.add(v);
    index_vertex.put(v, i);
    seedVertices.add(v);
  }
  mElapsedTimeSteps = 0;
}

代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2

private void initialize(Set<V> seedVertices) {
  
  mGraph = graphFactory.create();
  vertex_index = new ArrayList<V>(2*init_vertices);
  index_vertex = new HashMap<V, Integer>(2*init_vertices);
  for (int i = 0; i < init_vertices; i++) {
    V v = vertexFactory.create();
    mGraph.addVertex(v);
    vertex_index.add(v);
    index_vertex.put(v, i);
    seedVertices.add(v);
  }
    
  mElapsedTimeSteps = 0;
}

代码示例来源:origin: uk.gov.dstl.baleen/baleen-orderers

private Graph<AnalysisEngine, Integer> createDependencyGraph(
  List<AnalysisEngine> analysisEngines) {
 Graph<AnalysisEngine, Integer> graph = new SparseMultigraph<>();
 // First, add all annotators onto the graph
 for (AnalysisEngine ae : analysisEngines) graph.addVertex(ae);
 // Now add dependencies between annotators
 for (AnalysisEngine ae1 : analysisEngines) {
  for (AnalysisEngine ae2 : analysisEngines) {
   if (ae1 == ae2) continue;
   addAnnotatorDependencies(graph, ae1, ae2);
  }
 }
 return graph;
}

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

public void actionPerformed(ActionEvent e) {
    V newVertex = vertexFactory.get();
    graph.addVertex(newVertex);
    layout.setLocation(newVertex, vv.getRenderContext().getMultiLayerTransformer().inverseTransform(p));
    vv.repaint();
  }
});

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

public void startVertexCreate(BasicVisualizationServer<V, E> vv,
    Point2D point) {
  V newVertex = vertexFactory.get();
  Layout<V,E> layout = vv.getGraphLayout();
  Graph<V,E> graph = layout.getGraph();
  graph.addVertex(newVertex);
  layout.setLocation(newVertex, vv.getRenderContext().getMultiLayerTransformer().inverseTransform(point));
  vv.repaint();
}

代码示例来源:origin: girtel/Net2Plan

@Override
public void rebuildGraph()
{
  for (GUILink gl : new ArrayList<>(g.getEdges()))
    g.removeEdge(gl);
  for (GUINode gn : new ArrayList<>(g.getVertices()))
    g.removeVertex(gn);
  for (GUINode gn : callback.getVisualizationState().getCanvasAllGUINodes()) g.addVertex(gn);
  for (GUILink gl : callback.getVisualizationState().getCanvasAllGUILinks(true, true))
    g.addEdge(gl, gl.getOriginNode(), gl.getDestinationNode());
  updateAllVerticesXYPosition();
  refresh();
}

相关文章