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

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

本文整理了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

  1. private String getLabel(Edge e, Column[] cols, GraphView view) {
  2. String str = "";
  3. if (cols != null) {
  4. int i = 0;
  5. for (Column c : cols) {
  6. if (i++ > 0) {
  7. str += " - ";
  8. }
  9. Object val = e.getAttribute(c, view);
  10. str += val != null ? val : "";
  11. }
  12. }
  13. if (str.isEmpty()) {
  14. str = e.getLabel();
  15. }
  16. if (str == null) {
  17. str = "";
  18. }
  19. return str;
  20. }

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

  1. @Override
  2. protected void refresh() {
  3. if (graph.getEdgeCount() > 0) {
  4. double minV = Double.MAX_VALUE;
  5. double maxV = Double.MIN_VALUE;
  6. for (Edge e : graph.getEdges()) {
  7. if (e.hasDynamicWeight()) {
  8. TimeMap timeMap = (TimeMap) e.getAttribute("weight");
  9. if (timeMap != null) {
  10. Double numMin = (Double) timeMap.get(graph.getView().getTimeInterval(), Estimator.MIN);
  11. Double numMax = (Double) timeMap.get(graph.getView().getTimeInterval(), Estimator.MAX);
  12. minV = Math.min(numMin, minV);
  13. maxV = Math.max(numMax, maxV);
  14. }
  15. } else {
  16. minV = Math.min(e.getWeight(), minV);
  17. maxV = Math.max(e.getWeight(), maxV);
  18. }
  19. }
  20. min = minV;
  21. max = maxV;
  22. }
  23. }
  24. }

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

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

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

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

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

  1. Object value = edge.getAttribute(column);
  2. if (value == null) {
  3. newEdge.removeAttribute(column);
  4. } else {
  5. newEdge.setAttribute(column, edge.getAttribute(column));

相关文章