com.mebigfatguy.polycasso
Class Improver

java.lang.Object
  extended by com.mebigfatguy.polycasso.Improver

public class Improver
extends java.lang.Object

a class that applies various improvement attempts to a polygon, attempts to prioritize which algorithms to pick based on what has worked in the past, as well as priorities which polygons have had success being transformed.


Constructor Summary
Improver(Settings confSettings, GenerationHandler genHandler, java.awt.Dimension size)
          create an improver using a specified image size
 
Method Summary
 java.util.List<PolygonData> getData()
          get the list of polygons usually after attempted to be improved
 ImprovementType improveRandomly()
          attempts to improve on one polygon randomly by adjusting it according to a randomly selected improvement type
 void typeWasSuccessful(ImprovementType type, boolean successful)
          updates the stats for types that successfully improved the image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Improver

public Improver(Settings confSettings,
                GenerationHandler genHandler,
                java.awt.Dimension size)
create an improver using a specified image size

Parameters:
confSettings - the settings to be used
genHandler - the generation handler
size - the size of the image
Method Detail

getData

public java.util.List<PolygonData> getData()
get the list of polygons usually after attempted to be improved

Returns:
the list of polygons

typeWasSuccessful

public void typeWasSuccessful(ImprovementType type,
                              boolean successful)
updates the stats for types that successfully improved the image

Parameters:
type - the improvement type that was successful
successful - whether the improvement was successful

improveRandomly

public ImprovementType improveRandomly()
attempts to improve on one polygon randomly by adjusting it according to a randomly selected improvement type

Returns:
the improvement type used to alter the data


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