|
||||||||||
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.SLEProgressive
public class SLEProgressive
SLE solver: progressive refinement (PR). Used mainly in radiosity. Over-relaxation and PR with ambient term are implemented so far.
Field Summary | |
---|---|
protected double |
ambient
Ambient term (represents total unshot radiosity in the environment). |
protected double[] |
B
Actual vector of unknown variables. |
protected double[] |
B2
Second vector of unknown variables for ambient term. |
protected static java.lang.String |
CATEGORY
Object category. |
protected SLEData |
data
Accelerator: input SLEData. |
protected double[] |
dB
Actual vector of unshoot radiosity. |
protected double |
epsilon
Required accuracy of solution (max. norm of dB vector). |
static java.lang.String |
EPSILON
|
protected boolean |
isInitialized
Was the solver already initialized? |
protected double[] |
K
Actual matrix column. |
protected int |
N
Number of unknowns. |
protected double |
omega
Over-relaxation factor. |
protected double[] |
reflectance
Reflectance of each element. |
protected double |
refTotal
Avarage reflectance. |
static RegPiece |
reg
Static registration instance for this class. |
protected int |
steps
Number of performed iteration steps. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
static java.lang.String |
USE_AMBIENT
|
protected boolean |
useAmbient
Use ambient term? |
protected double[] |
weight
Weights of unknown variables (element areas). |
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
Fields inherited from interface cz.cuni.jagrlib.iface.SLESolver |
---|
OMEGA, STEPS, TOTAL_RESIDUAL |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
SLEProgressive()
|
Method Summary | |
---|---|
int |
actualComponent()
Get actual component number. |
protected void |
computeAvgReflectance()
Compute avarage reflectance. |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
double[] |
getSolution(double[] result)
Reads the whole solution vector. |
double |
getSolution(int col)
Reads a single unknown (element of solution vector). |
protected double |
getTotalResidual()
|
double |
refine(int maxIterations,
boolean save)
Refine the solution performing several iterations. |
void |
reset()
Reset iterative solution algorithm (if applicable). |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
void |
setComponent(int c)
Set actual component (non-mandatory). |
double |
setEpsilon(double epsilon)
Sets solver accuracy (whatever it means). |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
void |
solve(boolean save)
Solve the whole system en bloc. |
protected double |
solve(int maxIterations,
boolean save)
Solve the whole system. |
void |
update()
Input data was changed, solver should adapt to it. |
protected void |
updateAmbient()
Update ambient term. |
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, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, 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 |
Field Detail |
---|
protected SLEData data
protected double epsilon
protected double omega
1.0
for plain relaxation.
protected boolean useAmbient
protected int steps
protected int N
protected double[] B
protected double[] B2
protected double[] dB
protected double[] K
protected double[] weight
protected double[] reflectance
protected double refTotal
protected double ambient
protected boolean isInitialized
public static final java.lang.String EPSILON
public static final java.lang.String USE_AMBIENT
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public SLEProgressive()
Method Detail |
---|
public double setEpsilon(double epsilon)
setEpsilon
in interface SLESolver
public void solve(boolean save)
solve
in interface SLESolver
save
- Solution will be saved into the associated SLEDataStore
.public void reset()
reset
in interface SLESolver
public double refine(int maxIterations, boolean save)
refine
in interface SLESolver
maxIterations
- Number of iterations requested.save
- Solution will be saved into the associated SLEDataStore
.
public void update()
solve(boolean)
or refine(int, boolean)
will be called afterwards..
update
in interface SLESolver
public double getSolution(int col)
getSolution
in interface SLESolver
public double[] getSolution(double[] result)
getSolution
in interface SLESolver
public int actualComponent()
actualComponent
in interface SLESolver
public void setComponent(int c)
setComponent
in interface SLESolver
protected double solve(int maxIterations, boolean save)
maxIterations
- Number of iterations requested.save
- Solution will be saved into the associated SLEDataStore
.protected void computeAvgReflectance()
updateAmbient()
.
protected void updateAmbient()
protected double getTotalResidual()
public void set(java.lang.String key, java.lang.Object value)
set
in interface Property
set
in class DefaultProperty
key
- Key string.value
- The new value.Property.commit()
public java.lang.Object get(java.lang.String key)
get
in interface Property
get
in class DefaultProperty
key
- Key string.
null
.public static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |