Package | Description |
---|---|
org.la4j | |
org.la4j.linear | |
org.la4j.matrix | |
org.la4j.matrix.dense | |
org.la4j.matrix.sparse | |
org.la4j.operation | |
org.la4j.operation.ooplace | |
org.la4j.vector | |
org.la4j.vector.dense | |
org.la4j.vector.sparse |
Modifier and Type | Field and Description |
---|---|
static MatrixVectorOperation<Vector> |
LinearAlgebra.OO_PLACE_MATRIX_BY_VECTOR_MULTIPLICATION |
static VectorMatrixOperation<Vector> |
LinearAlgebra.OO_PLACE_VECTOR_BY_MATRIX_MULTIPLICATION |
static VectorVectorOperation<Vector> |
LinearAlgebra.OO_PLACE_VECTOR_HADAMARD_PRODUCT |
static VectorVectorOperation<Vector> |
LinearAlgebra.OO_PLACE_VECTORS_ADDITION |
static VectorVectorOperation<Vector> |
LinearAlgebra.OO_PLACE_VECTORS_SUBTRACTION |
Modifier and Type | Method and Description |
---|---|
<T extends Vector> |
Vector.to(VectorFactory<T> factory)
Converts this vector using the given
factory . |
Modifier and Type | Method and Description |
---|---|
Vector |
Vector.add(double value)
Adds given
value (v) to this vector (X). |
Vector |
Vector.add(Vector that)
Adds given
vector (X) to this vector (Y). |
Vector |
Vector.blank()
Creates a blank (an empty vector with same length) copy of this vector.
|
abstract Vector |
Vector.blankOfLength(int length)
Creates a blank (an empty vector) copy of this vector with the given
length . |
static Vector |
Vector.constant(int length,
double value)
|
Vector |
Vector.copy()
Copies this vector.
|
abstract Vector |
Vector.copyOfLength(int length)
Copies this vector into the new vector with specified
length . |
Vector |
Vector.divide(double value)
Divides this vector (X) by given
value (v). |
static Vector |
Vector.fromArray(double[] array)
Creates a new
Vector from the given array w/o
copying the underlying array. |
static Vector |
Vector.fromCollection(Collection<? extends Number> list)
Creates new
BasicVector from list |
static Vector |
Vector.fromCSV(String csv)
Parses
Vector from the given CSV string. |
static Vector |
Vector.fromMap(Map<Integer,? extends Number> map,
int length)
Creates new
SparseVector from list |
static Vector |
Vector.fromMatrixMarket(String mm)
Parses
Vector from the given Matrix Market string. |
abstract Vector |
Matrix.getColumn(int j)
Copies the specified column of this matrix into the vector.
|
abstract Vector |
Matrix.getRow(int i)
Copies the specified row of this matrix into the vector.
|
Vector |
Vector.hadamardProduct(Vector that)
Calculates the Hadamard (element-wise) product of this vector and given
that . |
Vector |
Vector.multiply(double value)
Multiplies this vector (X) by given
value (v). |
Vector |
Vector.multiply(Matrix that)
Multiples this vector (X) by given
that (A). |
Vector |
Matrix.multiply(Vector that)
Multiplies this matrix (A) by given
that vector (x). |
static Vector |
Vector.random(int length,
Random random)
|
Vector |
Vector.select(int[] indices)
Returns a new vector with the selected elements.
|
Vector |
Vector.shuffle()
Shuffles this vector.
|
Vector |
Vector.slice(int from,
int until)
Retrieves the specified sub-vector of this vector.
|
Vector |
Vector.sliceLeft(int until)
Retrieves the specified sub-vector of this vector.
|
Vector |
Vector.sliceRight(int from)
Retrieves the specified sub-vector of this vector.
|
Vector |
Vector.subtract(double value)
Subtracts given
value (v) from this vector (X). |
Vector |
Vector.subtract(Vector that)
Subtracts given
that (Y) from this vector (X). |
Vector |
Matrix.toColumnVector()
Converts this matrix into the column vector.
|
Vector |
Matrix.toRowVector()
Converts this matrix into the row vector.
|
Vector |
Vector.transform(VectorFunction function)
Builds a new vector by applying given
function to each element
of this vector. |
static Vector |
Vector.unit(int length)
Creates an unit
Vector of the given length . |
static Vector |
Vector.zero(int length)
Creates a zero
Vector of the given length . |
Modifier and Type | Method and Description |
---|---|
Vector |
Vector.add(Vector that)
Adds given
vector (X) to this vector (Y). |
abstract <T> T |
Matrix.apply(MatrixVectorOperation<T> operation,
Vector that)
Pipes this matrix to a given
operation . |
abstract <T> T |
Vector.apply(VectorVectorOperation<T> operation,
Vector that)
Pipes this vector to a given
operation . |
boolean |
Vector.equals(Vector that,
double precision)
Returns true when vector is equal to given
that vector with given
precision . |
Vector |
Vector.hadamardProduct(Vector that)
Calculates the Hadamard (element-wise) product of this vector and given
that . |
double |
Vector.innerProduct(Vector that)
Calculates the inner product of this vector and given
that . |
Matrix |
Matrix.insertColumn(int j,
Vector column)
Adds one column to matrix.
|
Matrix |
Matrix.insertRow(int i,
Vector row)
Adds one row to matrix.
|
Vector |
Matrix.multiply(Vector that)
Multiplies this matrix (A) by given
that vector (x). |
Matrix |
Vector.outerProduct(Vector that)
Calculates the outer product of this vector and given
that . |
void |
Matrix.setColumn(int j,
Vector column)
Copies given
column into the specified column of this matrix. |
void |
Matrix.setRow(int i,
Vector row)
Copies given
row into the specified row of this matrix. |
Vector |
Vector.subtract(Vector that)
Subtracts given
that (Y) from this vector (X). |
Modifier and Type | Method and Description |
---|---|
Vector |
SweepSolver.solve(Vector b) |
Vector |
SquareRootSolver.solve(Vector b) |
Vector |
SeidelSolver.solve(Vector b) |
Vector |
LinearSystemSolver.solve(Vector b)
Solves the system A*x = b.
|
Vector |
LeastSquaresSolver.solve(Vector b) |
Vector |
LeastNormSolver.solve(Vector b) |
Vector |
JacobiSolver.solve(Vector b) |
Vector |
GaussianSolver.solve(Vector b) |
Vector |
ForwardBackSubstitutionSolver.solve(Vector b) |
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractSolver.ensureRHSIsCorrect(Vector vector) |
Vector |
SweepSolver.solve(Vector b) |
Vector |
SquareRootSolver.solve(Vector b) |
Vector |
SeidelSolver.solve(Vector b) |
Vector |
LinearSystemSolver.solve(Vector b)
Solves the system A*x = b.
|
Vector |
LeastSquaresSolver.solve(Vector b) |
Vector |
LeastNormSolver.solve(Vector b) |
Vector |
JacobiSolver.solve(Vector b) |
Vector |
GaussianSolver.solve(Vector b) |
Vector |
ForwardBackSubstitutionSolver.solve(Vector b) |
Modifier and Type | Method and Description |
---|---|
Vector |
SparseMatrix.getColumn(int j) |
Vector |
DenseMatrix.getColumn(int j) |
Vector |
SparseMatrix.getRow(int i) |
Vector |
DenseMatrix.getRow(int i) |
Modifier and Type | Method and Description |
---|---|
<T> T |
RowMajorSparseMatrix.apply(MatrixVectorOperation<T> operation,
Vector that) |
<T> T |
DenseMatrix.apply(MatrixVectorOperation<T> operation,
Vector that) |
<T> T |
ColumnMajorSparseMatrix.apply(MatrixVectorOperation<T> operation,
Vector that) |
Modifier and Type | Method and Description |
---|---|
Vector |
Basic2DMatrix.getRow(int i) |
Vector |
Basic1DMatrix.getRow(int i) |
Modifier and Type | Method and Description |
---|---|
Vector |
CRSMatrix.getColumn(int j) |
Vector |
CCSMatrix.getColumn(int j) |
Vector |
CRSMatrix.getRow(int i) |
Vector |
CCSMatrix.getRow(int i) |
Modifier and Type | Method and Description |
---|---|
abstract R |
CommonVectorVectorOperation.applyCommon(Vector a,
Vector b) |
void |
MatrixVectorOperation.ensureApplicableTo(Matrix a,
Vector b) |
void |
VectorOperation.ensureApplicableTo(Vector a) |
void |
VectorMatrixOperation.ensureApplicableTo(Vector a,
Matrix b) |
void |
VectorVectorOperation.ensureApplicableTo(Vector a,
Vector b) |
Modifier and Type | Method and Description |
---|---|
Vector |
OoPlaceMatrixByVectorMultiplication.apply(ColumnMajorSparseMatrix a,
DenseVector b) |
Vector |
OoPlaceMatrixByVectorMultiplication.apply(ColumnMajorSparseMatrix a,
SparseVector b) |
Vector |
OoPlaceMatrixByVectorMultiplication.apply(DenseMatrix a,
DenseVector b) |
Vector |
OoPlaceMatrixByVectorMultiplication.apply(DenseMatrix a,
SparseVector b) |
Vector |
OoPlaceVectorByMatrixMultiplication.apply(DenseVector a,
ColumnMajorSparseMatrix b) |
Vector |
OoPlaceVectorByMatrixMultiplication.apply(DenseVector a,
DenseMatrix b) |
Vector |
OoPlaceVectorsSubtraction.apply(DenseVector a,
DenseVector b) |
Vector |
OoPlaceVectorsAddition.apply(DenseVector a,
DenseVector b) |
Vector |
OoPlaceVectorHadamardProduct.apply(DenseVector a,
DenseVector b) |
Vector |
OoPlaceVectorByMatrixMultiplication.apply(DenseVector a,
RowMajorSparseMatrix b) |
Vector |
OoPlaceVectorsSubtraction.apply(DenseVector a,
SparseVector b) |
Vector |
OoPlaceMatrixByVectorMultiplication.apply(RowMajorSparseMatrix a,
DenseVector b) |
Vector |
OoPlaceMatrixByVectorMultiplication.apply(RowMajorSparseMatrix a,
SparseVector b) |
Vector |
OoPlaceVectorByMatrixMultiplication.apply(SparseVector a,
ColumnMajorSparseMatrix b) |
Vector |
OoPlaceVectorByMatrixMultiplication.apply(SparseVector a,
DenseMatrix b) |
Vector |
OoPlaceVectorsSubtraction.apply(SparseVector a,
DenseVector b) |
Vector |
OoPlaceVectorByMatrixMultiplication.apply(SparseVector a,
RowMajorSparseMatrix b) |
Vector |
OoPlaceVectorsSubtraction.apply(SparseVector a,
SparseVector b) |
Vector |
OoPlaceVectorsAddition.apply(SparseVector a,
SparseVector b) |
Vector |
OoPlaceVectorHadamardProduct.apply(SparseVector a,
SparseVector b) |
Vector |
OoPlaceVectorsAddition.applySymmetric(DenseVector a,
SparseVector b) |
Vector |
OoPlaceVectorHadamardProduct.applySymmetric(DenseVector a,
SparseVector b) |
Modifier and Type | Method and Description |
---|---|
void |
OoPlaceMatrixByVectorMultiplication.ensureApplicableTo(Matrix a,
Vector b) |
void |
OoPlaceVectorByMatrixMultiplication.ensureApplicableTo(Vector a,
Matrix b) |
void |
OoPlaceVectorsSubtraction.ensureApplicableTo(Vector a,
Vector b) |
void |
OoPlaceVectorsAddition.ensureApplicableTo(Vector a,
Vector b) |
void |
OoPlaceVectorHadamardProduct.ensureApplicableTo(Vector a,
Vector b) |
void |
OoPlaceInnerProduct.ensureApplicableTo(Vector a,
Vector b) |
Modifier and Type | Class and Description |
---|---|
class |
VectorFactory<T extends Vector>
An abstract vector factory.
|
Modifier and Type | Class and Description |
---|---|
class |
DenseVector
A dense vector.
|
class |
SparseVector
A sparse vector.
|
Modifier and Type | Method and Description |
---|---|
<T extends Vector> |
SparseVector.to(VectorFactory<T> factory) |
Modifier and Type | Method and Description |
---|---|
Vector |
SparseVector.add(double value) |
Vector |
SparseVector.multiply(double value) |
Modifier and Type | Method and Description |
---|---|
<T> T |
SparseVector.apply(VectorVectorOperation<T> operation,
Vector that) |
<T> T |
DenseVector.apply(VectorVectorOperation<T> operation,
Vector that) |
Modifier and Type | Class and Description |
---|---|
class |
BasicVector
A basic dense vector implementation using an array.
|
Modifier and Type | Method and Description |
---|---|
<T extends Vector> |
BasicVector.to(VectorFactory<T> factory) |
Modifier and Type | Method and Description |
---|---|
Vector |
BasicVector.blankOfLength(int length) |
Vector |
BasicVector.copyOfLength(int length) |
Modifier and Type | Class and Description |
---|---|
class |
CompressedVector
A basic sparse vector implementation using underlying value and index arrays.
|
Modifier and Type | Method and Description |
---|---|
<T extends Vector> |
CompressedVector.to(VectorFactory<T> factory) |
Modifier and Type | Method and Description |
---|---|
Vector |
CompressedVector.blankOfLength(int length) |
Vector |
CompressedVector.copyOfLength(int length) |
Copyright © 2015. All rights reserved.