public class SparseEqnIntegerImpl extends AbstractSparseEquation<ISparseEqnSolver> implements ISparseEqnInteger
| Modifier and Type | Class and Description |
|---|---|
static class |
SparseEqnIntegerImpl.IntAii
Data structure for Integer sparse eqn implementation
|
static class |
SparseEqnIntegerImpl.IntAij
Data structure for Integer sparse eqn implementation
|
ISparseEquation.IndexType| Modifier and Type | Field and Description |
|---|---|
static int |
StatusOutCnt |
colCnt, factored, rowCnt, solver, squareMatrix, zeroAii_row| Constructor and Description |
|---|
SparseEqnIntegerImpl() |
SparseEqnIntegerImpl(int n) |
| Modifier and Type | Method and Description |
|---|---|
void |
arrangeRowNoT2()
Arrange bus bus according to the Tinney-2 rule
|
void |
arrangeRowNoT3()
Arrange bus bus according to the Tinney-3 rule
|
boolean |
factorization(double tolerance)
Factorization, for example LU decomposition, of the matrix.
|
SparseEqnIntegerImpl.IntAij |
getAij(SparseEqnIntegerImpl.IntAii ai,
int j)
get the Aij element
|
int |
getAijElement(int i,
int j)
Get the aij element.
|
SparseEqnIntegerImpl.IntAii |
getElem(int i)
get the Aii element
|
int |
getOld2New(int i)
After the bus number arrangement, get the new bus number from an old bus number.
|
int |
getTotalElements()
Get the total elements in the matrix
|
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 |
setAij(int n,
int i,
int j)
Set the aij element
|
void |
setB2Unity(int i)
Set all b elements to 0.0 and bi = 1.0, a unity vector.
|
void |
setToZero()
Reset all matrix element to zero, preserve the matrix sparse structure.
|
void |
solveEqn()
Solve the [A]X = B problem
|
java.lang.String |
toString()
Get the string representation of the matrix object
|
factorization, getBusId, getDimension, getDimension, getZeroAii_row, isFactorized, isSquareMatrix, setB2Zero, setBusId, setFactorized, setZeroAii_row, solveEqnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfactorization, getBusId, getDimension, getDimension, getZeroAii_row, isFactorized, isSquareMatrix, setB2Zero, setBusId, setFactorized, solveEqnpublic SparseEqnIntegerImpl()
public SparseEqnIntegerImpl(int n)
public void arrangeRowNoT2()
arrangeRowNoT2 in interface ISparseEqnIntegerpublic void arrangeRowNoT3()
arrangeRowNoT3 in interface ISparseEqnIntegerpublic SparseEqnIntegerImpl.IntAij getAij(SparseEqnIntegerImpl.IntAii ai, int j)
ai - j - public SparseEqnIntegerImpl.IntAii getElem(int i)
i - public int getOld2New(int i)
getOld2New in interface ISparseEqnIntegeri - old bus number (1-n convention)public void setAij(int n,
int i,
int j)
setAij in interface ISparseEqnIntegern - the aij elementi - the element row number (1-n convention)j - the element column number (1-n convention)public int getTotalElements()
getTotalElements in interface ISparseEquationpublic java.lang.String toString()
toString in class java.lang.Objectpublic int getAijElement(int i,
int j)
ISparseEqnIntegergetAijElement in interface ISparseEqnIntegeri - the element row numberj - the element column numberpublic void increaseDimension()
ISparseEquationincreaseDimension in interface ISparseEquationpublic boolean factorization(double tolerance)
throws IpssNumericException
ISparseEquationfactorization in interface ISparseEquationfactorization in class AbstractSparseEquation<ISparseEqnSolver>tolerance - the tolerance for matrix singular detectionIpssNumericExceptionpublic void solveEqn()
throws IpssNumericException
ISparseEquationsolveEqn in interface ISparseEquationIpssNumericExceptionpublic void setB2Unity(int i)
ISparseEquationsetB2Unity in interface ISparseEquationi - the element row numberpublic void reset()
ISparseEquationreset in interface ISparseEquationpublic void setToZero()
ISparseEquationsetToZero in interface ISparseEquation