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

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

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

Graph.outDegree介绍

[英]Returns the number of outgoing edges incident to vertex. Equivalent to getOutEdges(vertex).size().
[中]返回事件到vertex的传出边缘数。相当于getOutEdges(vertex).size()

代码示例

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

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

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

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

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

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

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

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

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

public int outDegree(V vertex) {
  return graph.outDegree(vertex);
}
public boolean removeEdge(E edge) {

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

/** 
 * Returns the count of outgoing edges from the vertex.
 * @param vertex The vertex.
 * @return The outgoing degree.
 */
public int outDegree(Object vertex)
{
  return delegate.outDegree(vertex);
}

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

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

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

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

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

public Float apply(V v) {
      if (stretch) {
        return (float)(graph.inDegree(v) + 1) / 
          (graph.outDegree(v) + 1);
      } else {
        return 1.0f;
      }
    }});
}

代码示例来源:origin: iTransformers/netTransformer

public <G> void handleRightClick(JFrame parent, String v,
                 Map<String, String> graphMLParams,
                 Map<String, String> rightClickParams,
                 File projectPath,
                 File versionDir) throws Exception {
  Logger logger = Logger.getLogger(NodeStatisticsRightClickHandler.class);
  JFrame frame = new JFrame(" report for " + v + " ");
  frame.setSize(300, 200);
  frame.getContentPane().setLayout(new BorderLayout());
  JTextPane text = new JTextPane();
  text.setEditable(true);
  text.setContentType("text/html");
  StringBuilder sb = new StringBuilder();
  TopologyManagerFrame viewer = (TopologyManagerFrame) parent;
  final GraphViewerPanel viewerPanel = (GraphViewerPanel) viewer.getTabbedPane().getSelectedComponent();
  final MyVisualizationViewer vv = (MyVisualizationViewer) viewerPanel.getVisualizationViewer();
  Graph currentGraph = viewerPanel.getCurrentGraph();
  int inDegree = currentGraph.inDegree(v);
  int outDegree = currentGraph.outDegree(v);
  sb.append("Number of incoming edges: ").append(inDegree);
  sb.append("\n");
  sb.append("Number of outgoing edges: ").append(outDegree);
  text.setText(sb.toString());
  JScrollPane scrollPane = new JScrollPane(text);
  frame.getContentPane().add("Center", scrollPane);
  frame.setVisible(true);
}

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

public Double apply(VEPair<V,E> ve_pair)
  {
    V v = ve_pair.getV();
    E e = ve_pair.getE();
    if (graph.getEdgeType(e) != EdgeType.DIRECTED)
      throw new IllegalArgumentException("This Function only" +
          " operates on directed edges");
    return 1.0 / (graph.isSource(v, e) ? 
        graph.outDegree(v) : 
        graph.inDegree(v));
  }
}

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

/**
   * @see org.apache.commons.collections15.Transformer#transform(Object)
   * @throws IllegalArgumentException
   */
  public Double transform(VEPair<V,E> ve_pair)
  {
    V v = ve_pair.getV();
    E e = ve_pair.getE();
    if (graph.getEdgeType(e) != EdgeType.DIRECTED)
      throw new IllegalArgumentException("This transformer only" +
          " operates on directed edges");
    return 1.0 / (graph.isSource(v, e) ? 
        graph.outDegree(v) : 
        graph.inDegree(v));
  }
}

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

/**
   * @see org.apache.commons.collections15.Transformer#transform(Object)
   * @throws IllegalArgumentException
   */
  @Override
  public Double transform(VEPair<V, E> ve_pair) {
    V v = ve_pair.getV();
    E e = ve_pair.getE();
    if (graph.getEdgeType(e) != EdgeType.DIRECTED) {
      throw new IllegalArgumentException(
          "This transformer only" + " operates on directed edges");
    }
    return 1.0 / (graph.isSource(v, e) ? graph.outDegree(v)
        : graph.inDegree(v));
  }
}

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

/**
 * Returns the number of outgoing links for each node.
 *
 * @return Number of outgoing links per node
 */
public DoubleMatrix1D getOutNodeDegree()
{
  if (outNodeDegree == null)
  {
    Graph<Node, Link> aux_graph = getGraph_JUNG();
    
    outNodeDegree = DoubleFactory1D.dense.make (N);
    for (Node node : nodes) 
    { 
      outNodeDegree.set(node.getIndex (), aux_graph.outDegree(node));
    }
  }
  return outNodeDegree;
}

代码示例来源:origin: org.opendaylight.controller/routing.dijkstra_implementation

&& (topo.outDegree(src.getNode()) == 0)) {
log.debug("Removing vertex {}", src);
topo.removeVertex(src.getNode());
  && (topo.outDegree(dst.getNode()) == 0)) {
log.debug("Removing vertex {}", dst);
topo.removeVertex(dst.getNode());

相关文章