<commit_before>package net.finmath.montecarlo;

import net.finmath.stochastic.RandomVariable;

public interface RandomVariableFactory {

	RandomVariable createRandomVariable(double value);

	RandomVariable createRandomVariable(double time, double value);

	RandomVariable createRandomVariable(double time, double[] values);

	RandomVariable[] createRandomVariableArray(double[] values);

	RandomVariable[][] createRandomVariableMatrix(double[][] values);

}<commit_msg>Added JavaDoc.<commit_after>package net.finmath.montecarlo;

import net.finmath.stochastic.RandomVariable;

/**
 * A factory for creating objects implementing <code>net.finmath.stochastic.RandomVariable</code>.
 * 
 * Use this interface in your implementations to allow <i>dependency injection</i>, i.e. to allow the use
 * of different implementations of <code>net.finmath.stochastic.RandomVariable</code> whenever random variables
 * need to be constructed.
 * 
 * @see net.finmath.stochastic.RandomVariable
 * 
 * @author <NAME>
 * @version 1.0
 */
public interface RandomVariableFactory {

	/**
	 * Create a (deterministic) random variable form a constant.
	 * 
	 * @param value A constant value.
	 * @return The <code>RandomVariable</code>.
	 */
	RandomVariable createRandomVariable(double value);

	/**
	 * Create a (deterministic) random variable form a constant using a specific filtration time.
	 * 
	 * @param value A constant value.
	 * @return The <code>RandomVariable</code>.
	 */
	RandomVariable createRandomVariable(double time, double value);

	/**
	 * Create a random variable form an array using a specific filtration time.
	 * 
	 * @param value Array representing values of the random variable at the sample paths.
	 * @return The <code>RandomVariable</code>.
	 */
	RandomVariable createRandomVariable(double time, double[] values);

	/**
	 * Create an array of (deterministic) random variables from an array of constants.
	 * 
	 * @param value Array representing constants.
	 * @return The <code>RandomVariable</code>.
	 */
	RandomVariable[] createRandomVariableArray(double[] values);

	/**
	 * Create a matrix of (deterministic) random variables from an matrix of constants.
	 * 
	 * @param value Matrix representing constants.
	 * @return The <code>RandomVariable</code>.
	 */
	RandomVariable[][] createRandomVariableMatrix(double[][] values);

}
{'fraction_non_alphanumeric': 0.10265183917878529, 'fraction_numerical': 0.000855431993156544, 'mean_word_length': 4.803970223325062, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '7391005', 'n_tokens_mistral': 652, 'n_tokens_neox': 590, 'n_words': 198}