edu.uci.ics.jung.graph.Graph.isDest()方法的使用及代码示例

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

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

Graph.isDest介绍

[英]Returns true if vertex is the destination of edge. Equivalent to getDest(edge).equals(vertex).
[中]如果vertexedge的目标,则返回true。相当于getDest(edge).equals(vertex)

代码示例

代码示例来源:origin: net.sf.jung/jung-api

/**
 * @see edu.uci.ics.jung.graph.Graph#isDest(java.lang.Object, java.lang.Object)
 */
public synchronized boolean isDest(V vertex, E edge) {
  return delegate.isDest(vertex, edge);
}

代码示例来源:origin: net.sf.jung/jung-api

/**
 * @see edu.uci.ics.jung.graph.Graph#isDest(java.lang.Object, java.lang.Object)
 */
public boolean isDest(V vertex, E edge) {
  return delegate.isDest(vertex, edge);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Graph#isDest(java.lang.Object,
 *      java.lang.Object)
 */
@Override
public boolean isDest(V vertex, E edge) {
  return delegate.isDest(vertex, edge);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Graph#isDest(java.lang.Object,
 *      java.lang.Object)
 */
@Override
public boolean isDest(V vertex, E edge) {
  return delegate.isDest(vertex, edge);
}

代码示例来源:origin: net.sf.jung/jung-api

/**
 * @see edu.uci.ics.jung.graph.Graph#isDest(java.lang.Object, java.lang.Object)
 */
public boolean isDest(V vertex, E edge) {
  return delegate.isDest(vertex, edge);
}

代码示例来源:origin: geogebra/geogebra

/**
 * @see edu.uci.ics.jung.graph.Graph#isDest(java.lang.Object,
 *      java.lang.Object)
 */
@Override
public synchronized boolean isDest(V vertex, E edge) {
  return delegate.isDest(vertex, edge);
}

代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer

/**
 * Returns <code>true</code> if the vertex is the destination of the edge.
 * @param vertex The vertex.
 * @param edge The edge.
 * @return <code>true</code> if the vertex is the destination.
 */
public boolean isDest(Object vertex, Object edge)
{
  return delegate.isDest(vertex, edge);
}

代码示例来源:origin: net.sf.jung/jung-visualization

public boolean isDest(V vertex, E edge) {
  return graph.isDest(vertex, edge);
}
public boolean isIncident(V vertex, E edge) {

代码示例来源:origin: girtel/Net2Plan

private static <V, E> void validatePath(Graph<V, E> graph, V source, V target, List<E> path)
{
  if (!graph.isSource(source, path.get(0))) throw new RuntimeException("Bad - Source node is not the first node in the path");
  Iterator<E> it = path.iterator();
  E originVertex = it.next();
  while (it.hasNext())
  {
    E destinationVertex = it.next();
    if (!graph.isSource(graph.getDest(originVertex), destinationVertex)) throw new RuntimeException("Bad - Path is not contiguous");
    originVertex = destinationVertex;
  }
  if (!graph.isDest(target, path.get(path.size() - 1))) throw new RuntimeException("Bad - ");
}

代码示例来源:origin: girtel/Net2Plan

private List<E> recombinePaths(List<E> path, V target, List<E> union)
{
  LinkedList<E> p = new LinkedList<E>(); /* provides getLast */
  p.add(path.get(0));
  union.remove(path.get(0));
  V curDest;
  while (!(curDest = graph.getDest(p.getLast())).equals(target))
  {
    boolean progress = false;
    for (E e : union)
    {
      if (graph.isSource(curDest, e))
      {
        p.add(e);
        progress = true;
        union.remove(e);
        break;
      }
    }
    if (!progress) return null;
    if (union.isEmpty())
    {
      if (!graph.isDest(target, p.getLast()))
        throw new RuntimeException("Bad");
      else
        break;
    }
  }
  return p;
}

代码示例来源:origin: org.opendaylight.nic/of-renderer

private void discardCommonReversedEdges(final Graph<V,E> graph, final List<E> path1, final List<E> path2) {
  if (path1.size() == 0 || path2.size() == 0){
    return;
  } else {
    final V source = graph.getSource(path1.get(0));
    final V target = graph.getDest(path1.get(path1.size() - 1));
    for(final E edge2 : path2){
      for(final E edge1 : path1){
        if (edge1.equals(edge2)){
          if (graph.isSource(source, edge1) ||
              graph.isSource(source, edge2) ||
              graph.isDest(target, edge1) ||
              graph.isDest(target, edge2)){
            // Return only shortest path
            path2.clear();
            return;
          }
          path1.remove(edge1);
          path2.remove(edge2);
          break;
        }
      }
    }
  }
}

代码示例来源:origin: girtel/Net2Plan

if (graph.isSource(source, e1) || graph.isSource(source, e2) || graph.isDest(target, e1) || graph.isDest(target, e2)) return null;

相关文章