All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.finmath.montecarlo.AbstractRandomVariableFactory Maven / Gradle / Ivy

/*
 * (c) Copyright Christian P. Fries, Germany. Contact: [email protected].
 *
 * Created on 09.02.2004
 */
package net.finmath.montecarlo;

import java.io.Serializable;

import net.finmath.stochastic.RandomVariable;

/**
 *
 * @author Christian Fries
 * @version 1.0
 */
public abstract class AbstractRandomVariableFactory implements Serializable, RandomVariableFactory {

	private static final long serialVersionUID = -4412332958142580025L;

	@Override
	public RandomVariable createRandomVariable(final double value) {
		return createRandomVariable(Double.NEGATIVE_INFINITY, value);
	}

	@Override
	public abstract RandomVariable createRandomVariable(double time, double value);

	@Override
	public abstract RandomVariable createRandomVariable(double time, double[] values);

	@Override
	public RandomVariable[] createRandomVariableArray(final double[] values) {
		final RandomVariable[] valuesAsRandomVariables = new RandomVariable[values.length];
		for(int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy