Class Matrix3f
- java.lang.Object
-
- WildMagic.LibFoundation.Mathematics.Matrix3f
-
- All Implemented Interfaces:
java.io.Serializable
public class Matrix3f extends java.lang.Object implements java.io.Serializable
Matrix operations are applied on the left. For example, given a matrix M and a vector V, matrix-times-vector is M*V. That is, V is treated as a column vector. Some graphics APIs use V*M where V is treated as a row vector. In this context the "M" matrix is really a transpose of the M as represented in Wild Magic. Similarly, to apply two matrix operations M0 and M1, in that order, you compute M1*M0 so that the transform of a vector is (M1*M0)*V = M1*(M0*V). Some graphics APIs use M0*M1, but again these matrices are the transpose of those as represented in Wild Magic. You must therefore be careful about how you interface the transformation code with graphics APIS. The (x,y,z) coordinate system is assumed to be right-handed. Coordinate axis rotation matrices are of the form RX = 1 0 0 0 cos(t) -sin(t) 0 sin(t) cos(t) where t > 0 indicates a counterclockwise rotation in the yz-plane RY = cos(t) 0 sin(t) 0 1 0 -sin(t) 0 cos(t) where t > 0 indicates a counterclockwise rotation in the zx-plane RZ = cos(t) -sin(t) 0 sin(t) cos(t) 0 0 0 1 where t > 0 indicates a counterclockwise rotation in the xy-plane.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Matrix3f()
Constructor, defaults to zero-matrix:Matrix3f(boolean bZero)
If bZero is true, create the zero matrix.Matrix3f(float[] afEntry, boolean bRowMajor)
Create a matrix from an array of numbers.Matrix3f(float fM00, float fM11, float fM22)
create a diagonal matrixMatrix3f(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
input Mrc is in row r, column c.Matrix3f(Matrix3f rkM)
copy constructorMatrix3f(Vector3f[] akV, boolean bColumns)
Create matrices based on vector input.Matrix3f(Vector3f rkAxis, float fAngle)
Create rotation matrices (positive angle - counterclockwise).Matrix3f(Vector3f rkU, Vector3f rkV)
create a tensor product U*V^TMatrix3f(Vector3f rkU, Vector3f rkV, Vector3f rkW, boolean bColumns)
Create matrices based on vector input.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Matrix3f
add(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
Matrix3f
add(Matrix3f kMat)
this = this + kMatstatic Matrix3f
add(Matrix3f kMat1, Matrix3f kMat2)
void
Add(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
Deprecated.void
Add(Matrix3f kMat)
Deprecated.void
Add(Matrix3f kMat1, Matrix3f kMat2)
Deprecated.Matrix3f
adjoint()
void
Adjoint()
Deprecated.Matrix3f
copy(Matrix3f rkM)
Copy this = rkMvoid
Copy(Matrix3f rkM)
Deprecated.float
determinant()
float
Determinant()
Deprecated.Matrix3f
diagonalTimes(Vector3f kDiag)
void
DiagonalTimes(Vector3f kDiag)
Deprecated.static boolean
eigenDecomposition(Matrix3f rkRot, Matrix3f rkDiag)
Factor M = R*D*R^T.static boolean
EigenDecomposition(Matrix3f rkRot, Matrix3f rkDiag)
Deprecated.boolean
equals(java.lang.Object kObject)
Matrix3f
fromAxisAngle(Vector3f rkAxis, float fAngle)
void
FromAxisAngle(Vector3f rkAxis, float fAngle)
Deprecated.float
get(int iIndex)
float
get(int iRow, int iCol)
float
Get(int iIndex)
Deprecated.float
Get(int iRow, int iCol)
Deprecated.Vector3f
getColumn(int iCol)
void
getColumn(int iCol, Vector3f kResult)
void
GetColumn(int iCol, Vector3f kResult)
Deprecated.void
getColumnMajor(float[] afCMajor)
void
GetColumnMajor(float[] afCMajor)
Deprecated.void
getData(float[] afData)
void
GetData(float[] afData)
Deprecated.Matrix3f
identity()
Matrix3f
inverse()
Invert a 3x3 using cofactors.static Matrix3f
inverse(Matrix3f kM)
void
Inverse()
Deprecated.void
Inverse(Matrix3f kM)
Deprecated.static void
main(java.lang.String[] args)
Matrix3f
makeDiagonal(float fM00, float fM11, float fM22)
void
MakeDiagonal(float fM00, float fM11, float fM22)
Deprecated.void
MakeIdentity()
Deprecated.Matrix3f
makeTensorProduct(Vector3f rkU, Vector3f rkV)
void
MakeTensorProduct(Vector3f rkU, Vector3f rkV)
Deprecated.void
MakeZero()
Deprecated.Matrix3f
mult(Matrix3f kM)
static Matrix3f
mult(Matrix3f kM1, Matrix3f kM2)
Vector3f
mult(Vector3f kV)
void
mult(Vector3f kV, Vector3f kResult)
kResult = this * kVvoid
Mult(Matrix3f kM)
Deprecated.void
Mult(Matrix3f kM1, Matrix3f kM2)
Deprecated.void
Mult(Vector3f kV, Vector3f kResult)
Deprecated.Matrix3f
multLeft(Matrix3f kM)
this = kM * thisVector3f
multLeft(Vector3f kV)
void
multLeft(Vector3f kV, Vector3f kResult)
void
MultLeft(Matrix3f kM)
Deprecated.void
MultLeft(Vector3f kV, Vector3f kResult)
Deprecated.Vector3f
multRight(Vector3f kV)
void
multRight(Vector3f kV, Vector3f kResult)
void
MultRight(Vector3f kV, Vector3f kResult)
Deprecated.Matrix3f
orthonormalize()
The matrix must be a rotation for these functions to be valid.void
Orthonormalize()
Deprecated.float
qForm(Vector3f rkU, Vector3f rkV)
float
QForm(Vector3f rkU, Vector3f rkV)
Deprecated.private static boolean
qlAlgorithm(Matrix3f rkRot, float[] afDiag, float[] afSubd)
This is an implementation of the symmetric QR algorithm from the book "Matrix Computations" by Gene H.Matrix3f
scale(float fScalar)
this = this * fScalarvoid
Scale(float fScalar)
Deprecated.Matrix3f
set(float[] afEntry, boolean bRowMajor)
Matrix3f
set(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
Matrix3f
set(int iIndex, float fValue)
Matrix3f
set(int iRow, int iCol, float fValue)
void
Set(float[] afEntry, boolean bRowMajor)
Deprecated.void
Set(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
Deprecated.void
Set(int iIndex, float fValue)
Deprecated.void
Set(int iRow, int iCol, float fValue)
Deprecated.Matrix3f
setColumn(int iCol, Vector3f kV)
void
SetColumn(int iCol, Vector3f kV)
Deprecated.static boolean
test()
static boolean
test(int count)
Matrix3f
timesDiagonal(Vector3f kDiag)
Compute this matrix times the diagonal vector: this = M*Dvoid
TimesDiagonal(Vector3f kDiag)
Deprecated.Matrix3f
timesTranspose(Matrix3f kM)
void
TimesTranspose(Matrix3f kM)
Deprecated.float
toAxisAngle(Vector3f rkAxis)
float
ToAxisAngle(Vector3f rkAxis)
Deprecated.java.lang.String
toString()
Returns a string representation of the matrix values.Matrix3f
transpose()
Transpose this matrix: this = this^Tvoid
Transpose()
Deprecated.Matrix3f
transposeTimes(Matrix3f kM)
void
TransposeTimes(Matrix3f kM)
Deprecated.private static boolean
tridiagonalize(Matrix3f rkRot, float[] afDiag, float[] afSubd)
Householder reduction T = Q^t M Q Input: mat, symmetric 3x3 matrix M Output:Matrix3f
zero()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ZERO
public static final Matrix3f ZERO
Zero matrix:
-
IDENTITY
public static final Matrix3f IDENTITY
Identity matrix:
-
M00
public float M00
Matrix data:
-
M01
public float M01
Matrix data:
-
M02
public float M02
Matrix data:
-
M10
public float M10
-
M11
public float M11
-
M12
public float M12
-
M20
public float M20
-
M21
public float M21
-
M22
public float M22
-
-
Constructor Detail
-
Matrix3f
public Matrix3f()
Constructor, defaults to zero-matrix:
-
Matrix3f
public Matrix3f(boolean bZero)
If bZero is true, create the zero matrix. Otherwise, create the identity matrix.- Parameters:
bZero
- when true create zero matrix, when false create identity.
-
Matrix3f
public Matrix3f(float fM00, float fM11, float fM22)
create a diagonal matrix- Parameters:
fM00
- 0-diagonal valuefM11
- 1-diagonal valuefM22
- 2-diagonal value
-
Matrix3f
public Matrix3f(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
input Mrc is in row r, column c.- Parameters:
fM00
- matrix[0] entryfM01
- matrix[1] entryfM02
- matrix[2] entryfM10
- matrix[3] entryfM11
- matrix[4] entryfM12
- matrix[5] entryfM20
- matrix[6] entryfM21
- matrix[7] entryfM22
- matrix[8] entry
-
Matrix3f
public Matrix3f(float[] afEntry, boolean bRowMajor)
Create a matrix from an array of numbers. The input array is interpreted based on the Boolean input as true: entry[0..8]={m00,m01,m02,m10,m11,m12,m20,m21,m22} [row major] false: entry[0..8]={m00,m10,m20,m01,m11,m21,m02,m12,m22} [col major]- Parameters:
afEntry
- array of values to put in matrixbRowMajor
- when true copy in row major order.
-
Matrix3f
public Matrix3f(Matrix3f rkM)
copy constructor- Parameters:
rkM
- matrix to copy.
-
Matrix3f
public Matrix3f(Vector3f rkAxis, float fAngle)
Create rotation matrices (positive angle - counterclockwise). The angle must be in radians, not degrees.- Parameters:
rkAxis
- rotation axisfAngle
- rotation angle in radians
-
Matrix3f
public Matrix3f(Vector3f rkU, Vector3f rkV)
create a tensor product U*V^T- Parameters:
rkU
- U-VectorrkV
- V-Vector
-
Matrix3f
public Matrix3f(Vector3f rkU, Vector3f rkV, Vector3f rkW, boolean bColumns)
Create matrices based on vector input. The Boolean is interpreted as true: vectors are columns of the matrix false: vectors are rows of the matrix- Parameters:
rkU
- input vector1rkV
- input vector2rkW
- input vector3bColumns
- when true vectors are columns of matrix.
-
Matrix3f
public Matrix3f(Vector3f[] akV, boolean bColumns)
Create matrices based on vector input. The Boolean is interpreted as true: vectors are columns of the matrix false: vectors are rows of the matrix- Parameters:
akV
- input vector[3]bColumns
- when true vectors are columns of matrix.
-
-
Method Detail
-
EigenDecomposition
public static boolean EigenDecomposition(Matrix3f rkRot, Matrix3f rkDiag)
Deprecated.Factor M = R*D*R^T. The columns of R are the eigenvectors. The diagonal entries of D are the corresponding eigenvalues.- Parameters:
rkRot
-rkDiag
-
-
eigenDecomposition
public static boolean eigenDecomposition(Matrix3f rkRot, Matrix3f rkDiag)
Factor M = R*D*R^T. The columns of R are the eigenvectors. The diagonal entries of D are the corresponding eigenvalues.- Parameters:
rkRot
-rkDiag
-
-
qlAlgorithm
private static boolean qlAlgorithm(Matrix3f rkRot, float[] afDiag, float[] afSubd)
This is an implementation of the symmetric QR algorithm from the book "Matrix Computations" by Gene H. Golub and Charles F. Van Loan, second edition. The algorithm is 8.2.3. The implementation has a slight variation to actually make it a QL algorithm, and it traps the case when either of the subdiagonal terms s0 or s1 is zero and reduces the 2-by-2 subblock directly.- Parameters:
rkRot
-afDiag
-afSubd
-
-
tridiagonalize
private static boolean tridiagonalize(Matrix3f rkRot, float[] afDiag, float[] afSubd)
Householder reduction T = Q^t M Q Input: mat, symmetric 3x3 matrix M Output:- Parameters:
rkRot
- mat, orthogonal matrix Q (a reflection)afDiag
- diag, diagonal entries of TafSubd
- subd, subdiagonal entries of T (T is symmetric)
-
Add
public final void Add(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
Deprecated.Add to this matrix.- Parameters:
fM00
-fM01
-fM02
-fM10
-fM11
-fM12
-fM20
-fM21
-fM22
-
-
add
public final Matrix3f add(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
-
Add
public final void Add(Matrix3f kMat)
Deprecated.Add to this matrix.- Parameters:
kMat
-
-
Add
public final void Add(Matrix3f kMat1, Matrix3f kMat2)
Deprecated.Add to this matrix = kMat1 + kMat2.- Parameters:
kMat1
-kMat2
-
-
Adjoint
public void Adjoint()
Deprecated.Compute the adjoint of this matrix: this = Adjoint(this)
-
adjoint
public Matrix3f adjoint()
-
Copy
public void Copy(Matrix3f rkM)
Deprecated.Set the values of this.- Parameters:
rkM
- matrix to copy.
-
Determinant
public float Determinant()
Deprecated.Return the determinant of this matrix.- Returns:
- the determinant of this matrix.
-
determinant
public float determinant()
-
DiagonalTimes
public void DiagonalTimes(Vector3f kDiag)
Deprecated.Compute the diagonal vector times this matrix: this = D*M- Parameters:
kDiag
- diagonal vector
-
FromAxisAngle
public void FromAxisAngle(Vector3f rkAxis, float fAngle)
Deprecated.Create a rotation matrix from an axis and angle in radians.- Parameters:
rkAxis
- rotation axisfAngle
- rotation angle in radians
-
Get
public final float Get(int iIndex)
Deprecated.Get member access- Parameters:
iIndex
- matrix index- Returns:
- matrix[iIndex]
-
get
public final float get(int iIndex)
-
Get
public final float Get(int iRow, int iCol)
Deprecated.Get member access- Parameters:
iRow
- row-valueiCol
- column-value- Returns:
- matrix[iRow*3 + iCol]
-
get
public final float get(int iRow, int iCol)
-
GetColumn
public void GetColumn(int iCol, Vector3f kResult)
Deprecated.Get member access- Parameters:
iCol
- column to getkResult
- column vector values
-
getColumn
public void getColumn(int iCol, Vector3f kResult)
-
getColumn
public Vector3f getColumn(int iCol)
-
GetColumnMajor
public void GetColumnMajor(float[] afCMajor)
Deprecated.Get member access. Copies matrix into input array in Column-Major order.- Parameters:
afCMajor
- copy matrix into array.
-
getColumnMajor
public void getColumnMajor(float[] afCMajor)
-
GetData
public void GetData(float[] afData)
Deprecated.Get member access. Copies matrix into input array.- Parameters:
afData
- copy matrix into array.
-
getData
public void getData(float[] afData)
-
Inverse
public void Inverse()
Deprecated.Invert a 3x3 using cofactors. This is faster than using a generic Gaussian elimination because of the loop overhead of such a method. this = this -1
-
inverse
public Matrix3f inverse()
Invert a 3x3 using cofactors. This is faster than using a generic Gaussian elimination because of the loop overhead of such a method. this = this -1- Returns:
- this
-
Inverse
public void Inverse(Matrix3f kM)
Deprecated.Invert a 3x3 using cofactors. This is faster than using a generic Gaussian elimination because of the loop overhead of such a method.- Parameters:
kM
- the matrix to invert. this = kM-1
-
MakeDiagonal
public void MakeDiagonal(float fM00, float fM11, float fM22)
Deprecated.Create a diagonal matrix:- Parameters:
fM00
- matrix[0] entryfM11
- matrix[4] entryfM22
- matrix[8] entry
-
makeDiagonal
public Matrix3f makeDiagonal(float fM00, float fM11, float fM22)
-
MakeIdentity
public void MakeIdentity()
Deprecated.make this the identity matrix
-
identity
public Matrix3f identity()
-
MakeTensorProduct
public void MakeTensorProduct(Vector3f rkU, Vector3f rkV)
Deprecated.create a tensor product U*V^T- Parameters:
rkU
- U-VectorrkV
- V-Vector
-
MakeZero
public void MakeZero()
Deprecated.make this the zero matrix
-
zero
public Matrix3f zero()
-
Mult
public void Mult(Matrix3f kM)
Deprecated.Multiply this matrix to the input matrix: this = this * kM.- Parameters:
kM
- input matrix
-
Mult
public void Mult(Matrix3f kM1, Matrix3f kM2)
Deprecated.Multiply this matrix to the input matrix: this = kM1 * kM2.- Parameters:
kM1
- first input matrixkM2
- second input matrix
-
Mult
public void Mult(Vector3f kV, Vector3f kResult)
Deprecated.Matrix times vector: Result = this * v- Parameters:
kV
- vectorkResult
- = this * v
-
mult
public void mult(Vector3f kV, Vector3f kResult)
kResult = this * kV- Parameters:
kV
-kResult
-
-
MultLeft
public void MultLeft(Matrix3f kM)
Deprecated.Multiply this matrix to the input matrix: this = kM * this.- Parameters:
kM
- input matrix
-
MultLeft
public void MultLeft(Vector3f kV, Vector3f kResult)
Deprecated.matrix times vector: kResult = v^T * this- Parameters:
kV
- vectorkResult
- = v^T * this
-
MultRight
public void MultRight(Vector3f kV, Vector3f kResult)
Deprecated.Matrix times vector: Result = this * v- Parameters:
kV
- vectorkResult
- = this * v- See Also:
Mult(Vector3f kV, Vector3f kResult)
-
Orthonormalize
public void Orthonormalize()
Deprecated.The matrix must be a rotation for these functions to be valid. The last function uses Gram-Schmidt orthonormalization applied to the columns of the rotation matrix. The angle must be in radians, not degrees. Algorithm uses Gram-Schmidt orthogonalization. If 'this' matrix is M = [m0|m1|m2], then orthonormal output matrix is Q = [q0|q1|q2], q0 = m0/|m0| q1 = (m1-(q0*m1)q0)/|m1-(q0*m1)q0| q2 = (m2-(q0*m2)q0-(q1*m2)q1)/|m2-(q0*m2)q0-(q1*m2)q1| where |V| indicates length of vector V and A*B indicates dot product of vectors A and B.
-
orthonormalize
public Matrix3f orthonormalize()
The matrix must be a rotation for these functions to be valid. The last function uses Gram-Schmidt orthonormalization applied to the columns of the rotation matrix. The angle must be in radians, not degrees. Algorithm uses Gram-Schmidt orthogonalization. If 'this' matrix is M = [m0|m1|m2], then orthonormal output matrix is Q = [q0|q1|q2], q0 = m0/|m0| q1 = (m1-(q0*m1)q0)/|m1-(q0*m1)q0| q2 = (m2-(q0*m2)q0-(q1*m2)q1)/|m2-(q0*m2)q0-(q1*m2)q1| where |V| indicates length of vector V and A*B indicates dot product of vectors A and B.- Returns:
- this
-
QForm
public float QForm(Vector3f rkU, Vector3f rkV)
Deprecated.Calculate and return u^T*M*v- Parameters:
rkU
- urkV
- v- Returns:
- u^T*M*v
-
Scale
public void Scale(float fScalar)
Deprecated.Multiply this matrix by the scalar input: this = this * fScalar.- Parameters:
fScalar
- scalar value
-
scale
public Matrix3f scale(float fScalar)
this = this * fScalar- Parameters:
fScalar
-- Returns:
- this
-
Set
public final void Set(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
Deprecated.input Mrc is in row r, column c.- Parameters:
fM00
- matrix[0] entryfM01
- matrix[1] entryfM02
- matrix[2] entryfM10
- matrix[3] entryfM11
- matrix[4] entryfM12
- matrix[5] entryfM20
- matrix[6] entryfM21
- matrix[7] entryfM22
- matrix[8] entry
-
set
public Matrix3f set(float fM00, float fM01, float fM02, float fM10, float fM11, float fM12, float fM20, float fM21, float fM22)
-
Set
public void Set(float[] afEntry, boolean bRowMajor)
Deprecated.Create a matrix from an array of numbers. The input array is interpreted based on the Boolean input as true: entry[0..8]={m00,m01,m02,m10,m11,m12,m20,m21,m22} [row major] false: entry[0..8]={m00,m10,m20,m01,m11,m21,m02,m12,m22} [col major]- Parameters:
afEntry
- array of values to put in matrixbRowMajor
- when true copy in row major order.
-
set
public Matrix3f set(float[] afEntry, boolean bRowMajor)
-
Set
public void Set(int iIndex, float fValue)
Deprecated.- Parameters:
iIndex
- matrix index
-
set
public Matrix3f set(int iIndex, float fValue)
-
Set
public final void Set(int iRow, int iCol, float fValue)
Deprecated.Set the values of this.- Parameters:
iRow
- row-valueiCol
- column-valuefValue
- matrix[iIndex] new value
-
set
public final Matrix3f set(int iRow, int iCol, float fValue)
-
SetColumn
public void SetColumn(int iCol, Vector3f kV)
Deprecated.Set member access- Parameters:
iCol
- column to setkV
- new column vector values
-
TimesDiagonal
public void TimesDiagonal(Vector3f kDiag)
Deprecated.Compute this matrix times the diagonal vector: this = M*D- Parameters:
kDiag
- diagonal vector
-
timesDiagonal
public Matrix3f timesDiagonal(Vector3f kDiag)
Compute this matrix times the diagonal vector: this = M*D- Parameters:
kDiag
- diagonal vector- Returns:
- this
-
TimesTranspose
public void TimesTranspose(Matrix3f kM)
Deprecated.Multiply this matrix by transpose of the input matrix: this = this * M^T- Parameters:
kM
- matrix
-
ToAxisAngle
public float ToAxisAngle(Vector3f rkAxis)
Deprecated.The matrix must be a rotation for these functions to be valid. Let (x,y,z) be the unit-length axis and let A be an angle of rotation. The rotation matrix is R = I + sin(A)*P + (1-cos(A))*P^2 where I is the identity and +- -+ P = | 0 -z +y | | +z 0 -x | | -y +x 0 | +- -+ If A > 0, R represents a counterclockwise rotation about the axis in the sense of looking from the tip of the axis vector towards the origin. Some algebra will show that cos(A) = (trace(R)-1)/2 and R - R^t = 2*sin(A)*P In the event that A = pi, R-R^t = 0 which prevents us from extracting the axis through P. Instead note that R = I+2*P^2 when A = pi, so P^2 = (R-I)/2. The diagonal entries of P^2 are x^2-1, y^2-1, and z^2-1. We can solve these for axis (x,y,z). Because the angle is pi, it does not matter which sign you choose on the square roots.- Parameters:
rkAxis
- rotation axis- Returns:
- rotation angle
-
toAxisAngle
public float toAxisAngle(Vector3f rkAxis)
-
toString
public java.lang.String toString()
Returns a string representation of the matrix values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- string representation of the matrix values.
-
Transpose
public void Transpose()
Deprecated.Transpose this matrix: this = this^T
-
transpose
public Matrix3f transpose()
Transpose this matrix: this = this^T- Returns:
- this
-
TransposeTimes
public void TransposeTimes(Matrix3f kM)
Deprecated.Transpose this matrix and multiply by input: this = this^T * M- Parameters:
kM
- input matrix
-
equals
public boolean equals(java.lang.Object kObject)
- Overrides:
equals
in classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-
test
public static boolean test()
-
test
public static boolean test(int count)
-
-