|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.iastate.metnet.analysis.MySolver
public class MySolver
linear equation solver
this class solve the problem AX = B in which A, X, B are matrices A and B are type of
java.util.List
| Field Summary | |
|---|---|
(package private) static org.apache.log4j.Logger |
logger
log4j faqcility |
(package private) static MySolver |
solver
singleton pattern |
| Method Summary | |
|---|---|
java.lang.String |
constructMatrix(float[][] fs)
for a matrix, construct the string like "[1 3 5; 2 5 1; 2 3 8]"; notice that the parser of the scipy is very picky and we must follow the format without additional blank or semicolon |
java.lang.String |
constructMatrix(java.util.List list)
for a matrix, construct the string like "[1 3 5; 2 5 1; 2 3 8]"; notice that the parser of the scipy is very picky and we must follow the format without additional blank or semicolon |
java.lang.String |
constructRowVector(java.util.List list)
cnstruct the representation of one row of the matrix |
java.lang.String |
constructVector(float[] fs)
for a vector, construct the string like "[10;8;3]"; |
java.lang.String |
constructVector(java.util.List list)
for a vector, construct the string like "[10;8;3]"; |
static MySolver |
getInstance()
|
boolean |
isCompatible(float[][] a,
float[] b)
check if the a and b has compatible dimension since a is a squar matrix, a.length == b.length and each line of a should has same length |
boolean |
isCompatible(java.util.List a,
java.util.List b)
check if the a and b has compatible dimension since a is a squar matrix, a.length == b.length and each line of a should has same length |
float[] |
solve(float[][] a,
float[] b)
|
java.util.List |
solve(java.util.List a,
java.util.List b)
solve the linear equation |
java.util.List |
toFloatList(float[] fs)
|
java.util.List |
toFloatList(float[][] fs)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static org.apache.log4j.Logger logger
static MySolver solver
| Method Detail |
|---|
public static MySolver getInstance()
public java.util.List solve(java.util.List a,
java.util.List b)
a - the matrixb - the vector
public float[] solve(float[][] a,
float[] b)
public java.lang.String constructVector(java.util.List list)
list - the vector
public java.lang.String constructVector(float[] fs)
fs - the vector
public java.lang.String constructRowVector(java.util.List list)
list - the row of the matrix
public java.lang.String constructMatrix(java.util.List list)
list - the matrix
public java.util.List toFloatList(float[] fs)
public java.util.List toFloatList(float[][] fs)
public java.lang.String constructMatrix(float[][] fs)
fs - the matrix
public boolean isCompatible(java.util.List a,
java.util.List b)
a - the matrix or list of listb - the vector
public boolean isCompatible(float[][] a,
float[] b)
a - the matrix or list of listb - the vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||