package dkohl.bayes.probability.distribution.tree;

import java.util.LinkedList;

import dkohl.bayes.probability.Assignment;
import dkohl.bayes.probability.Probability;
import dkohl.bayes.probability.distribution.ProbabilityDistribution;

/**
 * Just a dummy node. Always returns the probability value, ignoring the
 * assignment.
 * 
 * @author Daniel Kohlsdorf
 */
public class ProbabilityLeaf implements ProbabilityDistribution {

	private Probability probability;

	public ProbabilityLeaf(Probability probability) {
		super();
		this.probability = probability;
	}

	@Override
	public Probability eval(LinkedList<Assignment> assignment) {
		return probability;
	}

}
