cz.cuni.jagrlib.iface
Interface SLEData

All Superinterfaces:
Property
All Known Subinterfaces:
SLEDataStore
All Known Implementing Classes:
RadiosityEquations, SimpleSLEDataStore

public interface SLEData
extends Property

Data object holding system of linear equations (SLE) data. Both input (matrix of coefficients and right-hand-side vector) and output (solution vector) data can be retrieved. Prepared for actual data storage (full or sparse SLE matrix) on-the-fly computation or proxy-access to some other object..

Since:
0.26
See Also:
SLEDataStore, SLESolver

Field Summary
static int NULL
          Value used as start- and stop- value for iterators.
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
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 element weight (radiosity: element area).
 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 setComponent(int c)
          Set actual component (non-mandatory).
 void setSolution(double[] values)
          Writes the whole solution vector.
 void setSolution(int col, double value)
          Writes value of a single unknown.
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 

Field Detail

NULL

static final int NULL
Value used as start- and stop- value for iterators.

See Also:
Constant Field Values
Method Detail

getRows

int getRows()
Number of equations = number of matrix rows (usually number of unknowns is equal to number of equations).


getColumns

int getColumns()
Number of unknowns = number of matrix columns (usually number of unknowns is equal to number of equations).


getCoeff

double getCoeff(int row,
                int col)
Reads a single matrix coefficient.


getRow

double[] getRow(int row,
                double[] result)
Reads the whole matrix row.


getColumn

double[] getColumn(int col,
                   double[] result)
Reads the whole matrix column.


getMatrix

double[][] getMatrix()
Reads the whole matrix.


getRight

double getRight(int row)
Reads a single element of the right-side vector.


getRight

double[] getRight(double[] result)
Reads the whole right-side vector.

Parameters:
result - Pre-allocated array to hold result (can be null).

getSolution

double getSolution(int col)
Reads a single unknown (element of solution vector).


getSolution

double[] getSolution(double[] result)
Reads the whole solution vector.


setSolution

void setSolution(int col,
                 double value)
Writes value of a single unknown.


setSolution

void setSolution(double[] values)
Writes the whole solution vector.


nextRightChanged

int nextRightChanged(int row)
Returns index of next right-side element which was changed since last resetChanges() call.


nextCoeffInRowChanged

int nextCoeffInRowChanged(int row,
                          int col)
Returns column-index of next coefficient which was changed since last resetChanges() call. Passes through the given matrix row..


nextCoeffInColumnChanged

int nextCoeffInColumnChanged(int row,
                             int col)
Returns row-index of next coefficient which was changed since last resetChanges() call. Passes through the given matrix column..


resetChanges

void resetChanges()
Resets (acknowledges) all SLE changes.


getWeight

double getWeight(int i)
Reads a single element weight (radiosity: element area).


getWeight

double[] getWeight(double[] values)
Reads the whole weight vector.

Parameters:
values - Pre-allocated array to hold result (can be null).

getReflectance

double getReflectance(int i)
Reads a single reflectance (radiosity: element albedo).


getReflectance

double[] getReflectance(double[] reflectance)
Reads the whole reflectance vector.

Parameters:
reflectance - Pre-allocated array to hold result (can be null).

actualComponent

int actualComponent()
Get actual component number.


setComponent

void setComponent(int c)
Set actual component (non-mandatory).