## Package org.apache.mahout.math

Core base classes; Operations on primitive arrays such as sorting, partitioning and permuting.

See:
Description

Interface Summary
Matrix: The basic interface including numerous convenience functions
MatrixTimesOps: Optional interface for optimized matrix multiplications.
QR
Swapper: Interface for an object that knows how to swap elements at two positions (a,b).
Vector: The basic interface including numerous convenience functions NOTE: All implementing classes must have a constructor that takes an int for cardinality and a no-arg constructor that can be used for marshalling the Writable instance NOTE: Implementations may choose to reuse the Vector.Element in the Iterable methods
Vector.Element: A holder for information about a specific item in the Vector.
VectorIterable

Class Summary
AbstractMatrix: A few universal implementations of convenience functions
AbstractMatrix.TransposeViewVector
AbstractVector: Implementations of generic capabilities like sum of elements and dot products
Algebra
Arrays: Array manipulations; complements `java.util.Arrays`.
BinarySearch
Centroid: A centroid is a weighted vector.
CholeskyDecomposition: Cholesky decomposition shamelessly ported from JAMA.
ConstantVector: Implements a vector with all the same values.
DelegatingVector: A delegating vector provides an easy way to decorate vectors with weights or id's and such while keeping all of the Vector functionality.
DenseMatrix: Matrix of doubles implemented using a 2-d array
DenseSymmetricMatrix: Economy packaging for a dense symmetric in-core matrix.
DenseVector: Implements vector as an array of doubles
DiagonalMatrix
FileBasedMatrix: Provides a way to get data from a file and treat it as if it were a matrix, but avoids putting all that data onto the Java heap.
FileBasedSparseBinaryMatrix: Provides a way to get data from a file and treat it as if it were a matrix, but avoids putting all that data onto the Java heap.
FileBasedSparseBinaryMatrix.BinaryReadOnlyElement
Matrices
MatrixSlice
MatrixVectorView: Provides a virtual vector that is really a row or column or diagonal of a matrix.
MatrixView: Implements subset view of a Matrix
MurmurHash: This is a very fast, non-cryptographic hash suitable for general hash-based lookup.
MurmurHash3: This produces exactly the same hash values as the final C+ + * version of MurmurHash3 and is thus suitable for producing the same hash values across platforms.
NamedVector
OldQRDecomposition: partially deprecated until unit tests are in place.
OrderedIntDoubleMapping
OrthonormalityVerifier
PermutedVectorView: Provides a permuted view of a vector.
PersistentObject: This empty class is the common root for all persistent capable classes.
PivotedMatrix: Matrix that allows transparent row and column permutation.
QRDecomposition: For an `m x n` matrix `A` with `m >= n`, the QR decomposition is an `m x n` orthogonal matrix `Q` and an `n x n` upper triangular matrix `R` so that `A = Q*R`.
RandomAccessSparseVector: Implements vector that only stores non-zero doubles
RandomTrinaryMatrix: Random matrix.
SequentialAccessSparseVector: Implements vector that only stores non-zero doubles as a pair of parallel arrays (OrderedIntDoubleMapping), one int[], one double[].
SingularValueDecomposition
Sorting
SparseColumnMatrix: sparse matrix with general element values whose columns are accessible quickly.
SparseMatrix: Doubly sparse matrix.
SparseRowMatrix: sparse matrix with general element values whose rows are accessible quickly.
UpperTriangular: Quick and dirty implementation of some `Matrix` methods over packed upper triangular matrix.
VectorBinaryAggregate: Abstract class encapsulating different algorithms that perform the Vector operations aggregate().
VectorBinaryAggregate.AggregateAllIterateSequential
VectorBinaryAggregate.AggregateAllIterateThatLookupThis
VectorBinaryAggregate.AggregateAllIterateThisLookupThat
VectorBinaryAggregate.AggregateAllLoop
VectorBinaryAggregate.AggregateIterateIntersection
VectorBinaryAggregate.AggregateIterateUnionRandom
VectorBinaryAggregate.AggregateIterateUnionSequential
VectorBinaryAggregate.AggregateNonzerosIterateThatLookupThis
VectorBinaryAggregate.AggregateNonzerosIterateThisLookupThat
VectorBinaryAssign: Abstract class encapsulating different algorithms that perform the Vector operations assign().
VectorBinaryAssign.AssignAllIterateSequentialInplaceUpdates
VectorBinaryAssign.AssignAllIterateSequentialMergeUpdates
VectorBinaryAssign.AssignAllIterateThatLookupThisInplaceUpdates
VectorBinaryAssign.AssignAllIterateThatLookupThisMergeUpdates
VectorBinaryAssign.AssignAllIterateThisLookupThatInplaceUpdates
VectorBinaryAssign.AssignAllIterateThisLookupThatMergeUpdates
VectorBinaryAssign.AssignAllLoopInplaceUpdates
VectorBinaryAssign.AssignAllLoopMergeUpdates
VectorBinaryAssign.AssignIterateIntersection: If f(x, 0) = x and f(0, y) = 0 the zeros in x and y don't matter and we can iterate through the nonzeros in both x and y.
VectorBinaryAssign.AssignIterateUnionRandomInplaceUpdates: If f(0, 0) = 0 we can iterate through the nonzeros in either x or y.
VectorBinaryAssign.AssignIterateUnionRandomMergeUpdates: If f(0, 0) = 0 we can iterate through the nonzeros in either x or y.
VectorBinaryAssign.AssignIterateUnionSequentialInplaceUpdates: If f(0, 0) = 0 we can iterate through the nonzeros in either x or y.
VectorBinaryAssign.AssignIterateUnionSequentialMergeUpdates: If f(0, 0) = 0 we can iterate through the nonzeros in either x or y.
VectorBinaryAssign.AssignNonzerosIterateThatLookupThisInplaceUpdates: If f(x, 0) = x, the zeros in y don't matter and we can simply iterate through the nonzeros of y.
VectorBinaryAssign.AssignNonzerosIterateThatLookupThisMergeUpdates: If f(x, 0) = x, the zeros in y don't matter and we can simply iterate through the nonzeros of y.
VectorBinaryAssign.AssignNonzerosIterateThisLookupThat: If f(0, y) = 0, the zeros in x don't matter and we can simply iterate through the nonzeros of x.
VectorView: Implements subset view of a Vector
WeightedVector: Decorates a vector with a floating point weight and an index.
WeightedVectorComparator: Orders `WeightedVector` by `WeightedVector.getWeight()`.

Exception Summary
CardinalityException: Exception thrown when there is a cardinality mismatch in matrix or vector operations.
IndexException: Exception thrown when a matrix or vector is accessed at an index, or dimension, which does not logically exist in the entity.

## Package org.apache.mahout.math Description

Core base classes; Operations on primitive arrays such as sorting, partitioning and permuting.

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