|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.piece.SimpleSLEDataStore
public class SimpleSLEDataStore
Data object holding system of linear equations (SLE) data - actual data storage w/o any smartness.
| Field Summary | |
|---|---|
protected static java.lang.String |
CATEGORY
Object category. |
protected int |
columns
Number of unknown variables (matrix columns). |
protected double[][] |
matrix
Complete rectangular matrix A as in Ax=b. |
protected double[] |
reflectance
Solution vector x as in Ax=b. |
static RegPiece |
reg
Static registration instance for this class. |
protected double[] |
right
Right-hand side b as in Ax=b. |
protected int |
rows
Number of equations (matrix rows). |
protected double[] |
solution
Solution vector x as in Ax=b. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected double[] |
weight
Solution vector x as in Ax=b. |
| Fields inherited from class cz.cuni.jagrlib.Piece |
|---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
| Fields inherited from interface cz.cuni.jagrlib.iface.SLEData |
|---|
NULL |
| Fields inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
| Constructor Summary | |
|---|---|
SimpleSLEDataStore()
|
|
| Method Summary | |
|---|---|
int |
actualComponent()
Get actual component number. |
double |
getCoeff(int row,
int col)
Reads a single matrix coefficient. |
double[] |
getColumn(int col,
double[] result)
Reads the whole matrix column. |
int |
getColumns()
Number of unknowns = number of matrix columns (usually number of unknowns is equal to number of equations). |
double[][] |
getMatrix()
Reads the whole matrix. |
double[] |
getReflectance(double[] reflectance)
Reads the whole reflectance vector. |
double |
getReflectance(int i)
Reads a single reflectance (radiosity: element albedo). |
double[] |
getRight(double[] result)
Reads the whole right-side vector. |
double |
getRight(int row)
Reads a single element of the right-side vector. |
double[] |
getRow(int row,
double[] result)
Reads the whole matrix row. |
int |
getRows()
Number of equations = number of matrix rows (usually number of unknowns is equal to number of equations). |
double[] |
getSolution(double[] result)
Reads the whole solution vector. |
double |
getSolution(int col)
Reads a single unknown (element of solution vector). |
double[] |
getWeight(double[] values)
Reads the whole weight vector. |
double |
getWeight(int i)
Reads a single weight (radiosity: element area). |
void |
init(int rows,
int columns)
Initializes the SLE. |
int |
nextCoeffInColumnChanged(int row,
int col)
Returns row-index of next coefficient which was changed since last resetChanges() call. |
int |
nextCoeffInRowChanged(int row,
int col)
Returns column-index of next coefficient which was changed since last resetChanges() call. |
int |
nextRightChanged(int row)
Returns index of next right-side element which was changed since last resetChanges() call. |
void |
resetChanges()
Resets (acknowledges) all SLE changes. |
void |
setCoeff(int row,
int col,
double value)
Sets a single matrix coefficient. |
void |
setColumn(int col,
double[] values)
Sets the whole matrix column. |
void |
setComponent(int c)
Set actual component (non-mandatory). |
void |
setReflectance(double[] reflectance)
Sets the whole reflectance vector. |
void |
setReflectance(int i,
double value)
Sets a single reflectance (radiosity: element albedo). |
void |
setRight(double[] values)
Sets the whole right-side vector. |
void |
setRight(int row,
double value)
Sets a single element of the right-side vector. |
void |
setRow(int row,
double[] values)
Sets the whole matrix row. |
void |
setSolution(double[] values)
Writes the whole solution vector. |
void |
setSolution(int col,
double value)
Writes value of a single unknown. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
void |
setWeight(double[] values)
Sets the whole weight vector en bloc. |
void |
setWeight(int i,
double value)
Sets a single weight (radiosity: element area). |
| Methods inherited from class cz.cuni.jagrlib.Piece |
|---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplateDynamic, stop |
| Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
|---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, get, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, set, stringProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
commit, get, set |
| Field Detail |
|---|
protected int rows
protected int columns
protected double[][] matrix
A as in Ax=b.
protected double[] right
b as in Ax=b.
protected double[] solution
x as in Ax=b.
protected double[] weight
x as in Ax=b.
protected double[] reflectance
x as in Ax=b.
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
| Constructor Detail |
|---|
public SimpleSLEDataStore()
| Method Detail |
|---|
public int getRows()
getRows in interface SLEDatapublic int getColumns()
getColumns in interface SLEData
public double getCoeff(int row,
int col)
getCoeff in interface SLEData
public double[] getRow(int row,
double[] result)
getRow in interface SLEData
public double[] getColumn(int col,
double[] result)
getColumn in interface SLEDatapublic double[][] getMatrix()
getMatrix in interface SLEDatapublic double getRight(int row)
getRight in interface SLEDatapublic double[] getRight(double[] result)
getRight in interface SLEDataresult - Pre-allocated array to hold result (can be null).public double getSolution(int col)
getSolution in interface SLEDatapublic double[] getSolution(double[] result)
getSolution in interface SLEData
public void setSolution(int col,
double value)
setSolution in interface SLEDatapublic void setSolution(double[] values)
setSolution in interface SLEData
public void init(int rows,
int columns)
0.0.
init in interface SLEDataStore
public void setCoeff(int row,
int col,
double value)
setCoeff in interface SLEDataStore
public void setRow(int row,
double[] values)
setRow in interface SLEDataStore
public void setColumn(int col,
double[] values)
setColumn in interface SLEDataStore
public void setRight(int row,
double value)
setRight in interface SLEDataStorepublic void setRight(double[] values)
setRight in interface SLEDataStorepublic int nextRightChanged(int row)
resetChanges() call.
nextRightChanged in interface SLEData
public int nextCoeffInRowChanged(int row,
int col)
resetChanges() call.
Passes through the given matrix row..
nextCoeffInRowChanged in interface SLEData
public int nextCoeffInColumnChanged(int row,
int col)
resetChanges() call.
Passes through the given matrix column..
nextCoeffInColumnChanged in interface SLEDatapublic void resetChanges()
resetChanges in interface SLEDatapublic double getWeight(int i)
getWeight in interface SLEDatapublic double[] getWeight(double[] values)
getWeight in interface SLEDatavalues - Pre-allocated array to hold result (can be null).public double getReflectance(int i)
getReflectance in interface SLEDatapublic double[] getReflectance(double[] reflectance)
getReflectance in interface SLEDatareflectance - Pre-allocated array to hold result (can be null).
public void setWeight(int i,
double value)
setWeight in interface SLEDataStorepublic void setWeight(double[] values)
setWeight in interface SLEDataStore
public void setReflectance(int i,
double value)
setReflectance in interface SLEDataStorepublic void setReflectance(double[] reflectance)
setReflectance in interface SLEDataStorepublic int actualComponent()
actualComponent in interface SLEDatapublic void setComponent(int c)
setComponent in interface SLEData
public static int setTemplate(Template t,
int ord)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||