public final class Multinomial<T> extends Object implements Sampler<T>, Iterable<T>
Constructor and Description |
---|
Multinomial() |
Multinomial(Iterable<WeightedThing<T>> things) |
Multinomial(com.google.common.collect.Multiset<T> counts) |
Modifier and Type | Method and Description |
---|---|
void |
add(T value,
double w) |
void |
delete(T value) |
double |
getProbability(T value) |
double |
getWeight() |
double |
getWeight(T value) |
Iterator<T> |
iterator() |
T |
sample() |
T |
sample(double u) |
void |
set(T value,
double newP) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public Multinomial()
public Multinomial(com.google.common.collect.Multiset<T> counts)
public Multinomial(Iterable<WeightedThing<T>> things)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.