|
||||||||||
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 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 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
Average reflectance. |
static RegPiece |
reg
Static registration instance for this class. |
protected int |
steps
Number of performed iteration steps. |
protected static String |
TEMPLATE_NAME
Object template identifier. |
static 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 |
Fields inherited from interface cz.cuni.jagrlib.Template |
---|
ALL_PLUGS, C_1D, C_2D, C_3D, C_ALPHA, C_BINARY, C_BREP, C_CAMERA, C_CIRCLE, C_CLIP, C_COMPRESSION, C_CURVE, C_DATA, C_DRAW, C_EDITOR, C_ELLIPSE, C_FILL, C_FILTER, C_FLOAT, C_FUNCTION, C_IMAGE, C_INTEGER, C_IO, C_LIGHT, C_LINE, C_METRIC, C_POLYGON, C_PROJECTION, C_RADIOSITY, C_RASTER, C_RENDER, C_SAMPLE, C_SCENE, C_SET, C_SOLID, C_TEXT, C_TRANSFORM, C_VECTOR, C_VIEWER, C_WORKER, CAT_EMPTY, EMPTY, IFACE, JAGRLIB, JAGRLIB2, MANIPULATOR_COMBO, MANIPULATOR_CUSTOM, MANIPULATOR_DEFAULT, MANIPULATOR_MULTILINE, PL_ALPHAMASK, PL_BITMASK, PL_CODEC, PL_COLORMAP, PL_COMPARE, PL_DATA, PL_DIRECT, PL_EDITOR, PL_FILTER, PL_FUNCTION, PL_IMAGE, PL_IMPORT, PL_INPUT, PL_INTERSECTION, PL_LIGHTSOURCE, PL_ORDER, PL_OUTPUT, PL_PALETTE, PL_PROPERTY, PL_QUANTIZER, PL_RASTER, PL_RENDER, PL_STREAM, PL_TRANSFORM, PL_TRIGGER, PL_WINDOW, TYPE_BOOLEAN, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INTEGER, TYPE_LONG, TYPE_OBJECT, TYPE_STRING |
Constructor Summary | |
---|---|
SLEProgressive()
|
Method Summary | |
---|---|
int |
actualComponent()
Get actual component number. |
protected void |
computeAvgReflectance()
Compute avarage reflectance. |
Object |
get(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(String key,
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 String EPSILON
public static final String USE_AMBIENT
protected static final String TEMPLATE_NAME
protected static final 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(String key, Object value)
set
in interface Property
set
in class DefaultProperty
key
- Key string.value
- The new value.Property.commit()
public Object get(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 |