Class TLspDependentLabelsRemovalWrapper

All Implemented Interfaces:
ILcdCloneable, ILspLabelingAlgorithm, Cloneable

public class TLspDependentLabelsRemovalWrapper extends ALspDiscreteLabelingAlgorithmWrapper
This wrapper uses a dependency relation between labels to add extra behavior to the placement. When representation 1 depends on a representation 2, and representation 2 is removed from the results, representation 1 is also removed.

It is also possible to define circular dependencies, e.g. representation 1 and representation 2 depend on each other. When representation 1 is removed, representation 2 is also removed, and vice versa.

This wrapper only supports dependencies between representations from the same object. Not respecting this will cause this wrapper to work incorrectly, i.e. representation that should disappear will not always disappear.

This wrapper works best when the labels returned by the label iterator of the delegate algorithm are ordered as follows :

  • Clusters of labels should are kept together. If one representation of a representation cluster is returned, others should follow right after.
  • Labels that depend on another label should be returned after it.
Not having this order doesn't stop the wrapper from working correctly. However the placement will not be optimal : more representations may be dropped than necessary.
Since:
2012.0