public abstract class AbstractSparseEqnComplexMatrix3x3Impl<T extends ISparseEqnSolver> extends AbstractSparseEquation<T> implements ISparseEqnComplexMatrix3x3
ISparseEquation.IndexType
Modifier and Type | Field and Description |
---|---|
protected AbstractSparseEqnComplexImpl<T> |
cplxMatrix |
colCnt, factored, rowCnt, solver, squareMatrix, zeroAii_row
Constructor and Description |
---|
AbstractSparseEqnComplexMatrix3x3Impl(int n) |
AbstractSparseEqnComplexMatrix3x3Impl(int rows,
int cols) |
Modifier and Type | Method and Description |
---|---|
void |
addToA(Complex3x3 x,
int i,
int j)
Add the aij object to the matrix.
|
void |
addToB(Complex3x1 bi,
int i)
add to bi element.
|
boolean |
factorization()
Factorization, for example LU decomposition, of the matrix.
|
boolean |
factorization(double tolerance)
Factorization, for example LU decomposition, of the matrix.
|
Complex3x3 |
getA(int i,
int j)
Get the aij object.
|
ComplexSEqnRow |
getElem(int i) |
ISparseEqnComplex |
getSparseEqnComplex() |
int |
getTotalElements()
Get the total elements in the matrix
|
Complex3x1 |
getX(int i)
Get the x[i] object, after the eqn is solved.
|
int |
getZeroA_row()
Get zero aii row number, in case the matrix is singular
|
int |
getZeroAii_row()
During the LU process, aii might be zero.
|
void |
increaseDimension()
Increase matrix dimension by 1.
|
void |
reset()
Reset the matrix to zero - set all aii and bi to 0.0 and clear the sparse structure,
and release memory if necessary
|
void |
setA(Complex3x3 x,
int i,
int j)
Set the aij object.
|
void |
setB2Unity(int i)
Set all b elements to 0.0 and bi = 1.0, a unity vector.
|
void |
setB2Zero()
Set all b elements to 0.0
|
void |
setBi(Complex3x1 bi,
int i)
Set b[i] object, before solving the eqn.
|
void |
setBVector(Complex3x1[] bAry)
Set b vector, before solving the eqn.
|
void |
setElem(int i,
ComplexSEqnRow aii) |
void |
setToZero()
Reset all matrix element to zero, preserve the matrix sparse structure.
|
void |
solveEqn()
Solve the [A]X = B problem
|
boolean |
solveEqn(double tolerance)
LU decomposition of the matrix and the solve the [A]X = B problem.
|
java.lang.String |
toString() |
getBusId, getDimension, getDimension, isFactorized, isSquareMatrix, setBusId, setFactorized, setZeroAii_row
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getBusId, getDimension, getDimension, isFactorized, isSquareMatrix, setBusId, setFactorized
protected AbstractSparseEqnComplexImpl<T extends ISparseEqnSolver> cplxMatrix
public AbstractSparseEqnComplexMatrix3x3Impl(int n)
public AbstractSparseEqnComplexMatrix3x3Impl(int rows, int cols)
public ComplexSEqnRow getElem(int i)
public void setElem(int i, ComplexSEqnRow aii)
public void addToA(Complex3x3 x, int i, int j)
ISparseEqnObject
addToA
in interface ISparseEqnObject<Complex3x3,Complex3x1>
x
- the aij elementi
- the element row numberj
- the element column numberpublic Complex3x1 getX(int i)
ISparseEqnObject
getX
in interface ISparseEqnObject<Complex3x3,Complex3x1>
i
- the element row numberpublic void setA(Complex3x3 x, int i, int j)
ISparseEqnObject
setA
in interface ISparseEqnObject<Complex3x3,Complex3x1>
x
- the aij objecti
- the element row numberj
- the element column numberpublic Complex3x3 getA(int i, int j)
ISparseEqnObject
getA
in interface ISparseEqnObject<Complex3x3,Complex3x1>
i
- the element row numberj
- the element column numberpublic void setBi(Complex3x1 bi, int i)
ISparseEqnObject
setBi
in interface ISparseEqnObject<Complex3x3,Complex3x1>
bi
- the bi elementi
- row numberpublic void setBVector(Complex3x1[] bAry)
ISparseEqnObject
setBVector
in interface ISparseEqnObject<Complex3x3,Complex3x1>
bAry
- the b vector elementspublic void addToB(Complex3x1 bi, int i)
ISparseEqnObject
addToB
in interface ISparseEqnObject<Complex3x3,Complex3x1>
bi
- the bi elementi
- row numberpublic int getZeroA_row()
ISparseEqnObject
getZeroA_row
in interface ISparseEqnObject<Complex3x3,Complex3x1>
public void increaseDimension()
ISparseEquation
increaseDimension
in interface ISparseEquation
public int getTotalElements()
ISparseEquation
getTotalElements
in interface ISparseEquation
public boolean factorization(double tolerance) throws IpssNumericException
ISparseEquation
factorization
in interface ISparseEquation
factorization
in class AbstractSparseEquation<T extends ISparseEqnSolver>
tolerance
- the tolerance for matrix singular detectionIpssNumericException
public boolean factorization() throws IpssNumericException
ISparseEquation
factorization
in interface ISparseEquation
factorization
in class AbstractSparseEquation<T extends ISparseEqnSolver>
IpssNumericException
public boolean solveEqn(double tolerance) throws IpssNumericException
AbstractSparseEquation
solveEqn
in interface ISparseEquation
solveEqn
in class AbstractSparseEquation<T extends ISparseEqnSolver>
tolerance
- the tolerance for matrix singular detectionIpssNumericException
public void solveEqn() throws IpssNumericException
ISparseEquation
solveEqn
in interface ISparseEquation
IpssNumericException
public void setB2Unity(int i)
ISparseEquation
setB2Unity
in interface ISparseEquation
i
- the element row numberpublic void setB2Zero()
ISparseEquation
setB2Zero
in interface ISparseEquation
setB2Zero
in class AbstractSparseEquation<T extends ISparseEqnSolver>
public void reset()
ISparseEquation
reset
in interface ISparseEquation
public void setToZero()
ISparseEquation
setToZero
in interface ISparseEquation
public int getZeroAii_row()
ISparseEquation
getZeroAii_row
in interface ISparseEquation
getZeroAii_row
in class AbstractSparseEquation<T extends ISparseEqnSolver>
public ISparseEqnComplex getSparseEqnComplex()
getSparseEqnComplex
in interface ISparseEqnComplexMatrix3x3
public java.lang.String toString()
toString
in class java.lang.Object