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

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

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

Graph.getEndpoints介绍

[英]Returns the endpoints of edge as a Pair.
[中]将edge的端点作为Pair返回。

代码示例

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

/**
 * @see edu.uci.ics.jung.graph.Graph#getEndpoints(java.lang.Object)
 */
@Override
public synchronized Pair<V> getEndpoints(E edge) {
  return delegate.getEndpoints(edge);
}

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

/**
 * @see edu.uci.ics.jung.graph.Graph#getEndpoints(java.lang.Object)
 */
public Pair<V> getEndpoints(E edge) {
  return delegate.getEndpoints(edge);
}

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

/**
 * @see edu.uci.ics.jung.graph.Graph#getEndpoints(java.lang.Object)
 */
public Pair<V> getEndpoints(E edge) {
  return delegate.getEndpoints(edge);
}

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

/**
 * Returns the endpoints of the edge.
 * @param edge The edge.
 * @return The endpoints.
 */
public Pair getEndpoints(Object edge)
{
  return delegate.getEndpoints(edge);
}

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

/**
 * @see edu.uci.ics.jung.graph.Graph#getEndpoints(java.lang.Object)
 */
@Override
public Pair<V> getEndpoints(E edge) {
  return delegate.getEndpoints(edge);
}

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

/**
 * @see edu.uci.ics.jung.graph.Graph#getEndpoints(java.lang.Object)
 */
public synchronized Pair<V> getEndpoints(E edge) {
  return delegate.getEndpoints(edge);
}

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

/**
 * @see edu.uci.ics.jung.graph.Graph#getEndpoints(java.lang.Object)
 */
@Override
public Pair<V> getEndpoints(E edge) {
  return delegate.getEndpoints(edge);
}

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

public Pair<V> getEndpoints(E edge) {
  return graph.getEndpoints(edge);
}
public int getIncidentCount(E edge) {

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

private Shape getLoopOrNull(E e, Function<? super E, Shape> loop) {
  Pair<V> endpoints = graph.getEndpoints(e);
  checkNotNull(endpoints);
  boolean isLoop = endpoints.getFirst().equals(endpoints.getSecond());
  if (isLoop) {
    return loop.apply(e);
  }
  return null;
}

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

boolean isBlessed( Number e ) {
  Pair<String> endpoints = mGraph.getEndpoints(e);
  String v1= endpoints.getFirst()    ;
  String v2= endpoints.getSecond() ;
  return v1.equals(v2) == false && mPred.contains(v1) && mPred.contains(v2);
}

代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2

public boolean evaluate(Context<Graph<V,E>,E> context) {
    Pair<V> endpoints = context.graph.getEndpoints(context.element);
    return endpoints.getFirst().equals(endpoints.getSecond());
  }
}

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

@Override
  public boolean evaluate(Context<Graph<V, E>, E> context) {
    Pair<V> endpoints = context.graph.getEndpoints(context.element);
    return endpoints.getFirst().equals(endpoints.getSecond());
  }
}

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

public boolean apply(Context<Graph<V,E>,E> context) {
    Pair<V> endpoints = context.graph.getEndpoints(context.element);
    return endpoints.getFirst().equals(endpoints.getSecond());
  }
}

代码示例来源:origin: iTransformers/netTransformer

@Override
  public String transform(String s) {
    Pair<String> endpoints = currentGraph.getEndpoints(s);
    String[] endpointsArr =  new String[] {endpoints.getFirst(), endpoints.getSecond()};
    Arrays.sort(endpointsArr);
    return endpointsArr[0] + "_" + endpointsArr[1];
  }
});

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

/**
 * Resets the indices for this edge and its parallel edges.
 * Should be invoked when an edge parallel to <code>e</code>
 * has been added or removed in this graph.
 * @param graph the graph with respect to which the index is calculated
 * @param e the edge whose indices are to be reset for {@code graph}
 */
public void reset(Graph<V,E> graph, E e) {
  Pair<V> endpoints = graph.getEndpoints(e);
  getIndex(graph, e, endpoints.getFirst());
  getIndex(graph, e, endpoints.getFirst(), endpoints.getSecond());
}

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

/**
 * Resets the indices for this edge group and its parallel groups. Should be
 * invoked when an edge parallel to the group has been added or removed.
 * @param group
 */
public void reset(Graph graph, Object group)
{
  Pair endpoints = graph.getEndpoints(group);
  getIndex(graph, (MessageGroup)group, (AgentGroup)endpoints.getFirst());
  getIndex(graph, (MessageGroup)group, (AgentGroup)endpoints.getFirst(), (AgentGroup)endpoints.getSecond());
}

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

/**
 * Resets the indices for this edge and its parallel edges.
 * Should be invoked when an edge parallel to <code>e</code>
 * has been added or removed.
 * @param graph the graph whose indices are to be reset
 * @param e the edge whose associated indices are to be reset
 */
public void reset(Graph<V,E> graph, E e) {
  Pair<V> endpoints = graph.getEndpoints(e);
  getIndex(graph, e, endpoints.getFirst());
  getIndex(graph, e, endpoints.getFirst(), endpoints.getSecond());
}

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

/**
 * Resets the indices for this edge and its parallel edges. Should be
 * invoked when an edge parallel to <code>e</code> has been added or
 * removed.
 * 
 * @param e
 */
@Override
public void reset(Graph<V, E> graph, E e) {
  Pair<V> endpoints = graph.getEndpoints(e);
  getIndex(graph, e, endpoints.getFirst());
  getIndex(graph, e, endpoints.getFirst(), endpoints.getSecond());
}

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

/**
 * Resets the indices for this edge and its parallel edges. Should be
 * invoked when an edge parallel to <code>e</code> has been added or
 * removed.
 * 
 * @param e
 */
@Override
public void reset(Graph<V, E> graph, E e) {
  Pair<V> endpoints = graph.getEndpoints(e);
  getIndex(graph, e, endpoints.getFirst());
  getIndex(graph, e, endpoints.getFirst(), endpoints.getSecond());
}

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

/**
 * Resets the indices for this edge and its parallel edges.
 * Should be invoked when an edge parallel to <code>e</code>
 * has been added or removed.
 * @param graph the graph for which the indices are to be reset
 * @param e the edge whose indices are to be reset
 * 
 */
public void reset(Graph<V,E> graph, E e) {
  Pair<V> endpoints = graph.getEndpoints(e);
  getIndex(graph, e, endpoints.getFirst());
  getIndex(graph, e, endpoints.getFirst(), endpoints.getSecond());
}

相关文章