de.grogra.ray2.metropolis.strategy
Class MutationStrategy

java.lang.Object
  extended by de.grogra.ray2.metropolis.strategy.MutationStrategy
All Implemented Interfaces:
MetropolisStrategy
Direct Known Subclasses:
BidirectionalMutationStrat, CausticPerturbation, LensPerturbationStrat, LensSubpathStrat

public abstract class MutationStrategy
extends java.lang.Object
implements MetropolisStrategy


Field Summary
 int abbortCode
           
protected  MetropolisAntiAliasing antialiser
           
static int BSDF_WAS_ZERO
           
static int CALCULATION_ERROR
           
static int CANVAS_WASNT_HIT
           
protected  ComplementTracer complTracer
           
 ConditionObject condition
           
protected  PathValues eyePath
           
static java.lang.String EYEPATH_DEPTH
           
protected  int eyePathDepth
           
protected  IntersectionList ilist
           
protected  PathValues lightPath
           
static java.lang.String LIGHTPATH_DEPTH
           
protected  int lightPathDepth
           
protected static int MAXVAL
           
protected static float MIN_WEIGHT
           
protected  CombinedPathValues mutatedPath
           
static int NO_CHANGES_HAPPENED
           
static int NO_VALID_COMBINEDPATH
           
static int NOT_IMPLEMENTED_YET
           
static int NOT_VISIBLE
           
static int PATH_SPECTRA_WERE_TOO_WEAK
           
protected  net.goui.util.MTRandom rnd
           
protected  int sig
           
protected  CombinedPathValues srcPath
           
static int SUCCESSFUL_MUTATIONRUN
           
protected  Environment tmpEnv
           
protected  Line tmpLine
           
protected  Point3d tmpPoint1
           
protected  Point3d tmpPoint2
           
protected  RayList tmpRayList
           
protected  Spectrum3d tmpSpec1
           
protected  Spectrum3d tmpSpec2
           
protected  Spectrum3d tmpSpec3
           
protected  Vector3f tmpVec1
           
protected  Vector3f tmpVec2
           
protected  LineTracer tracer
           
static int TRACINGGOAL_WASNT_REACHED
           
protected  TracingMediator tracingMediator
           
 
Constructor Summary
MutationStrategy(MetropolisProcessor metroProc)
           
 
Method Summary
 float calculateAcceptanceProbality(int l, int m, int l_, int m_)
           
 float calculateQ(int l, int m, int l_, int m_, CombinedPathValues srcPath, CombinedPathValues mutatedPath, boolean x2y)
           
 Line generateNewStartLine(boolean isLightRay)
           
 java.lang.String getAcceptanceAbbortDescription()
           
 int getAddiationPathLength(int kd)
           
 float getAddProbability(int l, int m, int l_, int m_)
           
 int[] getAddVertice(int k)
           
 Spectrum3d getCombinedBSDF(int startIndex, CombinedPathValues mutatedPath)
           
 float getDeleteProbability(int l, int m)
           
 int[] getDeleteVertice(int k)
           
 int getDeletionPathLength()
           
 java.lang.String getDescription()
           
 float getI_0(CombinedPathValues path)
           
abstract  java.util.ArrayList<java.lang.String> getStatistics()
           
 boolean hitsCanvas(CombinedPathValues testPath)
           
abstract  void initialize(double[] values)
           
 boolean isVisble(Environment lightEnv, Environment eyeEnv, Intersection lightInt)
           
 float luminance(Spectrum3d lumSpec)
           
 float mutatePath(CombinedPathValues actualPath, CombinedPathValues mutatedPath)
           
 void pathChanged()
           
 int registerError(int error)
           
abstract  void resetAll()
           
 void traceEyeSubPath(int m, int m_)
           
 void traceLightSubPath(int l, int l_)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

abbortCode

public int abbortCode

antialiser

protected MetropolisAntiAliasing antialiser

BSDF_WAS_ZERO

public static final int BSDF_WAS_ZERO
See Also:
Constant Field Values

CALCULATION_ERROR

public static final int CALCULATION_ERROR
See Also:
Constant Field Values

CANVAS_WASNT_HIT

public static final int CANVAS_WASNT_HIT
See Also:
Constant Field Values

complTracer

protected ComplementTracer complTracer

condition

public ConditionObject condition

eyePath

protected PathValues eyePath

EYEPATH_DEPTH

public static final java.lang.String EYEPATH_DEPTH
See Also:
Constant Field Values

eyePathDepth

protected int eyePathDepth

ilist

protected IntersectionList ilist

lightPath

protected PathValues lightPath

LIGHTPATH_DEPTH

public static final java.lang.String LIGHTPATH_DEPTH
See Also:
Constant Field Values

lightPathDepth

protected int lightPathDepth

MAXVAL

protected static int MAXVAL

MIN_WEIGHT

protected static final float MIN_WEIGHT
See Also:
Constant Field Values

mutatedPath

protected CombinedPathValues mutatedPath

NO_CHANGES_HAPPENED

public static final int NO_CHANGES_HAPPENED
See Also:
Constant Field Values

NO_VALID_COMBINEDPATH

public static final int NO_VALID_COMBINEDPATH
See Also:
Constant Field Values

NOT_IMPLEMENTED_YET

public static final int NOT_IMPLEMENTED_YET
See Also:
Constant Field Values

NOT_VISIBLE

public static final int NOT_VISIBLE
See Also:
Constant Field Values

PATH_SPECTRA_WERE_TOO_WEAK

public static final int PATH_SPECTRA_WERE_TOO_WEAK
See Also:
Constant Field Values

rnd

protected net.goui.util.MTRandom rnd

sig

protected int sig

srcPath

protected CombinedPathValues srcPath

SUCCESSFUL_MUTATIONRUN

public static final int SUCCESSFUL_MUTATIONRUN
See Also:
Constant Field Values

tmpEnv

protected Environment tmpEnv

tmpLine

protected Line tmpLine

tmpPoint1

protected Point3d tmpPoint1

tmpPoint2

protected Point3d tmpPoint2

tmpRayList

protected RayList tmpRayList

tmpSpec1

protected Spectrum3d tmpSpec1

tmpSpec2

protected Spectrum3d tmpSpec2

tmpSpec3

protected Spectrum3d tmpSpec3

tmpVec1

protected Vector3f tmpVec1

tmpVec2

protected Vector3f tmpVec2

tracer

protected LineTracer tracer

TRACINGGOAL_WASNT_REACHED

public static final int TRACINGGOAL_WASNT_REACHED
See Also:
Constant Field Values

tracingMediator

protected TracingMediator tracingMediator
Constructor Detail

MutationStrategy

public MutationStrategy(MetropolisProcessor metroProc)
Method Detail

calculateAcceptanceProbality

public float calculateAcceptanceProbality(int l,
                                          int m,
                                          int l_,
                                          int m_)

calculateQ

public float calculateQ(int l,
                        int m,
                        int l_,
                        int m_,
                        CombinedPathValues srcPath,
                        CombinedPathValues mutatedPath,
                        boolean x2y)

generateNewStartLine

public Line generateNewStartLine(boolean isLightRay)

getAcceptanceAbbortDescription

public java.lang.String getAcceptanceAbbortDescription()
Specified by:
getAcceptanceAbbortDescription in interface MetropolisStrategy

getAddiationPathLength

public int getAddiationPathLength(int kd)

getAddProbability

public float getAddProbability(int l,
                               int m,
                               int l_,
                               int m_)

getAddVertice

public int[] getAddVertice(int k)

getCombinedBSDF

public Spectrum3d getCombinedBSDF(int startIndex,
                                  CombinedPathValues mutatedPath)

getDeleteProbability

public float getDeleteProbability(int l,
                                  int m)

getDeleteVertice

public int[] getDeleteVertice(int k)

getDeletionPathLength

public int getDeletionPathLength()

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface MetropolisStrategy

getI_0

public float getI_0(CombinedPathValues path)

getStatistics

public abstract java.util.ArrayList<java.lang.String> getStatistics()
Specified by:
getStatistics in interface MetropolisStrategy

hitsCanvas

public boolean hitsCanvas(CombinedPathValues testPath)

initialize

public abstract void initialize(double[] values)

isVisble

public boolean isVisble(Environment lightEnv,
                        Environment eyeEnv,
                        Intersection lightInt)

luminance

public float luminance(Spectrum3d lumSpec)

mutatePath

public float mutatePath(CombinedPathValues actualPath,
                        CombinedPathValues mutatedPath)
Specified by:
mutatePath in interface MetropolisStrategy

pathChanged

public void pathChanged()
Specified by:
pathChanged in interface MetropolisStrategy

registerError

public int registerError(int error)

resetAll

public abstract void resetAll()
Specified by:
resetAll in interface MetropolisStrategy

traceEyeSubPath

public void traceEyeSubPath(int m,
                            int m_)

traceLightSubPath

public void traceLightSubPath(int l,
                              int l_)