|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.vector.doubles.dense.operation.CreateVector
public class CreateVector
These are the utility functions that create new instances of vectors from existing ones.
| Method Summary | |
|---|---|
static DenseVector |
concat(java.util.Collection<Vector> vectors)
Concatenate an array of vectors into one vector. |
static DenseVector |
concat(Vector... vectors)
Concatenate an array of vectors into one vector. |
static DenseVector |
diagonal(Matrix A)
Get the diagonal of a matrix as a vector. |
static DenseVector |
foreach(Vector vector,
UnivariateRealFunction f)
Construct a new vector in which each entry is the result of applying a function to the corresponding entry of a vector. |
static DenseVector |
foreachColumn(Matrix matrix,
RealScalarFunction f)
Construct a vector in which each entry is the result of applying a RealScalarFunction to each column of an input matrix. |
static DenseVector |
foreachRow(Matrix matrix,
RealScalarFunction f)
Construct a vector in which each entry is the result of applying a RealScalarFunction to each row of an input matrix. |
static DenseVector |
foreachVector(java.util.Collection<Vector> vectors,
RealScalarFunction f)
Apply a RealScalarFunction on each input vector. |
static Vector[] |
foreachVector(java.util.Collection<Vector> vectors,
RealVectorFunction f)
Apply a real vector function on each input vector. |
static DenseVector |
foreachVector(Vector[] vectors,
RealScalarFunction f)
Apply a RealScalarFunction on each input vector. |
static Vector[] |
foreachVector(Vector[] vectors,
RealVectorFunction f)
Apply a real vector function on each input vector. |
static DenseVector |
getCoordinate(java.util.Collection<Vector> vectors,
int i)
Get the vector entries from a particular coordinate. |
static DenseVector |
getCoordinate(Vector[] vectors,
int i)
Get the vector entries from a particular coordinate. |
static java.util.List<Vector> |
getOffsetVectors(Vector v0,
Vector dv,
int a,
int b)
Given the reference vector v0, the delta dv, and
the range [a, b], the offset vectors are:
v0 + a * dv, v0 + (a + 1) * dv, ..., v0 + b * dv. |
static DenseVector |
subDiagonal(Matrix A)
Get the sub-diagonal of a matrix as a vector. |
static DenseVector |
subVector(Vector vector,
int[] indices)
Get a sub-vector from a vector according to a given array of ordered indices (repetition allowed). |
static DenseVector |
subVector(Vector vector,
int from,
int to)
Get a sub-vector from a vector. |
static DenseVector |
superDiagonal(Matrix A)
Get the super-diagonal of a matrix as a vector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DenseVector concat(Vector... vectors)
vectors - an array of vector, e.g., \((v_1, v_2, v_3, ...)\).
public static DenseVector concat(java.util.Collection<Vector> vectors)
vectors - an array of vector, e.g., \((v_1, v_2, v_3, ...)\).
public static DenseVector foreach(Vector vector,
UnivariateRealFunction f)
f - the function to be applied to each entry of a vectorvector - a vector
public static DenseVector subVector(Vector vector,
int from,
int to)
vector - a vectorfrom - the beginning indexto - the ending index
v[from : to]
public static DenseVector subVector(Vector vector,
int[] indices)
vector - a vectorindices - the array of ordered indices (repetition allowed)
public static DenseVector diagonal(Matrix A)
A - a matrix
public static DenseVector superDiagonal(Matrix A)
A - a matrix
public static DenseVector subDiagonal(Matrix A)
A - a matrix
public static DenseVector foreachRow(Matrix matrix,
RealScalarFunction f)
RealScalarFunction to each row of an input matrix.
matrix - the input matrixf - the real scalar function
public static DenseVector foreachColumn(Matrix matrix,
RealScalarFunction f)
RealScalarFunction to each column of an input matrix.
matrix - the input matrixf - the real scalar function
public static DenseVector foreachVector(Vector[] vectors,
RealScalarFunction f)
RealScalarFunction on each input vector.
vectors - the input vectorsf - the real scalar function
f on the vectors
public static DenseVector foreachVector(java.util.Collection<Vector> vectors,
RealScalarFunction f)
RealScalarFunction on each input vector.
vectors - the input vectorsf - the real scalar function
f on the vectors
public static Vector[] foreachVector(Vector[] vectors,
RealVectorFunction f)
vectors - the input vectorsf - the real vector function
public static Vector[] foreachVector(java.util.Collection<Vector> vectors,
RealVectorFunction f)
vectors - the input vectorsf - the real vector function
public static DenseVector getCoordinate(Vector[] vectors,
int i)
vectors - the input vectorsi - the index to a vector entry; the coordinate index
public static DenseVector getCoordinate(java.util.Collection<Vector> vectors,
int i)
vectors - the input vectorsi - the index to a vector entry; the coordinate index
public static java.util.List<Vector> getOffsetVectors(Vector v0,
Vector dv,
int a,
int b)
v0, the delta dv, and
the range [a, b], the offset vectors are:
v0 + a * dv, v0 + (a + 1) * dv, ..., v0 + b * dv.
v0 - the reference vector v0dv - the change (base offset) made to the vector at each step dva - the minimum multiple of dv that is added to v0b - the maximum multiple of dv that is added to v0
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||