Class BreakingAlgorithm.FitnessClasses

  • Enclosing class:
    BreakingAlgorithm

    static final class BreakingAlgorithm.FitnessClasses
    extends java.lang.Object
    Holder for symbolic literals for the fitness classes
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int LOOSE  
      (package private) static java.lang.String[] NAMES  
      (package private) static int TIGHT  
      (package private) static int VERY_LOOSE  
      (package private) static int VERY_TIGHT  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FitnessClasses()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static int computeFitness​(double adjustRatio)
      Figure out the fitness class of this line (tight, loose, very tight or very loose).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FitnessClasses

        private FitnessClasses()
    • Method Detail

      • computeFitness

        static int computeFitness​(double adjustRatio)
        Figure out the fitness class of this line (tight, loose, very tight or very loose). See the section on "More Bells and Whistles" in Knuth's "Breaking Paragraphs Into Lines".
        Parameters:
        adjustRatio - the adjustment ratio
        Returns:
        the fitness class