org.apache.solr.analytics.util.valuesource

## Class DualDoubleFunction

- java.lang.Object
- - org.apache.lucene.queries.function.ValueSource
  - - org.apache.solr.analytics.util.valuesource.DualDoubleFunction

- Direct Known Subclasses:
    DivDoubleFunction, LogDoubleFunction, PowDoubleFunction

      public abstract class DualDoubleFunction
      extends ValueSource

  Abstract `ValueSource` implementation which wraps two ValueSources and applies an extendible double function to their values.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ValueSource` | `a`
    `protected ValueSource` | `b`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DualDoubleFunction(ValueSource a, ValueSource b)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createWeight(Map context, IndexSearcher searcher)`
    `String` | `description()`
    `boolean` | `equals(Object o)`
    `protected abstract double` | `func(int doc, FunctionValues aVals, FunctionValues bVals)`
    `FunctionValues` | `getValues(Map context, LeafReaderContext readerContext)`
    `int` | `hashCode()`
    `protected abstract String` | `name()`

    - ### Methods inherited from class org.apache.lucene.queries.function.ValueSource

      `getSortField, newContext, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### a

          protected final ValueSource a

    - #### b

          protected final ValueSource b

  - ### Constructor Detail

    - #### DualDoubleFunction

          public DualDoubleFunction(ValueSource a,
                                    ValueSource b)

  - ### Method Detail

    - #### name

          protected abstract String name()

    - #### func

          protected abstract double func(int doc,
                                         FunctionValues aVals,
                                         FunctionValues bVals)

    - #### description

          public String description()

      Specified by:
        `description` in class `ValueSource`

    - #### getValues

          public FunctionValues getValues(Map context,
                                          LeafReaderContext readerContext)
                                   throws IOException

      Specified by:
        `getValues` in class `ValueSource`
      Throws:
        `IOException`

    - #### createWeight

          public void createWeight(Map context,
                                   IndexSearcher searcher)
                            throws IOException

      Overrides:
        `createWeight` in class `ValueSource`
      Throws:
        `IOException`

    - #### equals

          public boolean equals(Object o)

      Specified by:
        `equals` in class `ValueSource`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in class `ValueSource`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.