question: public static < O > KNNQuery < O > precomputedKNNQuery ( Database database , Relation < O > relation , DistanceQuery < O > dq , int k ) { KNNQuery < O > knnq = database . getKNNQuery ( dq , k , DatabaseQuery . HINT_HEAVY_USE , DatabaseQuery . HINT_OPTIMIZED_ONLY , DatabaseQuery . HINT_NO_CACHE ) ; if ( knnq instanceof PreprocessorKNNQuery ) { return knnq ; } MaterializeKNNPreprocessor < O > preproc = new MaterializeKNNPreprocessor < > ( relation , dq . getDistanceFunction ( ) , k ) ; preproc . initialize ( ) ; return preproc . getKNNQuery ( dq , k ) ; }
target:  Get (or create) a precomputed kNN query for the database.