public abstract class InteriorAngleGreatArcConnector extends AbstractGreatArcConnector
This class provides two concrete implementations: InteriorAngleGreatArcConnector.Maximize and
InteriorAngleGreatArcConnector.Minimize, which choose connections with the largest or smallest interior
angles respectively.
| Modifier and Type | Class and Description |
|---|---|
static class |
InteriorAngleGreatArcConnector.Maximize
Implementation of
InteriorAngleGreatArcConnector that chooses arc
connections that produce the largest interior angles. |
static class |
InteriorAngleGreatArcConnector.Minimize
Implementation of
InteriorAngleGreatArcConnector that chooses arc
connections that produce the smallest interior angles. |
AbstractGreatArcConnector.ConnectableGreatArcAbstractPathConnector.ConnectableElement<E extends AbstractPathConnector.ConnectableElement<E>>| Constructor and Description |
|---|
InteriorAngleGreatArcConnector() |
| Modifier and Type | Method and Description |
|---|---|
static List<GreatArcPath> |
connectMaximized(Collection<GreatArc> arcs)
Convenience method for connecting a set of arcs with interior angles maximized
when possible.
|
static List<GreatArcPath> |
connectMinimized(Collection<GreatArc> arcs)
Convenience method for connecting a set of line segments with interior angles minimized
when possible.
|
protected abstract boolean |
isBetterAngle(double newAngle,
double previousAngle)
Return true if
newAngle represents a better interior angle than previousAngle. |
protected AbstractGreatArcConnector.ConnectableGreatArc |
selectConnection(AbstractGreatArcConnector.ConnectableGreatArc incoming,
List<AbstractGreatArcConnector.ConnectableGreatArc> outgoing) |
add, add, connect, connectAll, connectAlladdPathElement, computePathRoots, connectPathElements, selectPointConnectionprotected AbstractGreatArcConnector.ConnectableGreatArc selectConnection(AbstractGreatArcConnector.ConnectableGreatArc incoming, List<AbstractGreatArcConnector.ConnectableGreatArc> outgoing)
selectConnection in class AbstractPathConnector<AbstractGreatArcConnector.ConnectableGreatArc>protected abstract boolean isBetterAngle(double newAngle,
double previousAngle)
newAngle represents a better interior angle than previousAngle.newAngle - the new angle under considerationpreviousAngle - the previous best anglenewAngle represents a better interior angle than previousAnglepublic static List<GreatArcPath> connectMaximized(Collection<GreatArc> arcs)
new Maximize().connect(segments).arcs - arcs to connectInteriorAngleGreatArcConnector.Maximizepublic static List<GreatArcPath> connectMinimized(Collection<GreatArc> arcs)
new Minimize().connect(segments).arcs - arcs to connectInteriorAngleGreatArcConnector.MinimizeCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.