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

import java.util.List;

import de.lmu.ifi.dbs.elki.data.DatabaseObject;
import de.lmu.ifi.dbs.elki.database.Database;
import de.lmu.ifi.dbs.elki.database.IndexDatabase;
import de.lmu.ifi.dbs.elki.logging.LoggingConfiguration;
import de.lmu.ifi.dbs.elki.result.Result;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.Flag;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.OptionID;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;

/**
 * <p>AbstractAlgorithm sets the values for flags verbose and time.</p>
 * <p/>
 * <p>This class serves also as a model of implementing an algorithm within this framework.
 * Any Algorithm that makes use of these flags may extend this class. Beware to make
 * correct use of parameter settings via optionHandler as commented with
 * constructor and methods.</p>
 *
 * @author <NAME>
 * @param <O> the type of DatabaseObjects handled by this Algorithm
 * @param <R> the type of result to retrieve from this Algorithm
 */
public abstract class AbstractAlgorithm<O extends DatabaseObject, R extends Result> extends AbstractParameterizable implements Algorithm<O, R> {

    /**
     * Flag to allow verbose messages while performing the algorithm.
     * <p>Key: {@code -verbose} </p>
     */
    private final Flag VERBOSE_FLAG = new Flag(OptionID.ALGORITHM_VERBOSE);

    /**
     * Holds the value of {@link #VERBOSE_FLAG}.
     */
    private boolean verbose;

    /**
     * Flag to request output of performance time.<commit_msg>replaced link to optionhandler with link to abstract parameterizable<commit_after>package de.lmu.ifi.dbs.elki.algorithm;

import java.util.List;

import de.lmu.ifi.dbs.elki.data.DatabaseObject;
import de.lmu.ifi.dbs.elki.database.Database;
import de.lmu.ifi.dbs.elki.database.IndexDatabase;
import de.lmu.ifi.dbs.elki.logging.LoggingConfiguration;
import de.lmu.ifi.dbs.elki.result.Result;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.Flag;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.OptionID;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;

/**
 * <p>AbstractAlgorithm sets the values for flags verbose and time.</p>
 * <p/>
 * <p>This class serves also as a model of implementing an algorithm within this framework.
 * Any Algorithm that makes use of these flags may extend this class. Beware to make
 * correct use of parameter settings via the facilities provided within
 * {@link AbstractParameterizable} as commented with
 * constructor and methods.</p>
 *
 * @author <NAME>
 * @param <O> the type of DatabaseObjects handled by this Algorithm
 * @param <R> the type of result to retrieve from this Algorithm
 */
public abstract class AbstractAlgorithm<O extends DatabaseObject, R extends Result> extends AbstractParameterizable implements Algorithm<O, R> {

    /**
     * Flag to allow verbose messages while performing the algorithm.
     * <p>Key: {@code -verbose} </p>
     */
    private final Flag VERBOSE_FLAG = new Flag(OptionID.ALGORITHM_VERBOSE);

    /**
     * Holds the value of {@link #VERBOSE_FLAG}.
     */
    private boolean verbose;

    /**
     * Flag to request output of performance time.
{'fraction_non_alphanumeric': 0.10050550104073744, 'fraction_numerical': 0.0, 'mean_word_length': 4.128048780487805, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '5997357', 'n_tokens_mistral': 1032, 'n_tokens_neox': 1004, 'n_words': 304}