<commit_before>package de.lmu.ifi.dbs.algorithm;

import de.lmu.ifi.dbs.algorithm.result.KNNDistanceOrderResult;
import de.lmu.ifi.dbs.algorithm.result.Result;
import de.lmu.ifi.dbs.data.MetricalObject;
import de.lmu.ifi.dbs.database.Database;
import de.lmu.ifi.dbs.distance.Distance;
import de.lmu.ifi.dbs.utilities.Description;
import de.lmu.ifi.dbs.utilities.optionhandling.AttributeSettings;
import de.lmu.ifi.dbs.utilities.optionhandling.OptionHandler;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Random;

/**
 * Provides an order of the kNN-distances for all objects within the database.
 * 
 * @author <NAME> (<a
 *         href="mailto:<EMAIL>"><EMAIL></a>)
 */
public class KNNDistanceOrder<O extends MetricalObject, D extends Distance<D>> extends DistanceBasedAlgorithm<O, D>
{
    /**
     * Parameter k.
     */
    public static final String K_P = "k";

    /**
     * Default value for k.
     */
    public static final int DEFAULT_K = 1;

    /**
     * Description for parameter k.
     */
    public static final String K_D = "<int>the distance of the k-distant object is assessed. k >= 1 (default: " + DEFAULT_K + ")";

    /**
     * Parameter percentage.
     */
    public static final String PERCENTAGE_P = "percent";

    /**
     * Default value for percentage.
     */
    public static final double DEFAULT_PERCENTAGE = 1;<commit_msg>minpts instead of k to avoid conflict with preprocessor<commit_after>package de.lmu.ifi.dbs.algorithm;

import de.lmu.ifi.dbs.algorithm.result.KNNDistanceOrderResult;
import de.lmu.ifi.dbs.algorithm.result.Result;
import de.lmu.ifi.dbs.data.MetricalObject;
import de.lmu.ifi.dbs.database.Database;
import de.lmu.ifi.dbs.distance.Distance;
import de.lmu.ifi.dbs.utilities.Description;
import de.lmu.ifi.dbs.utilities.optionhandling.AttributeSettings;
import de.lmu.ifi.dbs.utilities.optionhandling.OptionHandler;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Random;

/**
 * Provides an order of the kNN-distances for all objects within the database.
 * 
 * @author <NAME> (<a
 *         href="mailto:<EMAIL>"><EMAIL></a>)
 */
public class KNNDistanceOrder<O extends MetricalObject, D extends Distance<D>> extends DistanceBasedAlgorithm<O, D>
{
    /**
     * Parameter k.
     */
    public static final String K_P = "minpts";

    /**
     * Default value for k.
     */
    public static final int DEFAULT_K = 1;

    /**
     * Description for parameter k.
     */
    public static final String K_D = "<int>the distance of the k-distant object is assessed. k >= 1 (default: " + DEFAULT_K + ")";

    /**
     * Parameter percentage.
     */
    public static final String PERCENTAGE_P = "percent";

    /**
     * Default value for percentage.
     */
    public static final double DEFAULT_PERCENTAGE = 1;
{'fraction_non_alphanumeric': 0.12069553358336174, 'fraction_numerical': 0.002045687009887487, 'mean_word_length': 3.333825701624815, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7053', 'n_tokens_mistral': 960, 'n_tokens_neox': 928, 'n_words': 231}