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, solveEqn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
factorization, getBusId, getDimension, getDimension, getZeroAii_row, isFactorized, isSquareMatrix, setB2Zero, setBusId, setFactorized, solveEqn
public SparseEqnIntegerImpl()
public SparseEqnIntegerImpl(int n)
public void arrangeRowNoT2()
arrangeRowNoT2
in interface ISparseEqnInteger
public void arrangeRowNoT3()
arrangeRowNoT3
in interface ISparseEqnInteger
public 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 ISparseEqnInteger
i
- old bus number (1-n convention)public void setAij(int n, int i, int j)
setAij
in interface ISparseEqnInteger
n
- the aij elementi
- the element row number (1-n convention)j
- the element column number (1-n convention)public int getTotalElements()
getTotalElements
in interface ISparseEquation
public java.lang.String toString()
toString
in class java.lang.Object
public int getAijElement(int i, int j)
ISparseEqnInteger
getAijElement
in interface ISparseEqnInteger
i
- the element row numberj
- the element column numberpublic void increaseDimension()
ISparseEquation
increaseDimension
in interface ISparseEquation
public boolean factorization(double tolerance) throws IpssNumericException
ISparseEquation
factorization
in interface ISparseEquation
factorization
in class AbstractSparseEquation<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 reset()
ISparseEquation
reset
in interface ISparseEquation
public void setToZero()
ISparseEquation
setToZero
in interface ISparseEquation