Class VertexScoreTransformer<V,S>

java.lang.Object
edu.uci.ics.jung.algorithms.scoring.util.VertexScoreTransformer<V,S>
All Implemented Interfaces:
com.google.common.base.Function<V,S>, Function<V,S>

public class VertexScoreTransformer<V,S> extends Object implements com.google.common.base.Function<V,S>
A Function convenience wrapper around VertexScorer.
  • Field Details

    • vs

      protected VertexScorer<V,S> vs
      The VertexScorer instance that provides the values returned by transform.
  • Constructor Details

    • VertexScoreTransformer

      public VertexScoreTransformer(VertexScorer<V,S> vs)
      Creates an instance based on the specified VertexScorer.
      Parameters:
      vs - the VertexScorer which will retrieve the score for each vertex
  • Method Details

    • apply

      public S apply(V v)
      Specified by:
      apply in interface com.google.common.base.Function<V,S>
      Specified by:
      apply in interface Function<V,S>
      Parameters:
      v - the vertex whose score is being returned
      Returns:
      the score for this vertex.