Package whistlesAndMoans
Class FragmentingFragmenter
java.lang.Object
whistlesAndMoans.DiscardingFragmenter
whistlesAndMoans.FragmentingFragmenter
- All Implemented Interfaces:
RegionFragmenter
- Direct Known Subclasses:
RejoiningFragmenter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Split the mother region up into fragments, breaking at every branch and joinint
fragmentRegion
(ConnectedRegion connectedRegion) Fragment a connected regiongetFragment
(int fragment) Get a specific fragmentint
Get the number of fragmentsboolean
void
setDiscardSmallOnes
(boolean discardSmallOnes) Set by teh RejoinFragments superclass so that all fragments are kept
-
Constructor Details
-
FragmentingFragmenter
-
-
Method Details
-
fragmentRegion
Description copied from interface:RegionFragmenter
Fragment a connected region- Specified by:
fragmentRegion
in interfaceRegionFragmenter
- Overrides:
fragmentRegion
in classDiscardingFragmenter
- 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
Description copied from interface:RegionFragmenter
Get a specific fragment- Specified by:
getFragment
in interfaceRegionFragmenter
- Overrides:
getFragment
in classDiscardingFragmenter
- 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 interfaceRegionFragmenter
- Overrides:
getNumFragments
in classDiscardingFragmenter
- 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
-
-