Class NaiveAverageMeasure

    • Constructor Detail

      • NaiveAverageMeasure

        public NaiveAverageMeasure()
    • Method Detail

      • distance

        public static double distance​(Polygon X,
                                      Polygon Y,
                                      double threshold)
        Parameters:
        X - Polygon
        Y - Polygon
        threshold - of the distance
        Returns:
        the average distance between X and Y
      • computeDistance

        public double computeDistance​(Polygon X,
                                      Polygon Y,
                                      double threshold)
        Brute force approach to computing the MAX distance between two polygons
        Parameters:
        X - First polygon
        Y - Second polygon
        threshold - of the distance
        Returns:
        Distance between the two polygons
      • getName

        public String getName()
        Description copied from interface: IMeasure
        Returns name of a measure.
        Returns:
        Measure name as a string
      • run

        public AMapping run​(Set<Polygon> source,
                            Set<Polygon> target,
                            double threshold)
        Computes the SetMeasure distance for a source and target set
        Parameters:
        source - Source polygons
        target - Target polygons
        threshold - Distance threshold
        Returns:
        Mapping from source resources to target resources
      • getType

        public String getType()
        Description copied from interface: IMeasure
        Returns type of a measure.
        Returns:
        The runtime of the measure
      • getSimilarity

        public double getSimilarity​(Instance instance1,
                                    Instance instance2,
                                    String property1,
                                    String property2)
        Description copied from interface: IMeasure
        Returns the similarity between two instances, given their corresponding properties.
        Parameters:
        instance1 - , the source instance
        instance2 - , the target instance
        property1 - , the source property
        property2 - , the target property
        Returns:
        The similarity of the instances
      • getRuntimeApproximation

        public double getRuntimeApproximation​(double mappingSize)
        Description copied from interface: IMeasure
        Returns the runtime approximation of a measure.
        Parameters:
        mappingSize - , the mapping size returned by the measure
        Returns:
        The runtime of the measure