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

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

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

Edge.getStoreId介绍

暂无

代码示例

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

public synchronized EdgeModel[] getEdgeModelsForEdges(Edge[] e) {
  if (e == null) {
    return null;
  }
  EdgeModel[] models = new EdgeModel[e.length];
  for (int i = 0; i < e.length; i++) {
    int storeId = e[i].getStoreId();
    models[i] = storeId < edges.length ? edges[e[i].getStoreId()] : null;
  }
  return models;
}

代码示例来源:origin: gephi/gephi-plugins-bootcamp

@Override
public boolean evaluate(Graph graph, Edge edge) {
  DirectedGraph directedGraph = (DirectedGraph) graph;
  //Make sure the edge is not  self loop
  if (!edge.isSelfLoop()) {
    //Get the potential mutual edge
    Edge mutualEdge = directedGraph.getMutualEdge(edge);
    //Remove the mutual edge if exists
    //Make sure only one of the two mutual edges will be removed
    if (mutualEdge != null && mutualEdge.getStoreId() < edge.getStoreId()) {
      return false;
    }
  }
  return true;
}

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

private void refreshDiff() {
  boolean node = AttributeUtils.isNodeColumn(column);
  columnDiff = node ? new NodeColumnDiffImpl() : new EdgeColumnDiffImpl();
  int size = bitVector.size();
  for (int i = 0; i < size; i++) {
    boolean t = bitVector.get(i);
    if (t && node) {
      if (graphStore.nodeStore.isValidIndex(i)) {
        Node n = graphStore.nodeStore.get(i);
        if (n.getStoreId() == i) {
          columnDiff.addElement(n);
        }
      }
    } else if (t && !node) {
      if (graphStore.edgeStore.isValidIndex(i)) {
        Edge e = graphStore.edgeStore.get(i);
        if (e.getStoreId() == i) {
          columnDiff.addElement(e);
        }
      }
    }
  }
  bitVector.clear();
}

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

private void refreshDiff() {
  boolean node = AttributeUtils.isNodeColumn(column);
  columnDiff = node ? new NodeColumnDiffImpl() : new EdgeColumnDiffImpl();
  int size = bitVector.size();
  for (int i = 0; i < size; i++) {
    boolean t = bitVector.get(i);
    if (t && node) {
      if (graphStore.nodeStore.isValidIndex(i)) {
        Node n = graphStore.nodeStore.get(i);
        if (n.getStoreId() == i) {
          columnDiff.addElement(n);
        }
      }
    } else if (t && !node) {
      if (graphStore.edgeStore.isValidIndex(i)) {
        Edge e = graphStore.edgeStore.get(i);
        if (e.getStoreId() == i) {
          columnDiff.addElement(e);
        }
      }
    }
  }
  bitVector.clear();
}

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

boolean t = edgeBitVector.get(e.getStoreId());
if (t && (!nodeBitVector.get(e.getSource().getStoreId()) || !nodeBitVector.get(e.getTarget()
    .getStoreId()))) {

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

boolean t = edgeBitVector.get(e.getStoreId());
if (t && (!nodeBitVector.get(e.getSource().getStoreId()) || !nodeBitVector.get(e.getTarget()
    .getStoreId()))) {

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

if (edge != null && (edge.getEdge().getStoreId() == -1 || (isView && !graph.contains(edge.getEdge())))) {
float maxWeight = Float.MIN_VALUE;
for (Edge edge : graph.getEdges()) {
  int id = edge.getStoreId();
  EdgeModel model;
  if (id >= edges.length || edges[id] == null) {

相关文章