## Uses of Interface
org.apache.mahout.math.function.BinaryFunction

Packages that use BinaryFunction
org.apache.mahout.math: Core base classes; Operations on primitive arrays such as sorting, partitioning and permuting.
org.apache.mahout.math.function: Core interfaces for functions, comparisons and procedures on objects and primitive data types.
org.apache.mahout.math.matrix: Matrix interfaces and factories; efficient and flexible dense and sparse 1, 2, 3 and d-dimensional matrices holding objects or primitive data types such as `int`, `double`, etc; Templated, fixed sized (not dynamically resizable); Also known as multi-dimensional arrays or Data Cubes.
org.apache.mahout.math.matrix.impl: Matrix implementations; You normally need not look at this package, because all concrete classes implement the abstract interfaces of `org.apache.mahout.math.matrix`, without subsetting or supersetting.

Uses of BinaryFunction in org.apache.mahout.math

Methods in org.apache.mahout.math with parameters of type BinaryFunction
`double` `Vector.aggregate(BinaryFunction aggregator, UnaryFunction map)` Examples speak louder than words: aggregate(plus, pow(2)) is another way to say getLengthSquared(), aggregate(max, abs) is norm(Double.POSITIVE_INFINITY).
`double` `NamedVector.aggregate(BinaryFunction aggregator, UnaryFunction map)`
`double` `Matrix.aggregate(BinaryFunction combiner, UnaryFunction mapper)` Collects the results of a function applied to each element of a matrix and then aggregated.
`double` `AbstractVector.aggregate(BinaryFunction aggregator, UnaryFunction map)`
`double` `AbstractMatrix.aggregate(BinaryFunction combiner, UnaryFunction mapper)` Collects the results of a function applied to each element of a matrix and then aggregated.
`double` `Vector.aggregate(Vector other, BinaryFunction aggregator, BinaryFunction combiner)` Generalized inner product - take two vectors, iterate over them both, using the combiner to combine together (and possibly map in some way) each pair of values, which are then aggregated with the previous accumulated value in the combiner.
`double` `NamedVector.aggregate(Vector other, BinaryFunction aggregator, BinaryFunction combiner)`
`double` `AbstractVector.aggregate(Vector other, BinaryFunction aggregator, BinaryFunction combiner)`
`Vector` `Vector.assign(BinaryFunction f, double y)` Apply the function to each element of the receiver, using the y value as the second argument of the BinaryFunction
`Vector` `NamedVector.assign(BinaryFunction f, double y)`
`Vector` `AbstractVector.assign(BinaryFunction f, double y)`
`Matrix` `Matrix.assign(Matrix other, BinaryFunction function)` Apply the function to each element of the receiver and the corresponding element of the other argument
`Matrix` `AbstractMatrix.assign(Matrix other, BinaryFunction function)`
`Vector` `Vector.assign(Vector other, BinaryFunction function)` Apply the function to each element of the receiver and the corresponding element of the other argument
`Vector` `NamedVector.assign(Vector other, BinaryFunction function)`
`Vector` `DenseVector.assign(Vector other, BinaryFunction function)`
`Vector` `AbstractVector.assign(Vector other, BinaryFunction function)`

Uses of BinaryFunction in org.apache.mahout.math.function

Classes in org.apache.mahout.math.function that implement BinaryFunction
`class` `PlusMult` Only for performance tuning of compute intensive linear algebraic computations.
`class` `TimesFunction`

Fields in org.apache.mahout.math.function declared as BinaryFunction
`static BinaryFunction` `Functions.ATAN2` Function that returns `Math.atan2(a,b)`.
`static BinaryFunction` `Functions.COMPARE` Function that returns `a < b ? -1 : a > b ? 1 : 0`.
`static BinaryFunction` `Functions.DIV` Function that returns `a / b`.
`static BinaryFunction` `Functions.EQUALS` Function that returns `a == b ? 1 : 0`.
`static BinaryFunction` `Functions.GREATER` Function that returns `a > b ? 1 : 0`.
`static BinaryFunction` `Functions.IEEE_REMAINDER` Function that returns `Math.IEEEremainder(a,b)`.
`static BinaryFunction` `Functions.LESS` Function that returns `a < b ? 1 : 0`.
`static BinaryFunction` `Functions.LG` Function that returns `Math.log(a) / Math.log(b)`.
`static BinaryFunction` `Functions.MAX` Function that returns `Math.max(a,b)`.
`static BinaryFunction` `Functions.MIN` Function that returns `Math.min(a,b)`.
`static BinaryFunction` `Functions.MINUS` Function that returns `a - b`.
`static BinaryFunction` `Functions.MOD` Function that returns `a % b`.
`static BinaryFunction` `Functions.MULT` Function that returns `a * b`.
`static BinaryFunction` `Functions.PLUS` Function that returns `a + b`.
`static BinaryFunction` `Functions.PLUS_ABS` Function that returns `Math.abs(a) + Math.abs(b)`.
`static BinaryFunction` `Functions.POW` Function that returns `Math.pow(a,b)`.

Methods in org.apache.mahout.math.function that return BinaryFunction
`static BinaryFunction` `Functions.chain(BinaryFunction f, UnaryFunction g, UnaryFunction h)` Constructs the function `f( g(a), h(b) )`.
`static BinaryFunction` `Functions.chain(UnaryFunction g, BinaryFunction h)` Constructs the function `g( h(a,b) )`.
`static BinaryFunction` `Functions.minusMult(double constant)` Constructs a function that returns `a - b*constant`.
`static BinaryFunction` `Functions.plusMult(double constant)` Constructs a function that returns `a + b*constant`.
`static BinaryFunction` `Functions.swapArgs(BinaryFunction function)` Constructs a function that returns `function.apply(b,a)`, i.e.

Methods in org.apache.mahout.math.function with parameters of type BinaryFunction
`static UnaryFunction` `Functions.bindArg1(BinaryFunction function, double c)` Constructs a unary function from a binary function with the first operand (argument) fixed to the given constant `c`.
`static UnaryFunction` `Functions.bindArg2(BinaryFunction function, double c)` Constructs a unary function from a binary function with the second operand (argument) fixed to the given constant `c`.
`static BinaryFunction` `Functions.chain(BinaryFunction f, UnaryFunction g, UnaryFunction h)` Constructs the function `f( g(a), h(b) )`.
`static BinaryFunction` `Functions.chain(UnaryFunction g, BinaryFunction h)` Constructs the function `g( h(a,b) )`.
`static BinaryFunction` `Functions.swapArgs(BinaryFunction function)` Constructs a function that returns `function.apply(b,a)`, i.e.

Uses of BinaryFunction in org.apache.mahout.math.matrix

Methods in org.apache.mahout.math.matrix with parameters of type BinaryFunction
`double` `DoubleMatrix2D.aggregate(BinaryFunction aggr, UnaryFunction f)` Deprecated. Applies a function to each cell and aggregates the results.
`double` `DoubleMatrix1D.aggregate(BinaryFunction aggr, UnaryFunction f)` Deprecated. Applies a function to each cell and aggregates the results.
`double` `DoubleMatrix1D.aggregate(DoubleMatrix1D other, BinaryFunction aggr, BinaryFunction f)` Deprecated. Applies a function to each corresponding cell of two matrices and aggregates the results.
`double` `DoubleMatrix2D.aggregate(DoubleMatrix2D other, BinaryFunction aggr, BinaryFunction f)` Deprecated. Applies a function to each corresponding cell of two matrices and aggregates the results.
`DoubleMatrix1D` `DoubleMatrix1D.assign(DoubleMatrix1D y, BinaryFunction function)` Deprecated. Assigns the result of a function to each cell; `x[i] = function(x[i],y[i])`.
`DoubleMatrix1D` `DoubleMatrix1D.assign(DoubleMatrix1D y, BinaryFunction function, org.apache.mahout.math.list.IntArrayList nonZeroIndexes)` Deprecated. Assigns the result of a function to each cell; `x[i] = function(x[i],y[i])`.
`DoubleMatrix2D` `DoubleMatrix2D.assign(DoubleMatrix2D y, BinaryFunction function)` Deprecated. Assigns the result of a function to each cell; `x[row,col] = function(x[row,col],y[row,col])`.

Uses of BinaryFunction in org.apache.mahout.math.matrix.impl

Methods in org.apache.mahout.math.matrix.impl with parameters of type BinaryFunction
`DoubleMatrix1D` `DenseDoubleMatrix1D.assign(DoubleMatrix1D y, BinaryFunction function)` Deprecated. Assigns the result of a function to each cell; `x[i] = function(x[i],y[i])`.
`DoubleMatrix2D` `SparseDoubleMatrix2D.assign(DoubleMatrix2D y, BinaryFunction function)` Deprecated.
`DoubleMatrix2D` `DenseDoubleMatrix2D.assign(DoubleMatrix2D y, BinaryFunction function)` Deprecated. Assigns the result of a function to each cell; `x[row,col] = function(x[row,col],y[row,col])`.

Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.