public static boolean isAngularDistance ( AbstractMaterializeKNNPreprocessor < ? > kNN ) { DistanceFunction < ? > distanceFunction = kNN . getDistanceQuery ( ) . getDistanceFunction ( ) ; return CosineDistanceFunction . class . isInstance ( distanceFunction ) // || ArcCosineDistanceFunction . class . isInstance ( distanceFunction ) ; }
Test whether the given preprocessor used an angular distance function