Class EMClusterVisualization.Instance

    • Field Detail

      • EMBORDER

        public static final java.lang.String EMBORDER
        Generic tags to indicate the type of element. Used in IDs, CSS-Classes etc.
        See Also:
        Constant Field Values
      • opacStyle

        private int opacStyle
        Opacity
      • softBorder

        private int softBorder
        Soft or hard border
      • drawStyle

        private int drawStyle
        Round or boxed.
    • Constructor Detail

      • Instance

        public Instance​(VisualizerContext context,
                        VisualizationTask task,
                        VisualizationPlot plot,
                        double width,
                        double height,
                        Projection proj)
        Constructor
        Parameters:
        context - Visualizer context
        task - VisualizationTask
        plot - Plot to draw to
        width - Embedding width
        height - Embedding height
        proj - Projection
    • Method Detail

      • drawSphere2D

        protected void drawSphere2D​(java.lang.String sname,
                                    double[] cent,
                                    double[][] pc)
        Draw by approximating a sphere via cubic splines
        Parameters:
        sname - CSS class name
        cent - center
        pc - Principal components
      • equalsPlusTimes

        private double[] equalsPlusTimes​(double[] out,
                                         double[] x,
                                         double[] y,
                                         double a)
        Compute out = x + y * a, for 2d.
        Parameters:
        out - Output buffer
        x - X
        y - Y
        a - Scaling
        Returns:
        out
      • drawHullLines

        protected void drawHullLines​(java.lang.String sname,
                                     double[] cent,
                                     Polygon chres)
        Approximate by convex hull.
        Parameters:
        sname - CSS name
        cent - center
        chres - Polygon around center
      • makeHull

        protected Polygon makeHull​(double[][] pc)
        Build a convex hull to approximate the sphere.
        Parameters:
        pc - Principal components
        Returns:
        Polygon
      • makeHullComplex

        protected Polygon makeHullComplex​(double[][] pc)
        Build a convex hull to approximate the sphere.
        Parameters:
        pc - Principal components
        Returns:
        Polygon
      • drawHullArc

        protected void drawHullArc​(java.lang.String sname,
                                   double[] cent,
                                   Polygon chres)
        Approximate the hull using arcs.
        Parameters:
        sname - CSS name
        cent - Center
        chres - Polygon
      • drawArc

        private void drawArc​(SVGPath path,
                             double[] cent,
                             double[] pre,
                             double[] nex,
                             double[] oPrev,
                             double[] oNext,
                             double scale)
        Draw an arc to simulate the hyper ellipse.
        Parameters:
        path - Path to draw to
        cent - Center
        pre - Previous point
        nex - Next point
        scale - Scaling factor