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

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

    public final class TimesFunction

extends DoubleDoubleFunction

Constructor Summary
`TimesFunction()`

Method Summary
`double` `apply(double x, double y)` Computes the product of two numbers.
`boolean` `isAssociative()` x * (y * z) = (x * y) * z for any x, y, z
`boolean` `isCommutative()` x * y = y * x for any x, y
`boolean` `isLikeLeftMult()` 0 * y = 0 for any y
`boolean` `isLikeRightMult()` x * 0 = 0 for any x
`boolean` `isLikeRightPlus()` x * 0 = y only if y = 0

Methods inherited from class org.apache.mahout.math.function.DoubleDoubleFunction
`isAssociativeAndCommutative, isDensifying, isLikeMult`

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

Constructor Detail

### TimesFunction

    public TimesFunction()

Method Detail

### apply

    public double apply(double x,
                        double y)

  Computes the product of two numbers.

  Specified by:
    `apply` in class `DoubleDoubleFunction`
  Parameters:
    `x` - first argument
    `y` - second argument
  Returns:
    the product

### isLikeRightPlus

    public boolean isLikeRightPlus()

  x * 0 = y only if y = 0

  Overrides:
    `isLikeRightPlus` in class `DoubleDoubleFunction`
  Returns:
    true iff f(x, 0) = x for any x

### isLikeLeftMult

    public boolean isLikeLeftMult()

  0 * y = 0 for any y

  Overrides:
    `isLikeLeftMult` in class `DoubleDoubleFunction`
  Returns:
    true iff f(0, y) = 0 for any y

### isLikeRightMult

    public boolean isLikeRightMult()

  x * 0 = 0 for any x

  Overrides:
    `isLikeRightMult` in class `DoubleDoubleFunction`
  Returns:
    true iff f(x, 0) = 0 for any x

### isCommutative

    public boolean isCommutative()

  x * y = y * x for any x, y

  Overrides:
    `isCommutative` in class `DoubleDoubleFunction`
  Returns:
    true iff f(x, y) = f(y, x) for any x, y

### isAssociative

    public boolean isAssociative()

  x * (y * z) = (x * y) * z for any x, y, z

  Overrides:
    `isAssociative` in class `DoubleDoubleFunction`
  Returns:
    true iff f(x, f(y, z)) = f(f(x, y), z) for any x, y, z

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