Class DistanceFunctionVisualization

  • All Implemented Interfaces:
    VisualizationProcessor, VisFactory

    public class DistanceFunctionVisualization
    extends java.lang.Object
    implements VisFactory
    Factory for visualizers to generate an SVG-Element containing dots as markers representing the kNN of the selected Database objects. To use this, add a kNN preprocessor index to your database!
    Since:
    0.5.5
    Author:
    Erich Schubert, Robert Rödler
    • Field Detail

      • NAME

        public static final java.lang.String NAME
        A short name characterizing this Visualizer.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DistanceFunctionVisualization

        public DistanceFunctionVisualization()
        Constructor
    • Method Detail

      • getLPNormP

        public static double getLPNormP​(AbstractMaterializeKNNPreprocessor<?> kNN)
        Get the "p" value of an Lp norm.
        Parameters:
        kNN - kNN preprocessor
        Returns:
        p of LP norm, or NaN
      • isAngularDistance

        public static boolean isAngularDistance​(AbstractMaterializeKNNPreprocessor<?> kNN)
        Test whether the given preprocessor used an angular distance function
        Parameters:
        kNN - kNN preprocessor
        Returns:
        true when angular
      • drawCosine

        public static org.w3c.dom.Element drawCosine​(SVGPlot svgp,
                                                     Projection2D proj,
                                                     NumberVector mid,
                                                     double angle)
        Visualizes Cosine and ArcCosine distance functions
        Parameters:
        svgp - SVG Plot
        proj - Visualization projection
        mid - mean vector
        angle - Opening angle in radians
        Returns:
        path element