public class SparseEqnDoubleImpl extends AbstractSparseEquation implements ISparseEqnDouble
ISparseEquation.IndexType| Constructor and Description |
|---|
SparseEqnDoubleImpl(int n) |
SparseEqnDoubleImpl(int rows,
int cols,
int order) |
SparseEqnDoubleImpl(int rows,
int cols,
int order,
boolean weightedLS) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToAij(double x,
int i,
int j)
Add the aij element to the matrix.
|
void |
addToBi(double bi,
int i)
Set bi element.
|
double |
err(double[] x) |
boolean |
factorization()
Decomposition of the matrix.
|
boolean |
factorization(double tolerance)
Decomposition of the matrix.
|
double |
getAij(int i,
int j)
Get the aij element.
|
SparseEqnDataType.DblAii |
getElem(int i) |
int |
getTotalElements()
Get the total elements in the matrix
|
double |
getXi(int i)
Get the bi element.
|
double[] |
getXVector()
Get the b/x vector
|
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 |
setAij(double 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 and bi = 1.0, a unit vector.
|
void |
setBi(double bi,
int i)
Set bi element.
|
void |
setBVector(double[] b)
Set b/x vector.
|
void |
setElem(int i,
SparseEqnDataType.DblAii aii) |
void |
setToZero()
Reset all matrix element to zero, preserve the matrix structure.
|
void |
solveEqn()
Solve the [A]X = B problem
|
double[] |
solveEqn(double[] b)
Solve the [A]X = B problem
|
java.lang.String |
toString()
Get the string representation of the matrix object
|
getBusId, getDimension, getDimension, getZeroAii_row, isFactorized, isSquareMatrix, setBusId, setFactorized, setZeroAii_row, solveEqnequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBusId, getDimension, getDimension, getZeroAii_row, isFactorized, isSquareMatrix, setBusId, setFactorized, solveEqnpublic SparseEqnDoubleImpl(int n)
public SparseEqnDoubleImpl(int rows,
int cols,
int order)
public SparseEqnDoubleImpl(int rows,
int cols,
int order,
boolean weightedLS)
public void increaseDimension()
ISparseEquationincreaseDimension in interface ISparseEquationn - matrix dimensionpublic void addToAij(double x,
int i,
int j)
addToAij in interface ISparseEqnDoublex - the aij elementi - the element row numberj - the element column numberpublic SparseEqnDataType.DblAii getElem(int i)
public void setElem(int i,
SparseEqnDataType.DblAii aii)
public void setAij(double x,
int i,
int j)
setAij in interface ISparseEqnDoublex - the aij elementi - the element row number (1-n convention)j - the element column number (1-n convention)public double getAij(int i,
int j)
ISparseEqnDoublegetAij in interface ISparseEqnDoublei - the element row numberj - the element column numberpublic void setB2Zero()
setB2Zero in interface ISparseEquationsetB2Zero in class AbstractSparseEquationi - the element row numberpublic void setB2Unity(int i)
setB2Unity in interface ISparseEquationi - the element row numberpublic double getXi(int i)
getXi in interface ISparseEqnDoublei - the element row numberpublic double[] getXVector()
i - the element row numberpublic void setBVector(double[] b)
b - the b vectorpublic void setBi(double bi,
int i)
setBi in interface ISparseEqnDoublebi - the bi elementi - row number (1-n convention)public void addToBi(double bi,
int i)
addToBi in interface ISparseEqnDoublebi - the bi elementi - row numberpublic void reset()
reset in interface ISparseEquationpublic void setToZero()
setToZero in interface ISparseEquationpublic void solveEqn()
throws IpssNumericException
solveEqn in interface ISparseEquationIpssNumericExceptionpublic double[] solveEqn(double[] b)
throws IpssNumericException
solveEqn in interface ISparseEqnDoubleIpssNumericExceptionpublic boolean factorization()
throws IpssNumericException
factorization in interface ISparseEquationfactorization in class AbstractSparseEquationtolerance - the tolerance for matrix singular detectionIpssNumericExceptionpublic boolean factorization(double tolerance)
throws IpssNumericException
factorization in interface ISparseEquationfactorization in class AbstractSparseEquationtolerance - the tolerance for matrix singular detectionIpssNumericExceptionpublic int getTotalElements()
getTotalElements in interface ISparseEquationpublic java.lang.String toString()
toString in class java.lang.Objectpublic double err(double[] x)