org.gephi.graph.api.Graph.isDirected()方法的使用及代码示例

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

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

Graph.isDirected介绍

[英]Returns true if this graph is directed.
[中]如果此图形是定向的,则返回true。

代码示例

代码示例来源:origin: org.gephi/filters-plugin

@Override
public boolean init(Graph graph) {
  return !(graph.getNodeCount() == 0 || !(graph.isDirected()));
}

代码示例来源:origin: org.gephi/filters-plugin

@Override
public boolean init(Graph graph) {
  return !(graph.getNodeCount() == 0 || !(graph.isDirected()));
}

代码示例来源:origin: org.gephi/filters-plugin

@Override
public boolean init(Graph graph) {
  return !(graph.getNodeCount() == 0 || !(graph.isDirected()));
}

代码示例来源:origin: org.gephi/statistics-plugin

public void execute(Graph graph) {
  isDirected = graph.isDirected();
  isCanceled = false;
  initializeDegreeDists();
  initializeAttributeColunms(graph.getModel());
  graph.readLock();
  try {
    avgWDegree = calculateAverageWeightedDegree(graph, isDirected, true);
  } finally {
    graph.readUnlockAll();
  }
}

代码示例来源:origin: org.gephi/statistics-plugin

public void execute(Graph graph) {
  isDirected = graph.isDirected();
  isCanceled = false;
  initializeDegreeDists();
  initializeAttributeColunms(graph.getModel());
  graph.readLock();
  try {
    avgDegree = calculateAverageDegree(graph, isDirected, true);
    graph.setAttribute(AVERAGE_DEGREE, avgDegree);
  } finally {
    graph.readUnlockAll();
  }
}

代码示例来源:origin: org.gephi/appearance-api

rankings.put(getIdStr(GraphFunction.NODE_DEGREE.getId()), new DegreeRankingImpl(graph));
if (graph.isDirected()) {
  if (!rankings.containsKey(getIdStr(GraphFunction.NODE_INDEGREE.getId()))) {
    DirectedGraph directedGraph = (DirectedGraph) graph;

代码示例来源:origin: org.gephi/preview-plugin

@Override
public Item[] getItems(Graph graph) {
  EdgeItem[] items = new EdgeItem[graph.getEdgeCount()];
  int i = 0;
  for (Edge e : graph.getEdges()) {
    EdgeItem item = new EdgeItem(e);
    item.setData(EdgeItem.WEIGHT, e.getWeight(graph.getView()));
    item.setData(EdgeItem.DIRECTED, e.isDirected());
    if (graph.isDirected(e)) {
      item.setData(EdgeItem.MUTUAL, ((DirectedGraph) graph).getMutualEdge(e) != null);
    }
    item.setData(EdgeItem.SELF_LOOP, e.isSelfLoop());
    item.setData(EdgeItem.COLOR, e.alpha() == 0 ? null : e.getColor());
    items[i++] = item;
  }
  return items;
}

相关文章