helix.graph.algo.c3part.optimizer
Interface ColorOptimizer

All Superinterfaces:
Iterator<Integer>
All Known Implementing Classes:
AbstractColorOptimizer, EmbeddedColorOptimizer, FixColorOptimizer, GlobalColorOptimizer, IdentityColorOptimizer, TerminalsColorOptimizer, TerminalsStarColorOptimizer

public interface ColorOptimizer
extends Iterator<Integer>


Method Summary
 int getColorIndex(int color)
          return the rank (starting at 0) at which the specified color was produced this is formally equivalent to getUsedColors().IndexOf(color) but may be quicker in some cases
 String getParamInfo()
          get optional parameters info this is used only for logging purpose (for user information) so you may just return an empty string
 List<Integer> getUsedColors()
          return a (copy) list of already provided colors.
 void giveup()
          experimental section: for gc this method may be called when the optimizer will never be used again it will allow to release some internal field for the garbage collector.
 String preview()
          give a preview of this optimizer colors if possible this is used only for logging purpose (for user information) so you may just return an empty string
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

getUsedColors

List<Integer> getUsedColors()
return a (copy) list of already provided colors. note: the interpretation of 'already provided' may be different for each optimizer (see notes in subclasses). by default it means the colors that have been previously produced by each call to next().


getColorIndex

int getColorIndex(int color)
return the rank (starting at 0) at which the specified color was produced this is formally equivalent to getUsedColors().IndexOf(color) but may be quicker in some cases


giveup

void giveup()
experimental section: for gc this method may be called when the optimizer will never be used again it will allow to release some internal field for the garbage collector.


preview

String preview()
give a preview of this optimizer colors if possible this is used only for logging purpose (for user information) so you may just return an empty string


getParamInfo

String getParamInfo()
get optional parameters info this is used only for logging purpose (for user information) so you may just return an empty string