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

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

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

Graph.isPredecessor介绍

[英]Returns true if v1 is a predecessor of v2 in this graph. Equivalent to v1.getPredecessors().contains(v2).
[中]如果v1是此图中v2的前身,则返回true。相当于v1.getPredecessors().contains(v2)

代码示例

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

/**
 * @see edu.uci.ics.jung.graph.Graph#isPredecessor(java.lang.Object,
 *      java.lang.Object)
 */
@Override
public boolean isPredecessor(V v1, V v2) {
  return delegate.isPredecessor(v1, v2);
}

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

/**
 * @see edu.uci.ics.jung.graph.Graph#isPredecessor(java.lang.Object,
 *      java.lang.Object)
 */
@Override
public boolean isPredecessor(V v1, V v2) {
  return delegate.isPredecessor(v1, v2);
}

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

/**
 * @see edu.uci.ics.jung.graph.Graph#isPredecessor(java.lang.Object, java.lang.Object)
 */
public synchronized boolean isPredecessor(V v1, V v2) {
  return delegate.isPredecessor(v1, v2);
}

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

/** 
 * Returns <code>true</code> if there is an edge from first vertex to the second vertex.
 * @param v1 The first vertex.
 * @param v2 The second vertex.
 * @return <code>true</code> if the first vertex is predecessor of the second vertex.
 */
public boolean isPredecessor(Object v1, Object v2)
{
  return delegate.isPredecessor(v1, v2);
}

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

public boolean isPredecessor(V v1, V v2) {
  return graph.isPredecessor(v1, v2);
}
public boolean isSource(V vertex, E edge) {

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

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

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

/**
 * @see edu.uci.ics.jung.graph.Graph#isPredecessor(java.lang.Object, java.lang.Object)
 */
public boolean isPredecessor(V v1, V v2) {
  return delegate.isPredecessor(v1, v2);
}

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

/**
 * @see edu.uci.ics.jung.graph.Graph#isPredecessor(java.lang.Object, java.lang.Object)
 */
public boolean isPredecessor(V v1, V v2) {
  return delegate.isPredecessor(v1, v2);
}

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

protected static <V,E> boolean link(Graph<V,E> g, V a, V b) {
  return g.isPredecessor(b, a);
}

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

protected static <V,E> boolean link(Graph<V,E> g, V a, V b) {
  return g.isPredecessor(b, a);
}

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

protected static <V, E> boolean link(Graph<V, E> g, V a, V b) {
  return g.isPredecessor(b, a);
}

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

/**
 * Burt's constraint measure (equation 2.4, page 55 of Burt, 1992). Essentially a
 * measure of the extent to which <code>v</code> is invested in people who are invested in
 * other of <code>v</code>'s alters (neighbors).  The "constraint" is characterized
 * by a lack of primary holes around each neighbor.  Formally:
 * <pre>
 * constraint(v) = sum_{w in MP(v), w != v} localConstraint(v,w)
 * </pre>
 * where MP(v) is the subset of v's neighbors that are both predecessors and successors of v. 
 * @see #localConstraint(Object, Object)
 */
public double constraint(V v) {
  double result = 0;
  for(V w : g.getSuccessors(v)) {
    if (v != w && g.isPredecessor(v,w))
    {
      result += localConstraint(v, w);
    }
  }
  return result;
}

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

/**
 * Burt's constraint measure (equation 2.4, page 55 of Burt, 1992). Essentially a
 * measure of the extent to which <code>v</code> is invested in people who are invested in
 * other of <code>v</code>'s alters (neighbors).  The "constraint" is characterized
 * by a lack of primary holes around each neighbor.  Formally:
 * <pre>
 * constraint(v) = sum_{w in MP(v), w != v} localConstraint(v,w)
 * </pre>
 * where MP(v) is the subset of v's neighbors that are both predecessors and successors of v. 
 * @see #localConstraint(Object, Object)
 * 
 * @param v the vertex whose properties are being measured
 * @return the constraint of the vertex
 */
public double constraint(V v) {
  double result = 0;
  for(V w : g.getSuccessors(v)) {
    if (v != w && g.isPredecessor(v,w))
    {
      result += localConstraint(v, w);
    }
  }
  return result;
}

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

/**
 * Burt's constraint measure (equation 2.4, page 55 of Burt, 1992).
 * Essentially a measure of the extent to which <code>v</code> is invested
 * in people who are invested in other of <code>v</code>'s alters
 * (neighbors). The "constraint" is characterized by a lack of primary holes
 * around each neighbor. Formally:
 * 
 * <pre>
 * constraint(v) = sum_{w in MP(v), w != v} localConstraint(v,w)
 * </pre>
 * 
 * where MP(v) is the subset of v's neighbors that are both predecessors and
 * successors of v.
 * 
 * @see #localConstraint(Object, Object)
 */
public double constraint(V v) {
  double result = 0;
  for (V w : g.getSuccessors(v)) {
    if (v != w && g.isPredecessor(v, w)) {
      result += localConstraint(v, w);
    }
  }
  return result;
}

相关文章