com.mebigfatguy.polycasso
Class Settings

java.lang.Object
  extended by com.mebigfatguy.polycasso.Settings
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Settings
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

a simple java bean holding settings that are used to control how Polycasso runs

See Also:
Serialized Form

Constructor Summary
Settings()
          constructs a settings object with rational defaults
 
Method Summary
 java.lang.Object clone()
          clones the Settings object
 double getCoolingRate()
          gets how quickly the error cutoff decrements each generation
 int getEliteSize()
          gets the elite size, the number of members that are copied from one generation to another
 int getGenerationSize()
          gets the generation size
 int getMaxColorChange()
          gets the maximum color component change
 java.awt.Dimension getMaxImageSize()
          gets the maximum image size
 int getMaxPoints()
          gets the maximum number of points per polygon
 int getMaxPolygons()
          gets the maximum polygons that can be used to image the picture
 int getMaxPtMovement()
          gets the largest movement that any polygon point can make in one improvement attempt
 double getStartTemperature()
          gets the error below wich polygon samples can be included in a generation, even if not the best
 boolean isUseAnnealing()
          gets whether to use simulating annealing
 void setCoolingRate(double coolRate)
          sets how quickly the error cutoff decrements each generation
 void setEliteSize(int eliteSz)
          sets the elite size, the number of members that are copied from one generation to another
 void setGenerationSize(int generationSz)
          sets the generation size
 void setMaxColorChange(int maxColorChg)
          sets the maximum color component change
 void setMaxImageSize(java.awt.Dimension imageSize)
          sets the maximum image size
 void setMaxPoints(int maxPts)
          sets the maximum number of points per polygon
 void setMaxPolygons(int maxPolys)
          sets the maximum polygons that can be used to image the picture
 void setMaxPtMovement(int maxPointMovement)
          sets the largest movement that any polygon point can make in one improvement attempt
 void setStartTemperature(double startTemp)
          sets the error below which polygon samples can be included in a generation, even if not the best
 void setUseAnnealing(boolean annealing)
          sets whether to use simulated annealing
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Settings

public Settings()
constructs a settings object with rational defaults

Method Detail

clone

public java.lang.Object clone()
clones the Settings object

Overrides:
clone in class java.lang.Object
Returns:
a new copy of the settings object

setGenerationSize

public void setGenerationSize(int generationSz)
sets the generation size

Parameters:
generationSz - the size of each generation

getGenerationSize

public int getGenerationSize()
gets the generation size

Returns:
the generation size

setEliteSize

public void setEliteSize(int eliteSz)
sets the elite size, the number of members that are copied from one generation to another

Parameters:
eliteSz - the elite size

getEliteSize

public int getEliteSize()
gets the elite size, the number of members that are copied from one generation to another

Returns:
the elite size

setUseAnnealing

public void setUseAnnealing(boolean annealing)
sets whether to use simulated annealing

Parameters:
annealing - whether to use annealing

isUseAnnealing

public boolean isUseAnnealing()
gets whether to use simulating annealing

Returns:
whether to use simulating annealing

setStartTemperature

public void setStartTemperature(double startTemp)
sets the error below which polygon samples can be included in a generation, even if not the best

Parameters:
startTemp - the pixel error cutoff

getStartTemperature

public double getStartTemperature()
gets the error below wich polygon samples can be included in a generation, even if not the best

Returns:
the pixel error cutoff

setCoolingRate

public void setCoolingRate(double coolRate)
sets how quickly the error cutoff decrements each generation

Parameters:
coolRate - the cutoff decrementor value

getCoolingRate

public double getCoolingRate()
gets how quickly the error cutoff decrements each generation

Returns:
the cutoff decrementor value

setMaxImageSize

public void setMaxImageSize(java.awt.Dimension imageSize)
sets the maximum image size

Parameters:
imageSize - the image size

getMaxImageSize

public java.awt.Dimension getMaxImageSize()
gets the maximum image size

Returns:
the image size

setMaxPolygons

public void setMaxPolygons(int maxPolys)
sets the maximum polygons that can be used to image the picture

Parameters:
maxPolys - the maximum number of polygons

getMaxPolygons

public int getMaxPolygons()
gets the maximum polygons that can be used to image the picture

Returns:
the maximum number of polygons

setMaxPoints

public void setMaxPoints(int maxPts)
sets the maximum number of points per polygon

Parameters:
maxPts - the maximum polygon points

getMaxPoints

public int getMaxPoints()
gets the maximum number of points per polygon

Returns:
the maximum polygon points

setMaxPtMovement

public void setMaxPtMovement(int maxPointMovement)
sets the largest movement that any polygon point can make in one improvement attempt

Parameters:
maxPointMovement - the maximum allowed movement

getMaxPtMovement

public int getMaxPtMovement()
gets the largest movement that any polygon point can make in one improvement attempt

Returns:
the maximum allowed movement

setMaxColorChange

public void setMaxColorChange(int maxColorChg)
sets the maximum color component change

Parameters:
maxColorChg - the max color change

getMaxColorChange

public int getMaxColorChange()
gets the maximum color component change

Returns:
the max color change


Copyright © 2009-2010 MeBigFatGuy.com. All Rights Reserved.