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

gov.sandia.cognition.statistics.montecarlo.MonteCarloSampler Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
/*
 * 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 sample(
        FunctionType targetFunction,
        Random random,
        int numSamples );

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy