Class DelegateToEdgeTransformer<V,​E>

  • All Implemented Interfaces:
    com.google.common.base.Function<VEPair<V,​E>,​java.lang.Number>, java.util.function.Function<VEPair<V,​E>,​java.lang.Number>

    public class DelegateToEdgeTransformer<V,​E>
    extends java.lang.Object
    implements com.google.common.base.Function<VEPair<V,​E>,​java.lang.Number>
    A Transformer<VEPair,Number that delegates its operation to a Transformer<E,Number>. Mainly useful for technical reasons inside AbstractIterativeScorer; in essence it allows the edge weight instance variable to be of type VEPair,W even if the edge weight Transformer only operates on edges.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.google.common.base.Function<? super E,​? extends java.lang.Number> delegate
      The Function to which this instance delegates its function.
    • Constructor Summary

      Constructors 
      Constructor Description
      DelegateToEdgeTransformer​(com.google.common.base.Function<? super E,​? extends java.lang.Number> delegate)
      Creates an instance with the specified delegate Function.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Number apply​(VEPair<V,​E> arg0)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.common.base.Function

        equals
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Field Detail

      • delegate

        protected com.google.common.base.Function<? super E,​? extends java.lang.Number> delegate
        The Function to which this instance delegates its function.
    • Constructor Detail

      • DelegateToEdgeTransformer

        public DelegateToEdgeTransformer​(com.google.common.base.Function<? super E,​? extends java.lang.Number> delegate)
        Creates an instance with the specified delegate Function.
        Parameters:
        delegate - the Function to which this instance will delegate
    • Method Detail

      • apply

        public java.lang.Number apply​(VEPair<V,​E> arg0)
        Specified by:
        apply in interface com.google.common.base.Function<V,​E>
        Specified by:
        apply in interface java.util.function.Function<V,​E>
        See Also:
        Function.apply(Object)