gov.sandia.cognition.statistics.montecarlo.MonteCarloSampler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cognitive-foundry Show documentation
Show all versions of cognitive-foundry Show documentation
A single jar with all the Cognitive Foundry components.
/*
* File: MonteCarloSampler.java
* Authors: Kevin R. Dixon
* Company: Sandia National Laboratories
* Project: Cognitive Foundry
*
* Copyright Feb 4, 2010, Sandia Corporation.
* Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
* license for use of this work by or on behalf of the U.S. Government.
* Export of this program may require a license from the United States
* Government. See CopyrightHistory.txt for complete details.
*
*/
package gov.sandia.cognition.statistics.montecarlo;
import gov.sandia.cognition.annotation.PublicationReference;
import gov.sandia.cognition.annotation.PublicationType;
import gov.sandia.cognition.evaluator.Evaluator;
import gov.sandia.cognition.util.CloneableSerializable;
import java.util.ArrayList;
import java.util.Random;
/**
* A sampling technique based on the Monte Carlo method.
* @param Type of data used as inputs by the target function
* @param Type of samples generated by the sampler
* @param Type of Evaluator to sample from
* @author Kevin R. Dixon
* @since 3.0
*/
@PublicationReference(
author="Wikipedia",
title="Monte Carlo method",
type=PublicationType.WebPage,
year=2010,
url="http://en.wikipedia.org/wiki/Monte_carlo_method"
)
public interface MonteCarloSampler>
extends CloneableSerializable
{
/**
* Draws samples according to the distribution of the target function.
* @param targetFunction
* Target function that we want to generate samples.
* @param random
* Random-number generator.
* @param numSamples
* Number of samples to generate.
* @return
* Samples
*/
public ArrayList extends SampleType> sample(
FunctionType targetFunction,
Random random,
int numSamples );
}