Class MkMaxTreeIndex<O>

    • Field Detail

      • relation

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

      • createNewLeafEntry

        protected MkMaxLeafEntry createNewLeafEntry​(DBID id,
                                                    DBIDRef object,
                                                    double parentDistance)
        Returns:
        a new MkMaxLeafEntry representing the specified data object
      • insert

        public void insert​(DBIDRef id)
        Description copied from interface: DynamicIndex
        Inserts the specified object into this index.
        Specified by:
        insert in interface DynamicIndex
        Parameters:
        id - the object to be inserted
      • insertAll

        public void insertAll​(DBIDs ids)
        Description copied from interface: DynamicIndex
        Inserts the specified objects into this index. If a bulk load mode is implemented, the objects are inserted in one bulk.
        Specified by:
        insertAll in interface DynamicIndex
        Parameters:
        ids - the objects to be inserted
      • delete

        public final boolean delete​(DBIDRef id)
        Throws an UnsupportedOperationException since deletion of objects is not yet supported by an M-Tree.
        Specified by:
        delete in interface DynamicIndex
        Parameters:
        id - Object to remove
        Returns:
        true if this index did contain the object, false otherwise
        Throws:
        java.lang.UnsupportedOperationException - thrown, since deletions aren't implemented yet.
      • deleteAll

        public void deleteAll​(DBIDs ids)
        Throws an UnsupportedOperationException since deletion of objects is not yet supported by an M-Tree.
        Specified by:
        deleteAll in interface DynamicIndex
        Parameters:
        ids - Objects to remove
        Throws:
        java.lang.UnsupportedOperationException - thrown, since deletions aren't implemented yet.
      • 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 maxrange,
                                              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
        maxrange - 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