com.ibm.wala.util.graph.Graph.getSuccNodeCount()方法的使用及代码示例

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

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

Graph.getSuccNodeCount介绍

暂无

代码示例

代码示例来源:origin: com.ibm.wala/com.ibm.wala.util

@Override
public int getSuccNodeCount(T N) throws IllegalArgumentException {
 return delegate.getSuccNodeCount(N);
}

代码示例来源:origin: wala/WALA

@Override
public int getSuccNodeCount(T N) throws IllegalArgumentException {
 return delegate.getSuccNodeCount(N);
}

代码示例来源:origin: wala/WALA

@Override
public int getSuccNodeCount(T N) throws IllegalArgumentException {
 return delegate.getSuccNodeCount(N);
}

代码示例来源:origin: wala/WALA

@Override
public int getSuccNodeCount(T N) throws IllegalArgumentException {
 return delegate.getSuccNodeCount(N);
}

代码示例来源:origin: wala/WALA

@Override
public boolean hasChildren(Object element) {
 return graph.getSuccNodeCount(element) > 0;
}

代码示例来源:origin: wala/WALA

@Override
public int getSuccNodeCount(T N) throws IllegalArgumentException {
 return delegate.getSuccNodeCount(N);
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.util

@Override
public int getSuccNodeCount(T N) throws IllegalArgumentException {
 return delegate.getSuccNodeCount(N);
}

代码示例来源:origin: wala/WALA

/**
 * count the number of edges in g
 */
public static <T> long countEdges(Graph<T> g) {
 if (g == null) {
  throw new IllegalArgumentException("g is null");
 }
 long edgeCount = 0;
 for (T t : g) {
  edgeCount += g.getSuccNodeCount(t);
 }
 return edgeCount;
}

代码示例来源:origin: wala/WALA

/**
 * count the number of edges in g
 */
public static <T> long countEdges(Graph<T> g) {
 if (g == null) {
  throw new IllegalArgumentException("g is null");
 }
 long edgeCount = 0;
 for (T t : g) {
  edgeCount += g.getSuccNodeCount(t);
 }
 return edgeCount;
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.util

/**
 * count the number of edges in g
 */
public static <T> long countEdges(Graph<T> g) {
 if (g == null) {
  throw new IllegalArgumentException("g is null");
 }
 long edgeCount = 0;
 for (T t : g) {
  edgeCount += g.getSuccNodeCount(t);
 }
 return edgeCount;
}

代码示例来源:origin: wala/WALA

@Override
public Object[] getChildren(Object parentElement) {
 Object[] result = new Object[graph.getSuccNodeCount(parentElement)];
 int i = 0;
 for (Object o : Iterator2Iterable.make(graph.getSuccNodes(parentElement))) {
  result[i++] = o;
 }
 return result;
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.util

private static <T> void checkEdgeCounts(Graph<T> G) throws UnsoundGraphException {
 for (T N : G) {
  int count1 = G.getSuccNodeCount(N);
  int count2 = IteratorUtil.count(G.getSuccNodes(N));
  if (count1 != count2) {
   throw new UnsoundGraphException("getSuccNodeCount " + count1 + " is wrong for node " + N);
  }
  int count3 = G.getPredNodeCount(N);
  int count4 = IteratorUtil.count(G.getPredNodes(N));
  if (count3 != count4) {
   throw new UnsoundGraphException("getPredNodeCount " + count1 + " is wrong for node " + N);
  }
 }
}

代码示例来源:origin: wala/WALA

private static <T> void checkEdgeCounts(Graph<T> G) throws UnsoundGraphException {
 for (T N : G) {
  int count1 = G.getSuccNodeCount(N);
  int count2 = IteratorUtil.count(G.getSuccNodes(N));
  if (count1 != count2) {
   throw new UnsoundGraphException("getSuccNodeCount " + count1 + " is wrong for node " + N);
  }
  int count3 = G.getPredNodeCount(N);
  int count4 = IteratorUtil.count(G.getPredNodes(N));
  if (count3 != count4) {
   throw new UnsoundGraphException("getPredNodeCount " + count1 + " is wrong for node " + N);
  }
 }
}

代码示例来源:origin: wala/WALA

private static <T> void checkEdgeCounts(Graph<T> G) throws UnsoundGraphException {
 for (T N : G) {
  int count1 = G.getSuccNodeCount(N);
  int count2 = IteratorUtil.count(G.getSuccNodes(N));
  if (count1 != count2) {
   throw new UnsoundGraphException("getSuccNodeCount " + count1 + " is wrong for node " + N);
  }
  int count3 = G.getPredNodeCount(N);
  int count4 = IteratorUtil.count(G.getPredNodes(N));
  if (count3 != count4) {
   throw new UnsoundGraphException("getPredNodeCount " + count1 + " is wrong for node " + N);
  }
 }
}

代码示例来源:origin: com.ibm.wala/com.ibm.wala.core

deletedEdges += deleted.getSuccNodeCount(node);

代码示例来源:origin: wala/WALA

deletedEdges += deleted.getSuccNodeCount(node);

代码示例来源:origin: wala/WALA

Assert.assertTrue(D.dominatorTree().getSuccNodeCount(nodes[10]) == 5);

相关文章