Class DualDoubleFunction


  • public abstract class DualDoubleFunction
    extends org.apache.lucene.queries.function.ValueSource
    Abstract ValueSource implementation which wraps two ValueSources and applies an extendible double function to their values.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.lucene.queries.function.ValueSource a  
      protected org.apache.lucene.queries.function.ValueSource b  
    • Constructor Summary

      Constructors 
      Constructor Description
      DualDoubleFunction​(org.apache.lucene.queries.function.ValueSource a, org.apache.lucene.queries.function.ValueSource b)  
    • Field Detail

      • a

        protected final org.apache.lucene.queries.function.ValueSource a
      • b

        protected final org.apache.lucene.queries.function.ValueSource b
    • Constructor Detail

      • DualDoubleFunction

        public DualDoubleFunction​(org.apache.lucene.queries.function.ValueSource a,
                                  org.apache.lucene.queries.function.ValueSource b)
        Parameters:
        a - the base.
        b - the exponent.
    • Method Detail

      • name

        protected abstract String name()
      • func

        protected abstract double func​(int doc,
                                       org.apache.lucene.queries.function.FunctionValues aVals,
                                       org.apache.lucene.queries.function.FunctionValues bVals)
                                throws IOException
        Throws:
        IOException
      • description

        public String description()
        Specified by:
        description in class org.apache.lucene.queries.function.ValueSource
      • getValues

        public org.apache.lucene.queries.function.FunctionValues getValues​(Map<Object,​Object> context,
                                                                           org.apache.lucene.index.LeafReaderContext readerContext)
                                                                    throws IOException
        Specified by:
        getValues in class org.apache.lucene.queries.function.ValueSource
        Throws:
        IOException
      • createWeight

        public void createWeight​(Map<Object,​Object> context,
                                 org.apache.lucene.search.IndexSearcher searcher)
                          throws IOException
        Overrides:
        createWeight in class org.apache.lucene.queries.function.ValueSource
        Throws:
        IOException
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class org.apache.lucene.queries.function.ValueSource
      • equals

        public boolean equals​(Object o)
        Specified by:
        equals in class org.apache.lucene.queries.function.ValueSource