See: Description
| Class | Description |
|---|---|
| ImmutableSparseVector |
Immutable sparse vectors.
|
| ImmutableVec |
Immutable
Vec. |
| MutableSparseVector |
Mutable version of sparse vector.
|
| MutableVec |
Mutable
Vec. |
| SparseVector |
Read-only interface to sparse vectors.
|
| Vec |
A real vector.
|
| VectorEntry |
An entry in a sparse vector.
|
| Vectors |
Utility methods for interacting with vectors.
|
| Enum | Description |
|---|---|
| VectorEntry.State |
The state of an entry in a sparse vector.
|
There are two types of vectors in this package: vectors (Vector) and sparse
vectors (SparseVector). Vectors are the standard linear algebra vectors, with
a particular dimension \(d\) and elements indexed by integers in the range \([0,d)\).
Sparse vectors map arbitrary long keys to values sparsely and efficiently. The keys can
be negative.
Each vector comes in three flavors. Read-only vectors (Vector and SparseVector);
this type is the base of the remaining types for each vector, and provides a read-only
interface to the vector. Immutable vectors (ImmutableVector
and ImmutableSparseVector) are immutable and cannot be
changed once created. They can also be freely shared between threads. Finally, mutable vectors
(MutableVector) and MutableSparseVector)
are mutable and not thread-safe.
This design allows read-only operations to be performed on any type of vector, while allowing components to specifically work with and store vectors guaranteed to be immutable.
The Vectors class provides utility methods for working with vectors.
Copyright © 2013 GroupLens Research. All Rights Reserved.