'Creates the mutable probdist based on the given prob_dist and using
the list of samples given. These values are stored as log
probabilities if the store_logs flag is set.
:param prob_dist: the distribution from which to garner the
probabilities
:type prob_dist: ProbDist
:param samples: the complete set of samples
:type samples: sequence of any
:param store_logs: whether to store the probabilities as logarithms
:type store_logs: bool'

def __init__(self, prob_dist, samples, store_logs=True):

    self._samples = samples
    self._sample_dict = dict(((samples[i], i) for i in range(len(samples))))
    self._data = (array.array(str(u'd'), [0.0]) * len(samples))
    for i in range(len(samples)):
        if store_logs:
            self._data[i] = prob_dist.logprob(samples[i])
        else:
            self._data[i] = prob_dist.prob(samples[i])
    self._logs = store_logs
