/** * @see edu.uci.ics.jung.graph.Graph#getEdgeType(java.lang.Object) */ @Override public EdgeType getEdgeType(E edge) { return delegate.getEdgeType(edge); }
/** * */ public Shape apply(Context<Graph<V,E>,E> context) { if (context.graph.getEdgeType(context.element) == EdgeType.DIRECTED) return directed_arrow; else return undirected_arrow; }
/** * @see edu.uci.ics.jung.graph.Graph#getEdgeType(java.lang.Object) */ public synchronized EdgeType getEdgeType(E edge) { return delegate.getEdgeType(edge); }
public EdgeType getEdgeType(E edge) { return graph.getEdgeType(edge); } public Pair<V> getEndpoints(E edge) {
/** * @see edu.uci.ics.jung.graph.Graph#getEdgeType(java.lang.Object) */ @Override public synchronized EdgeType getEdgeType(E edge) { return delegate.getEdgeType(edge); }
/** * @see edu.uci.ics.jung.graph.Graph#getEdgeType(java.lang.Object) */ @Override public EdgeType getEdgeType(E edge) { return delegate.getEdgeType(edge); }
public Number apply(Context<Graph<V,E>,E> context) { Graph<V,E> graph = context.graph; E e = context.element; if (graph.getEdgeType(e) == EdgeType.DIRECTED) return directed_value; else return undirected_value; }
/** * @see edu.uci.ics.jung.graph.Graph#getEdgeType(java.lang.Object) */ public EdgeType getEdgeType(E edge) { return delegate.getEdgeType(edge); }
/** * @see edu.uci.ics.jung.graph.Graph#getEdgeType(java.lang.Object) */ public EdgeType getEdgeType(E edge) { return delegate.getEdgeType(edge); }
/** * Returns the edge type of en edge. * @param edge The edge. * @return The edge type. */ public EdgeType getEdgeType(Object edge) { return delegate.getEdgeType(edge); }
public boolean apply(Context<Graph<V,E>,E> c) { return c.graph.getEdgeType(c.element) == EdgeType.DIRECTED; }
public boolean apply(Context<Graph<V,E>,E> context) { Graph<V,E> graph = context.graph; E e = context.element; if (graph.getEdgeType(e) == EdgeType.DIRECTED && show_d) { return true; } if (graph.getEdgeType(e) == EdgeType.UNDIRECTED && show_u) { return true; } return false; } }
public boolean apply(Context<Graph<V,E>,E> c) { return c.graph.getEdgeType(c.element) == EdgeType.UNDIRECTED; }
/** * Use the specified parameter to perform a test that returns true or * false. Returns <code>true</code> if the arrow ought to be shown, * else <code>false</code>. */ public boolean evaluate(Object context) { Graph graph = (Graph)((Context)context).graph; MessageGroup e = (MessageGroup)((Context)context).element; if(graph.getEdgeType(e) == EdgeType.DIRECTED && show_d) { return true; } if(graph.getEdgeType(e) == EdgeType.UNDIRECTED && show_u) { return true; } return false; } }
public Double apply(VEPair<V,E> ve_pair) { V v = ve_pair.getV(); E e = ve_pair.getE(); if (graph.getEdgeType(e) != EdgeType.DIRECTED) throw new IllegalArgumentException("This Function only" + " operates on directed edges"); return 1.0 / (graph.isSource(v, e) ? graph.outDegree(v) : graph.inDegree(v)); } }
/** * @see org.apache.commons.collections15.Transformer#transform(Object) * @throws IllegalArgumentException */ public Double transform(VEPair<V,E> ve_pair) { V v = ve_pair.getV(); E e = ve_pair.getE(); if (graph.getEdgeType(e) != EdgeType.DIRECTED) throw new IllegalArgumentException("This transformer only" + " operates on directed edges"); return 1.0 / (graph.isSource(v, e) ? graph.outDegree(v) : graph.inDegree(v)); } }
/** * @see org.apache.commons.collections15.Transformer#transform(Object) * @throws IllegalArgumentException */ @Override public Double transform(VEPair<V, E> ve_pair) { V v = ve_pair.getV(); E e = ve_pair.getE(); if (graph.getEdgeType(e) != EdgeType.DIRECTED) { throw new IllegalArgumentException( "This transformer only" + " operates on directed edges"); } return 1.0 / (graph.isSource(v, e) ? graph.outDegree(v) : graph.inDegree(v)); } }
public Graph getClusterGraph(Graph inGraph, Collection picked) { Graph clusterGraph; try { clusterGraph = createGraph(); } catch (InstantiationException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } for(Object v : picked) { clusterGraph.addVertex(v); Collection edges = inGraph.getIncidentEdges(v); for(Object edge : edges) { Pair endpoints = inGraph.getEndpoints(edge); Object v1 = endpoints.getFirst(); Object v2 = endpoints.getSecond(); if(picked.containsAll(endpoints)) { clusterGraph.addEdge(edge, v1, v2, inGraph.getEdgeType(edge)); } } } return clusterGraph; }
public Paint apply(E e) { Layout<V, E> layout = vv.getGraphLayout(); Pair<V> p = layout.getGraph().getEndpoints(e); V b = p.getFirst(); V f = p.getSecond(); Point2D pb = transformer.transform(layout.apply(b)); Point2D pf = transformer.transform(layout.apply(f)); float xB = (float) pb.getX(); float yB = (float) pb.getY(); float xF = (float) pf.getX(); float yF = (float) pf.getY(); if ((layout.getGraph().getEdgeType(e)) == EdgeType.UNDIRECTED) { xF = (xF + xB) / 2; yF = (yF + yB) / 2; } if(selfLoop.apply(Context.<Graph<V,E>,E>getInstance(layout.getGraph(), e))) { yF += 50; xF += 50; } return new GradientPaint(xB, yB, getColor1(e), xF, yF, getColor2(e), true); }
EdgeType type = graph.getEdgeType(edge); if (type.equals(EdgeType.DIRECTED) && !directed) xmlw.writeAttribute("directed", "true");