public abstract class AbstractSparseEqnComplexImpl<T extends ISparseEqnSolver> extends AbstractSparseEquation<T> implements ISparseEqnComplex
ISparseEquation.IndexType| Modifier and Type | Field and Description |
|---|---|
protected ComplexSEqnRow[] |
aryAii |
colCnt, factored, rowCnt, solver, squareMatrix, zeroAii_row| Constructor and Description |
|---|
AbstractSparseEqnComplexImpl(int n) |
AbstractSparseEqnComplexImpl(int rows,
int cols) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToA(org.apache.commons.math3.complex.Complex x,
int i,
int j)
Add the aij element to the matrix.
|
void |
addToB(org.apache.commons.math3.complex.Complex bi,
int i)
add to bi element.
|
boolean |
factorization(double tolerance)
LU decomposition of the matrix.
|
org.apache.commons.math3.complex.Complex |
getA(int i,
int j)
Get the aij element.
|
java.lang.String |
getBusId(int row)
get cached bus id by the row number
|
ComplexSEqnRow |
getElem(int i) |
int |
getTotalElements()
Get the total elements in the matrix
|
org.apache.commons.math3.complex.Complex |
getX(int i)
Get the bi element.
|
int |
getZeroA_row()
Get zero aii row number, in case the matrix is singular
|
void |
increaseDimension()
Increase matrix dimension by 1.
|
org.apache.commons.math3.complex.Complex[] |
multiply(org.apache.commons.math3.complex.Complex[] xAry)
Multiply the complex matrix of the eqn with the array x
|
edu.emory.mathcs.csparsej.tdcomplex.DZcs_common.DZcsa |
multiply(edu.emory.mathcs.csparsej.tdcomplex.DZcs_common.DZcsa xAry)
Multiply the complex matrix of the eqn with the array x
|
void |
reset()
Reset the matrix to zero - set all aii and bi to 0.0 and clear the aijList
|
void |
setA(org.apache.commons.math3.complex.Complex x,
int i,
int j)
Set the aij element.
|
void |
setB2Unity(int i)
Set all b elements to 0.0 and bi = 1.0, a unit vector.
|
void |
setB2Zero()
Set all b elements to 0.0.
|
void |
setBi(org.apache.commons.math3.complex.Complex bi,
int i)
Set bi element.
|
void |
setBusId(int row,
java.lang.String id)
set bus id corresponding to the row
|
void |
setBVector(org.apache.commons.math3.complex.Complex[] 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 structure.
|
void |
solveEqn()
Solve the [A]X = B problem
|
java.lang.String |
toString()
Get the string representation of the matrix object
|
factorization, getDimension, getDimension, getZeroAii_row, isFactorized, isSquareMatrix, setFactorized, setZeroAii_row, solveEqnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsolveLUedEqn, solveLUedEqnfactorization, getDimension, getDimension, getZeroAii_row, isFactorized, isSquareMatrix, setFactorized, solveEqnprotected ComplexSEqnRow[] aryAii
public AbstractSparseEqnComplexImpl(int n)
public AbstractSparseEqnComplexImpl(int rows,
int cols)
public org.apache.commons.math3.complex.Complex[] multiply(org.apache.commons.math3.complex.Complex[] xAry)
ISparseEqnComplexmultiply in interface ISparseEqnComplexpublic edu.emory.mathcs.csparsej.tdcomplex.DZcs_common.DZcsa multiply(edu.emory.mathcs.csparsej.tdcomplex.DZcs_common.DZcsa xAry)
ISparseEqnComplexmultiply in interface ISparseEqnComplexpublic void increaseDimension()
ISparseEquationincreaseDimension in interface ISparseEquationn - matrix dimensionpublic void addToA(org.apache.commons.math3.complex.Complex x,
int i,
int j)
addToA in interface ISparseEqnObject<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>x - the aij elementi - the element row numberj - the element column numberpublic org.apache.commons.math3.complex.Complex getX(int i)
getX in interface ISparseEqnObject<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>i - the element row numberpublic ComplexSEqnRow getElem(int i)
public void setElem(int i,
ComplexSEqnRow aii)
public void setA(org.apache.commons.math3.complex.Complex x,
int i,
int j)
setA in interface ISparseEqnObject<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>x - the aij elementi - the element row number (1-n convention)j - the element column number (1-n convention)public org.apache.commons.math3.complex.Complex getA(int i,
int j)
getA in interface ISparseEqnObject<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>i - the element row numberj - the element column numberpublic void setB2Unity(int i)
setB2Unity in interface ISparseEquationi - the element row numberpublic void setB2Zero()
setB2Zero in interface ISparseEquationsetB2Zero in class AbstractSparseEquation<T extends ISparseEqnSolver>public void setBi(org.apache.commons.math3.complex.Complex bi,
int i)
setBi in interface ISparseEqnObject<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>bi - the bi elementi - row numberpublic void setBVector(org.apache.commons.math3.complex.Complex[] bAry)
ISparseEqnObjectsetBVector in interface ISparseEqnObject<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>bAry - the b vector elementspublic void addToB(org.apache.commons.math3.complex.Complex bi,
int i)
ISparseEqnObjectaddToB in interface ISparseEqnObject<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>bi - the bi elementi - row numberpublic void reset()
reset in interface ISparseEquationpublic void setToZero()
setToZero in interface ISparseEquationpublic boolean factorization(double tolerance)
throws IpssNumericException
factorization in interface ISparseEquationfactorization in class AbstractSparseEquation<T extends ISparseEqnSolver>tolerance - the tolerance for matrix singular detectionIpssNumericExceptionpublic void solveEqn()
throws IpssNumericException
solveEqn in interface ISparseEquationIpssNumericExceptionpublic int getTotalElements()
getTotalElements in interface ISparseEquationpublic int getZeroA_row()
ISparseEqnObjectgetZeroA_row in interface ISparseEqnObject<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex>public java.lang.String getBusId(int row)
ISparseEquationgetBusId in interface ISparseEquationgetBusId in class AbstractSparseEquation<T extends ISparseEqnSolver>row - row numberpublic void setBusId(int row,
java.lang.String id)
ISparseEquationsetBusId in interface ISparseEquationsetBusId in class AbstractSparseEquation<T extends ISparseEqnSolver>row - row numberid - bus idpublic java.lang.String toString()
toString in class java.lang.Object