vmm3d.pseudospherical
Class ComplexMatrix2D
- java.lang.Object
-
- vmm3d.pseudospherical.ComplexMatrix2D
-
public class ComplexMatrix2D extends java.lang.ObjectThis class implements a complex two-by-two matrix. if A is an object of this class, then the (i,j)-th entry of the matrix is A.entries[i,j] Here i and j can be 1 or 2
-
-
Constructor Summary
Constructors Constructor and Description ComplexMatrix2D()default constructor, initializes all entries to 0ComplexMatrix2D(ComplexMatrix2D inp)constructor that copies the content of inp
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description ComplexMatrix2Dadd(ComplexMatrix2D inp)compute and return the result of adding the matrix with inpComplexMatrix2Dconjugate()compute and return the conjugate of the matrixComplexdeterminant()return the determinant of the matrix.booleanequals(ComplexMatrix2D inp)test for equality two matrices are equal if and only if all their corresponding entries are equalComplexgetMatrixEntry(int i, int j)return the entry at location (i,j) in the matrix where 1 <= i,j <= 2static ComplexMatrix2DgetProj(ComplexVector2D v)static method returning an object of type ComplexMatrix2D that is the projection matrix onto the direction of vector vvoidinitialize()ComplexMatrix2Dinverse()compute the inverse of the matrix if the matrix is not invertible, return nullComplexMatrix2Dmultiply(ComplexMatrix2D inp)multiply to the right by matrix inp return the productComplexMatrix2DscalarMul(Complex c)compute and return the result of multiplying the matrix with the complex number cvoidsetMatrixEntry(Complex val, int i, int j)set the entry (i,j) in the matrix to the value of valComplexMatrix2Dsubtract(ComplexMatrix2D inp)compute and return the result of subtracting inp from the matrixjava.lang.StringtoString()print the content of the matrix in the format {{a11,a12},{a21,a22}}Complextrace()return the trace of the matrix.ComplexMatrix2Dtranspose()compute and return the transpose of the matrixComplexVector2DvectMul(ComplexVector2D v)return an object of type ComplexVector2D that is the result of multiplying the matrix with a complex vector v
-
-
-
Constructor Detail
-
ComplexMatrix2D
public ComplexMatrix2D()
default constructor, initializes all entries to 0
-
ComplexMatrix2D
public ComplexMatrix2D(ComplexMatrix2D inp)
constructor that copies the content of inp
-
-
Method Detail
-
initialize
public void initialize()
-
getMatrixEntry
public Complex getMatrixEntry(int i, int j)
return the entry at location (i,j) in the matrix where 1 <= i,j <= 2
-
setMatrixEntry
public void setMatrixEntry(Complex val, int i, int j)
set the entry (i,j) in the matrix to the value of val
-
inverse
public ComplexMatrix2D inverse()
compute the inverse of the matrix if the matrix is not invertible, return null
-
multiply
public ComplexMatrix2D multiply(ComplexMatrix2D inp)
multiply to the right by matrix inp return the product
-
transpose
public ComplexMatrix2D transpose()
compute and return the transpose of the matrix
-
conjugate
public ComplexMatrix2D conjugate()
compute and return the conjugate of the matrix
-
add
public ComplexMatrix2D add(ComplexMatrix2D inp)
compute and return the result of adding the matrix with inp
-
subtract
public ComplexMatrix2D subtract(ComplexMatrix2D inp)
compute and return the result of subtracting inp from the matrix
-
scalarMul
public ComplexMatrix2D scalarMul(Complex c)
compute and return the result of multiplying the matrix with the complex number c
-
equals
public boolean equals(ComplexMatrix2D inp)
test for equality two matrices are equal if and only if all their corresponding entries are equal
-
toString
public java.lang.String toString()
print the content of the matrix in the format {{a11,a12},{a21,a22}}- Overrides:
toStringin classjava.lang.Object
-
getProj
public static ComplexMatrix2D getProj(ComplexVector2D v)
static method returning an object of type ComplexMatrix2D that is the projection matrix onto the direction of vector v
-
vectMul
public ComplexVector2D vectMul(ComplexVector2D v)
return an object of type ComplexVector2D that is the result of multiplying the matrix with a complex vector v
-
trace
public Complex trace()
return the trace of the matrix. the trace of a matrix is the sum of its entries along the diagonal
-
determinant
public Complex determinant()
return the determinant of the matrix. the determinant of a 2x2 matrix of the form {{a,b},{c,d}} is ad-bc
-
-
DMelt 3.0 © DataMelt by jWork.ORG