# Class Smoother

java.lang.Object
com.treemap.swing.voronoi.smoothing.Smoother

public class Smoother extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Smoother()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static GeneralPath`
  `createGeneralPath(List<SmoothedSegment> smoothedSegments)`
  `static Map<Double,Point2d>`
  `createSamples(CubicCurve2D curve)`
  `static SmoothedSegment`
  `createSmoothedSegment(SmoothedSegment commonSegment, SegmentLocation start, SegmentLocation end, Vertex startVertex, Vertex endVertex)`
  `static void`
  `getBezierLocation(CubicCurve2D curve, double t, Point2d sampleLocation)`
  `static double`
  `getDiagonalLength(Rectangle bounds)`
  `static CurveLocation`
  `getNearestCurveLocation(Vertex vertex, CubicCurve2D curve, Map<Double,Point2d> samples, SmoothedSegment smoothedSegment)`
  `static CubicCurve2D`
  `getSubCruveFromP1(CurveLocation curveLocation, CubicCurve2D curve)`
  `static CubicCurve2D`
  `getSubCruveToP2(CurveLocation curveLocation, CubicCurve2D curve)`
  `static CurveLocation`
  `getTheOneCloserToP1(CurveLocation l1, CurveLocation l2, CubicCurve2D curve)`
  `static SegmentLocation`
  `getTheOneCloserToP2(CurveLocation l1, CurveLocation l2, CubicCurve2D curve)`
  `static CubicCurve2D`
  `newCubicCurve2D(Class<? extends CubicCurve2D> curveType)`
  Creates a new instance of CubicCurve2D while the specific type CubicCurve2D.Float or CubicCurve2D.Double.
  `static void`
  `reverse(CubicCurve2D curve)`
  `static Map<Double,Point2d>`
  `sample(CubicCurve2D curve, int nSamples)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Smoother

    public Smoother()

- ## Method Details

  - ### createSmoothedSegment

    public static SmoothedSegment createSmoothedSegment(SmoothedSegment commonSegment, SegmentLocation start, SegmentLocation end, Vertex startVertex, Vertex endVertex)

  - ### getNearestCurveLocation

    public static CurveLocation getNearestCurveLocation(Vertex vertex, CubicCurve2D curve, Map<Double,Point2d> samples, SmoothedSegment smoothedSegment)

  - ### createSamples

    public static Map<Double,Point2d> createSamples(CubicCurve2D curve)

  - ### getDiagonalLength

    public static double getDiagonalLength(Rectangle bounds)

  - ### sample

    public static Map<Double,Point2d> sample(CubicCurve2D curve, int nSamples)

  - ### getBezierLocation

    public static void getBezierLocation(CubicCurve2D curve, double t, Point2d sampleLocation)

  - ### reverse

    public static void reverse(CubicCurve2D curve)

  - ### getTheOneCloserToP1

    public static CurveLocation getTheOneCloserToP1(CurveLocation l1, CurveLocation l2, CubicCurve2D curve)

  - ### getTheOneCloserToP2

    public static SegmentLocation getTheOneCloserToP2(CurveLocation l1, CurveLocation l2, CubicCurve2D curve)

  - ### getSubCruveFromP1

    public static CubicCurve2D getSubCruveFromP1(CurveLocation curveLocation, CubicCurve2D curve)

  - ### getSubCruveToP2

    public static CubicCurve2D getSubCruveToP2(CurveLocation curveLocation, CubicCurve2D curve)

  - ### newCubicCurve2D

    public static CubicCurve2D newCubicCurve2D(Class<? extends CubicCurve2D> curveType)
    Creates a new instance of CubicCurve2D while the specific type CubicCurve2D.Float or CubicCurve2D.Double.
    Parameters:
      `curveType` -
    Returns:

  - ### createGeneralPath

    public static GeneralPath createGeneralPath(List<SmoothedSegment> smoothedSegments)