public class SparseEqnComplexImpl extends AbstractSparseEquation implements ISparseEqnComplex
ISparseEquation.IndexType| Constructor and Description |
|---|
SparseEqnComplexImpl(int n) |
SparseEqnComplexImpl(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
|
SparseEqnDataType.ComAii |
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.
|
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 |
setElem(int i,
SparseEqnDataType.ComAii 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, solveEqnequals, getClass, hashCode, notify, notifyAll, wait, wait, waitfactorization, getDimension, getDimension, getZeroAii_row, isFactorized, isSquareMatrix, setFactorized, solveEqnpublic SparseEqnComplexImpl(int n)
public SparseEqnComplexImpl(int rows,
int cols)
public 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 SparseEqnDataType.ComAii getElem(int i)
public void setElem(int i,
SparseEqnDataType.ComAii 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 AbstractSparseEquationpublic 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 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 AbstractSparseEquationtolerance - 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 AbstractSparseEquationrow - row numberpublic void setBusId(int row,
java.lang.String id)
ISparseEquationsetBusId in interface ISparseEquationsetBusId in class AbstractSparseEquationrow - row numberid - bus idpublic java.lang.String toString()
toString in class java.lang.Object