Class MkAppTreeIndex<O>

    • Field Detail

      • relation

        private Relation<O> relation
        The relation indexed
    • Method Detail

      • createNewLeafEntry

        protected MkAppEntry createNewLeafEntry​(DBID id,
                                                O object,
                                                double parentDistance)
        Creates a new leaf entry representing the specified data object in the specified subtree.
        Parameters:
        object - the data object to be represented by the new entry
        parentDistance - the distance from the object to the routing object of the parent node
      • kNNByObject

        public KNNSearcher<O> kNNByObject​(DistanceQuery<O> distanceQuery,
                                          int maxk,
                                          int flags)
        Description copied from interface: KNNIndex
        Get a KNN query object for the given distance query and k.

        This function MAY return null, when the given distance is not supported!

        Specified by:
        kNNByObject in interface KNNIndex<O>
        Parameters:
        distanceQuery - Distance query
        maxk - Maximum value of k
        flags - Hints for the optimizer
        Returns:
        KNN Query object or null
      • kNNByDBID

        public KNNSearcher<DBIDRef> kNNByDBID​(DistanceQuery<O> distanceQuery,
                                              int maxk,
                                              int flags)
        Description copied from interface: KNNIndex
        Get a KNN query object for the given distance query and k.

        This function MAY return null, when the given distance is not supported!

        Specified by:
        kNNByDBID in interface KNNIndex<O>
        Parameters:
        distanceQuery - Distance query
        maxk - Maximum value of k
        flags - Hints for the optimizer
        Returns:
        KNN Query object or null
      • rangeByObject

        public RangeSearcher<O> rangeByObject​(DistanceQuery<O> distanceQuery,
                                              double maxradius,
                                              int flags)
        Description copied from interface: RangeIndex
        Get a range query object for the given distance query and k.

        This function MAY return null, when the given distance is not supported!

        Specified by:
        rangeByObject in interface RangeIndex<O>
        Parameters:
        distanceQuery - Distance query
        maxradius - Maximum range
        flags - Hints for the optimizer
        Returns:
        KNN Query object or null
      • rangeByDBID

        public RangeSearcher<DBIDRef> rangeByDBID​(DistanceQuery<O> distanceQuery,
                                                  double maxradius,
                                                  int flags)
        Description copied from interface: RangeIndex
        Get a range query object for the given distance query and k.

        This function MAY return null, when the given distance is not supported!

        Specified by:
        rangeByDBID in interface RangeIndex<O>
        Parameters:
        distanceQuery - Distance query
        maxradius - Maximum range
        flags - Hints for the optimizer
        Returns:
        KNN Query object or null
      • rkNNByObject

        public RKNNSearcher<O> rkNNByObject​(DistanceQuery<O> distanceQuery,
                                            int maxk,
                                            int flags)
        Description copied from interface: RKNNIndex
        Get a RKNN query object for the given distance query and k.

        This function MAY return null, when the given distance is not supported!

        Specified by:
        rkNNByObject in interface RKNNIndex<O>
        Parameters:
        distanceQuery - Distance query
        maxk - Maximum k for RkNN query
        flags - Hints for the optimizer
        Returns:
        RKNN Query object or null
      • rkNNByDBID

        public RKNNSearcher<DBIDRef> rkNNByDBID​(DistanceQuery<O> distanceQuery,
                                                int maxk,
                                                int flags)
        Description copied from interface: RKNNIndex
        Get a RKNN query object for the given distance query and k.

        This function MAY return null, when the given distance is not supported!

        Specified by:
        rkNNByDBID in interface RKNNIndex<O>
        Parameters:
        distanceQuery - Distance query
        maxk - Maximum k for RkNN query
        flags - Hints for the optimizer
        Returns:
        RKNN Query object or null