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

x33g5p2x  于2022-01-19 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(187)

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

Edge.isDirected介绍

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

代码示例

代码示例来源:origin: org.gephi/graphstore

@Override
public boolean isDirected(Edge edge) {
  return edge.isDirected();
}

代码示例来源:origin: gephi/graphstore

@Override
public boolean isDirected(Edge edge) {
  return edge.isDirected();
}

代码示例来源:origin: org.gephi/graphstore

@Override
public boolean isDirected(final Edge edge) {
  return edge.isDirected();
}

代码示例来源:origin: gephi/graphstore

@Override
public boolean isDirected(final Edge edge) {
  return edge.isDirected();
}

代码示例来源:origin: org.gephi/desktop-datalab

@Override
  public Object getValueFor(Edge edge) {
    if (edge.isDirected()) {
      return NbBundle.getMessage(EdgesDataTable.class, "EdgeDataTable.type.column.directed");
    } else {
      return NbBundle.getMessage(EdgesDataTable.class, "EdgeDataTable.type.column.undirected");
    }
  }
};

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

@Override
public boolean evaluate(Graph graph, Edge edge) {
  if(edge.isDirected()) {
    DirectedGraph directedGraph = (DirectedGraph)graph;
    return directedGraph.getMutualEdge(edge) != null;
  }
  return false;
}

代码示例来源:origin: org.gephi/graphstore

@Override
public boolean addAllEdges(Collection<? extends Edge> edges) {
  for (Edge edge : edges) {
    if (edge.isDirected()) {
      throw new IllegalArgumentException("Can't add a directed edge to an undirected graph");
    }
  }
  return store.addAllEdges(edges);
}

代码示例来源:origin: gephi/graphstore

@Override
public boolean addEdge(Edge edge) {
  if (edge.isDirected()) {
    throw new IllegalArgumentException("Can't add a directed edge to an undirected graph");
  }
  return store.addEdge(edge);
}

代码示例来源:origin: gephi/graphstore

@Override
public boolean addAllEdges(Collection<? extends Edge> edges) {
  for (Edge edge : edges) {
    if (edge.isDirected()) {
      throw new IllegalArgumentException("Can't add a directed edge to an undirected graph");
    }
  }
  return store.addAllEdges(edges);
}

代码示例来源:origin: org.gephi/graphstore

@Override
public boolean addEdge(Edge edge) {
  if (edge.isDirected()) {
    throw new IllegalArgumentException("Can't add a directed edge to an undirected graph");
  }
  return store.addEdge(edge);
}

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

@Override
public void execute() {
  GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
  Graph graph = Lookup.getDefault().lookup(GraphController.class).getGraphModel().getGraph();
  
  List<Edge> edges = new ArrayList<>();
  for (Edge edge : graph.getEdges().toArray()) {
    if (edge.isDirected()) {
      if(deleteDirected){
        edges.add(edge);
      }
    }else if (deleteUndirected) {
      edges.add(edge);
    }
  }
  
  gec.deleteEdges(edges.toArray(new Edge[0]));
}

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

if (edge.isDirected() != directed) {
  sameEdgeDefinition = false;
} else {
        id,
        source.getId(), target.getId(), directed,
        edge.getSource().getId(), edge.getTarget().getId(), edge.isDirected()
if (edge != null && edge.isDirected() != directed) {

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

newEdge = createEdge(newEdgeSource, newEdgeTarget, edge.isDirected(), edge.getTypeLabel(), 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;
}

代码示例来源:origin: org.gephi/visualization

for (Iterator<EdgeModel> itr = octree.getEdgeIterator(); itr.hasNext();) {
  EdgeModel obj = itr.next();
  if (obj.getEdge().isDirected() && obj.markTime != markTime) {
    obj.displayArrow(gl, glu, vizModel);
    obj.markTime = markTime;

代码示例来源:origin: org.gephi/visualization

if (edge.isDirected()) {
  x = (objectModel.getSourceModel().getNode().x() + 2 * objectModel.getTargetModel().getNode().x()) / 3f;
  y = (objectModel.getSourceModel().getNode().y() + 2 * objectModel.getTargetModel().getNode().y()) / 3f;

代码示例来源:origin: org.gephi/visualization

b = uni[2];
  a = uni[3];
} else if (edge.isDirected()) {
  Node source = edge.getSource();
  r = source.r();

相关文章