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

com.bnd.math.domain.rand.RandomDistribution Maven / Gradle / Ivy

The newest version!
package com.bnd.math.domain.rand;

import com.bnd.core.domain.TechnicalDomainObject;

/** 
 * @author © Peter Banda
 * @since 2011
 */
public abstract class RandomDistribution extends TechnicalDomainObject {

	public abstract RandomDistributionType getType();

	public abstract Class getValueType();

	public static RandomDistribution createNormalDistribution(
		Double mean,
		Double std
	) {
		return new ShapeLocationDistribution(RandomDistributionType.Normal, mean, std);
	}

	public static RandomDistribution createLogNormalDistribution(
		Double location,
		Double shape
	) {
		return new ShapeLocationDistribution(RandomDistributionType.LogNormal, location, shape);
	}

	public static RandomDistribution createPositiveNormalDistribution(
		Double location,
		Double shape
	) {
		return new ShapeLocationDistribution(RandomDistributionType.PositiveNormal, location, shape);
	}

	public static  RandomDistribution createNormalDistribution(
		Class valueType,
		Double mean,
		Double std
	) {
		return new ShapeLocationDistribution(RandomDistributionType.Normal, mean, std, valueType);
	}

	public static  RandomDistribution createLogNormalDistribution(
		Class valueType,
		Double location,
		Double shape
	) {
		return new ShapeLocationDistribution(RandomDistributionType.LogNormal, location, shape, valueType);
	}

	public static  RandomDistribution createPositiveNormalDistribution(
		Class valueType,
		Double location,
		Double shape
	) {
		return new ShapeLocationDistribution(RandomDistributionType.PositiveNormal, location, shape, valueType);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy