## org.apache.commons.math.analysis
Class BinaryFunction

    java.lang.Object
      org.apache.commons.math.analysis.BinaryFunction

All Implemented Interfaces:
  BivariateRealFunction

    public abstract class BinaryFunction

extends java.lang.Object
implements BivariateRealFunction

Base class for `BivariateRealFunction` that can be composed with other functions.

Since:
  2.1
Version:
  $Revision: 924453 $ $Date: 2010-03-17 16:05:20 -0400 (Wed, 17 Mar 2010) $

Field Summary
`static BinaryFunction` `ADD` The + operator method wrapped as a `BinaryFunction`.
`static BinaryFunction` `ATAN2` The `Math.atan2` method wrapped as a `BinaryFunction`.
`static BinaryFunction` `DIVIDE` The / operator method wrapped as a `BinaryFunction`.
`static BinaryFunction` `MULTIPLY` The * operator method wrapped as a `BinaryFunction`.
`static BinaryFunction` `POW` The `Math.pow` method wrapped as a `BinaryFunction`.
`static BinaryFunction` `SUBTRACT` The - operator method wrapped as a `BinaryFunction`.

Constructor Summary
`BinaryFunction()`

Method Summary
`ComposableFunction` `fix1stArgument(double fixedX)` Get a composable function by fixing the first argument of the instance.
`ComposableFunction` `fix2ndArgument(double fixedY)` Get a composable function by fixing the second argument of the instance.
`abstract double` `value(double x, double y)` Compute the value for the function.

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

Field Detail

### ADD

    public static final BinaryFunction ADD

  The + operator method wrapped as a `BinaryFunction`.

### SUBTRACT

    public static final BinaryFunction SUBTRACT

  The - operator method wrapped as a `BinaryFunction`.

### MULTIPLY

    public static final BinaryFunction MULTIPLY

  The * operator method wrapped as a `BinaryFunction`.

### DIVIDE

    public static final BinaryFunction DIVIDE

  The / operator method wrapped as a `BinaryFunction`.

### POW

    public static final BinaryFunction POW

  The `Math.pow` method wrapped as a `BinaryFunction`.

### ATAN2

    public static final BinaryFunction ATAN2

  The `Math.atan2` method wrapped as a `BinaryFunction`.

Constructor Detail

### BinaryFunction

    public BinaryFunction()

Method Detail

### value

    public abstract double value(double x,
                                 double y)
                          throws FunctionEvaluationException

  Compute the value for the function.

  Specified by:
    `value` in interface `BivariateRealFunction`
  Parameters:
    `x` - abscissa for which the function value should be computed
    `y` - ordinate for which the function value should be computed
  Returns:
    the value
  Throws:
    `FunctionEvaluationException` - if the function evaluation fails

### fix1stArgument

    public ComposableFunction fix1stArgument(double fixedX)

  Get a composable function by fixing the first argument of the instance.

  Parameters:
    `fixedX` - fixed value of the first argument
  Returns:
    a function such that `f.value(y) == value(fixedX, y)`

### fix2ndArgument

    public ComposableFunction fix2ndArgument(double fixedY)

  Get a composable function by fixing the second argument of the instance.

  Parameters:
    `fixedY` - fixed value of the second argument
  Returns:
    a function such that `f.value(x) == value(x, fixedY)`

Copyright (c) 2003-2010 Apache Software Foundation