/** * Collects the "disappearing potential" associated with vertices that have * no outgoing edges. Vertices that have no outgoing edges do not directly * contribute to the scores of other vertices. These values are collected at * each step and then distributed across all vertices as a part of the * normalization process. */ @Override protected void collectDisappearingPotential(V v) { if (graph.outDegree(v) == 0) { if (isDisconnectedGraphOK()) { disappearing_potential += getCurrentValue(v); } else { throw new IllegalArgumentException( "Outdegree of " + v + " must be > 0"); } } } }
/** * Collects the "disappearing potential" associated with vertices that have * no outgoing edges. Vertices that have no outgoing edges do not directly * contribute to the scores of other vertices. These values are collected * at each step and then distributed across all vertices * as a part of the normalization process. */ @Override protected void collectDisappearingPotential(V v) { if (graph.outDegree(v) == 0) { if (isDisconnectedGraphOK()) disappearing_potential += getCurrentValue(v); else throw new IllegalArgumentException("Outdegree of " + v + " must be > 0"); } } }
/** * Collects the "disappearing potential" associated with vertices that have * no outgoing edges. Vertices that have no outgoing edges do not directly * contribute to the scores of other vertices. These values are collected * at each step and then distributed across all vertices * as a part of the normalization process. */ @Override protected void collectDisappearingPotential(V v) { if (graph.outDegree(v) == 0) { if (isDisconnectedGraphOK()) disappearing_potential += getCurrentValue(v); else throw new IllegalArgumentException("Outdegree of " + v + " must be > 0"); } } }
public Double apply(VEPair<V, E> ve_pair) { E e = ve_pair.getE(); V v = ve_pair.getV(); EdgeType edge_type = graph.getEdgeType(e); if (edge_type == EdgeType.UNDIRECTED) return 1.0 / graph.degree(v); if (edge_type == EdgeType.DIRECTED) return 1.0 / graph.outDegree(graph.getSource(e)); throw new IllegalArgumentException("can't handle edge type: " + edge_type); }
/** * @see org.apache.commons.collections15.Transformer#transform(java.lang.Object) */ public Double transform(VEPair<V, E> ve_pair) { E e = ve_pair.getE(); V v = ve_pair.getV(); EdgeType edge_type = graph.getEdgeType(e); if (edge_type == EdgeType.UNDIRECTED) return 1.0 / graph.degree(v); if (edge_type == EdgeType.DIRECTED) return 1.0 / graph.outDegree(graph.getSource(e)); throw new IllegalArgumentException("can't handle edge type: " + edge_type); }
/** * Collects the "disappearing potential" associated with vertices that have * either no incoming edges, no outgoing edges, or both. Vertices that have * no incoming edges do not directly contribute to the hub scores of other * vertices; similarly, vertices that have no outgoing edges do not directly * contribute to the authority scores of other vertices. These values are * collected at each step and then distributed across all vertices as a part * of the normalization process. (This process is not required for, and does * not affect, the 'sum-of-squares'-style normalization.) */ @Override protected void collectDisappearingPotential(V v) { if (graph.outDegree(v) == 0) { if (isDisconnectedGraphOK()) { disappearing_potential.hub += getCurrentValue(v).authority; } else { throw new IllegalArgumentException( "Outdegree of " + v + " must be > 0"); } } if (graph.inDegree(v) == 0) { if (isDisconnectedGraphOK()) { disappearing_potential.authority += getCurrentValue(v).hub; } else { throw new IllegalArgumentException( "Indegree of " + v + " must be > 0"); } } }
/** * Collects the "disappearing potential" associated with vertices that have either * no incoming edges, no outgoing edges, or both. Vertices that have no incoming edges * do not directly contribute to the hub scores of other vertices; similarly, vertices * that have no outgoing edges do not directly contribute to the authority scores of * other vertices. These values are collected at each step and then distributed across all vertices * as a part of the normalization process. (This process is not required for, and does * not affect, the 'sum-of-squares'-style normalization.) */ @Override protected void collectDisappearingPotential(V v) { if (graph.outDegree(v) == 0) { if (isDisconnectedGraphOK()) disappearing_potential.hub += getCurrentValue(v).authority; else throw new IllegalArgumentException("Outdegree of " + v + " must be > 0"); } if (graph.inDegree(v) == 0) { if (isDisconnectedGraphOK()) disappearing_potential.authority += getCurrentValue(v).hub; else throw new IllegalArgumentException("Indegree of " + v + " must be > 0"); } }
/** * @see org.apache.commons.collections15.Transformer#transform(java.lang.Object) */ @Override public Double transform(VEPair<V, E> ve_pair) { E e = ve_pair.getE(); V v = ve_pair.getV(); EdgeType edge_type = graph.getEdgeType(e); if (edge_type == EdgeType.UNDIRECTED) { return 1.0 / graph.degree(v); } if (edge_type == EdgeType.DIRECTED) { return 1.0 / graph.outDegree(graph.getSource(e)); } throw new IllegalArgumentException( "can't handle edge type: " + edge_type); }
/** * Collects the "disappearing potential" associated with vertices that have either * no incoming edges, no outgoing edges, or both. Vertices that have no incoming edges * do not directly contribute to the hub scores of other vertices; similarly, vertices * that have no outgoing edges do not directly contribute to the authority scores of * other vertices. These values are collected at each step and then distributed across all vertices * as a part of the normalization process. (This process is not required for, and does * not affect, the 'sum-of-squares'-style normalization.) */ @Override protected void collectDisappearingPotential(V v) { if (graph.outDegree(v) == 0) { if (isDisconnectedGraphOK()) disappearing_potential.hub += getCurrentValue(v).authority; else throw new IllegalArgumentException("Outdegree of " + v + " must be > 0"); } if (graph.inDegree(v) == 0) { if (isDisconnectedGraphOK()) disappearing_potential.authority += getCurrentValue(v).hub; else throw new IllegalArgumentException("Indegree of " + v + " must be > 0"); } }