## org.apache.mahout.math.function
Class DoubleDoubleFunction

    java.lang.Object
      org.apache.mahout.math.function.DoubleDoubleFunction

Direct Known Subclasses:
  PlusMult, TimesFunction

    public abstract class DoubleDoubleFunction

extends Object

Interface that represents a function object: a function that takes two arguments and returns a single value.

Constructor Summary
`DoubleDoubleFunction()`

Method Summary
`abstract double` `apply(double arg1, double arg2)` Apply the function to the arguments and return the result
`boolean` `isAssociative()`
`boolean` `isAssociativeAndCommutative()`
`boolean` `isCommutative()`
`boolean` `isDensifying()`
`boolean` `isLikeLeftMult()`
`boolean` `isLikeMult()`
`boolean` `isLikeRightMult()`
`boolean` `isLikeRightPlus()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DoubleDoubleFunction

    public DoubleDoubleFunction()

Method Detail

### apply

    public abstract double apply(double arg1,
                                 double arg2)

  Apply the function to the arguments and return the result

  Parameters:
    `arg1` - a double for the first argument
    `arg2` - a double for the second argument
  Returns:
    the result of applying the function

### isLikeRightPlus

    public boolean isLikeRightPlus()

  Returns:
    true iff f(x, 0) = x for any x

### isLikeLeftMult

    public boolean isLikeLeftMult()

  Returns:
    true iff f(0, y) = 0 for any y

### isLikeRightMult

    public boolean isLikeRightMult()

  Returns:
    true iff f(x, 0) = 0 for any x

### isLikeMult

    public boolean isLikeMult()

  Returns:
    true iff f(x, 0) = f(0, y) = 0 for any x, y

### isCommutative

    public boolean isCommutative()

  Returns:
    true iff f(x, y) = f(y, x) for any x, y

### isAssociative

    public boolean isAssociative()

  Returns:
    true iff f(x, f(y, z)) = f(f(x, y), z) for any x, y, z

### isAssociativeAndCommutative

    public boolean isAssociativeAndCommutative()

  Returns:
    true iff f(x, y) = f(y, x) for any x, y AND f(x, f(y, z)) = f(f(x, y), z) for any x, y, z

### isDensifying

    public boolean isDensifying()

  Returns:
    true iff f(0, 0) != 0

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.