## org.apache.mahout.math
Class VectorBinaryAggregate.AggregateIterateUnionRandom

    java.lang.Object
      org.apache.mahout.math.VectorBinaryAggregate
          org.apache.mahout.math.VectorBinaryAggregate.AggregateIterateUnionRandom

Enclosing class:
  VectorBinaryAggregate

    public static class VectorBinaryAggregate.AggregateIterateUnionRandom

extends VectorBinaryAggregate

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.mahout.math.VectorBinaryAggregate

`VectorBinaryAggregate.AggregateAllIterateSequential, VectorBinaryAggregate.AggregateAllIterateThatLookupThis, VectorBinaryAggregate.AggregateAllIterateThisLookupThat, VectorBinaryAggregate.AggregateAllLoop, VectorBinaryAggregate.AggregateIterateIntersection, VectorBinaryAggregate.AggregateIterateUnionRandom, VectorBinaryAggregate.AggregateIterateUnionSequential, VectorBinaryAggregate.AggregateNonzerosIterateThatLookupThis, VectorBinaryAggregate.AggregateNonzerosIterateThisLookupThat`

Field Summary

Fields inherited from class org.apache.mahout.math.VectorBinaryAggregate
`OPERATIONS`

Constructor Summary
`VectorBinaryAggregate.AggregateIterateUnionRandom()`

Method Summary
`double` `aggregate(Vector x, Vector y, DoubleDoubleFunction fa, DoubleDoubleFunction fc)` Main method that applies fc to x and y component-wise aggregating the results with fa.
`double` `estimateCost(Vector x, Vector y, DoubleDoubleFunction fa, DoubleDoubleFunction fc)` Estimates the cost of using this algorithm to compute the aggregation.
`boolean` `isValid(Vector x, Vector y, DoubleDoubleFunction fa, DoubleDoubleFunction fc)` Returns true iff we can use this algorithm to apply fc to x and y component-wise and aggregate the result using fa.

Methods inherited from class org.apache.mahout.math.VectorBinaryAggregate
`aggregateBest, getBestOperation`

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

Constructor Detail

### VectorBinaryAggregate.AggregateIterateUnionRandom

    public VectorBinaryAggregate.AggregateIterateUnionRandom()

Method Detail

### isValid

    public boolean isValid(Vector x,
                           Vector y,
                           DoubleDoubleFunction fa,
                           DoubleDoubleFunction fc)

  Description copied from class: `VectorBinaryAggregate`
  Returns true iff we can use this algorithm to apply fc to x and y component-wise and aggregate the result using fa.

  Specified by:
    `isValid` in class `VectorBinaryAggregate`

### estimateCost

    public double estimateCost(Vector x,
                               Vector y,
                               DoubleDoubleFunction fa,
                               DoubleDoubleFunction fc)

  Description copied from class: `VectorBinaryAggregate`
  Estimates the cost of using this algorithm to compute the aggregation. The algorithm is assumed to be valid.

  Specified by:
    `estimateCost` in class `VectorBinaryAggregate`

### aggregate

    public double aggregate(Vector x,
                            Vector y,
                            DoubleDoubleFunction fa,
                            DoubleDoubleFunction fc)

  Description copied from class: `VectorBinaryAggregate`
  Main method that applies fc to x and y component-wise aggregating the results with fa. It returns the result of the aggregation.

  Specified by:
    `aggregate` in class `VectorBinaryAggregate`

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