Class FragmentingFragmenter

java.lang.Object
whistlesAndMoans.DiscardingFragmenter
whistlesAndMoans.FragmentingFragmenter
All Implemented Interfaces:
RegionFragmenter
Direct Known Subclasses:
RejoiningFragmenter

public class FragmentingFragmenter extends DiscardingFragmenter
  • Constructor Details

    • FragmentingFragmenter

      public FragmentingFragmenter(WhistleMoanControl whistleMoanControl)
  • Method Details

    • fragmentRegion

      public int fragmentRegion(ConnectedRegion connectedRegion)
      Description copied from interface: RegionFragmenter
      Fragment a connected region
      Specified by:
      fragmentRegion in interface RegionFragmenter
      Overrides:
      fragmentRegion in class DiscardingFragmenter
      Parameters:
      connectedRegion - region to fragment
      Returns:
      number of fragments.
    • createFragments

      public void createFragments()
      Split the mother region up into fragments, breaking at every branch and join
    • getFragment

      public ConnectedRegion getFragment(int fragment)
      Description copied from interface: RegionFragmenter
      Get a specific fragment
      Specified by:
      getFragment in interface RegionFragmenter
      Overrides:
      getFragment in class DiscardingFragmenter
      Parameters:
      fragment - fragment number (0 to getNumFragments);
      Returns:
      the ith fragment
    • getNumFragments

      public int getNumFragments()
      Description copied from interface: RegionFragmenter
      Get the number of fragments
      Specified by:
      getNumFragments in interface RegionFragmenter
      Overrides:
      getNumFragments in class DiscardingFragmenter
      Returns:
      the number of fragments
    • isDiscardSmallOnes

      public boolean isDiscardSmallOnes()
    • setDiscardSmallOnes

      public void setDiscardSmallOnes(boolean discardSmallOnes)
      Set by teh RejoinFragments superclass so that all fragments are kept
      Parameters:
      discardSmallOnes -