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

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

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

Edge.getAttribute介绍

暂无

代码示例

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

private String getLabel(Edge e, Column[] cols, GraphView view) {
  String str = "";
  if (cols != null) {
    int i = 0;
    for (Column c : cols) {
      if (i++ > 0) {
        str += " - ";
      }
      Object val = e.getAttribute(c, view);
      str += val != null ? val : "";
    }
  }
  if (str.isEmpty()) {
    str = e.getLabel();
  }
  if (str == null) {
    str = "";
  }
  return str;
}

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

@Override
  protected void refresh() {
    if (graph.getEdgeCount() > 0) {
      double minV = Double.MAX_VALUE;
      double maxV = Double.MIN_VALUE;
      for (Edge e : graph.getEdges()) {
        if (e.hasDynamicWeight()) {
          TimeMap timeMap = (TimeMap) e.getAttribute("weight");
          if (timeMap != null) {
            Double numMin = (Double) timeMap.get(graph.getView().getTimeInterval(), Estimator.MIN);
            Double numMax = (Double) timeMap.get(graph.getView().getTimeInterval(), Estimator.MAX);
            minV = Math.min(numMin, minV);
            maxV = Math.max(numMax, maxV);
          }
        } else {
          minV = Math.min(e.getWeight(), minV);
          maxV = Math.max(e.getWeight(), maxV);
        }
      }
      min = minV;
      max = maxV;
    }
  }
}

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

value = edge.getAttribute(table.getColumn(searchResult.getFoundColumnIndex()));

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

if (searchAllColumns || columnsToSearch.contains(columnIndex)) {
  column = table.getColumn(columnIndex);
  value = row.getAttribute(column);
  result = matchRegex(value, searchOptions, rowIndex, columnIndex, timeFormat, timeZone);
  if (result != null) {

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

Object value = edge.getAttribute(column);
if (value == null) {
  newEdge.removeAttribute(column);
} else {
  newEdge.setAttribute(column, edge.getAttribute(column));

相关文章