public class Object2IntConditionalFrequencyDistributionEntry<K extends Comparable<K>> extends Object implements Object2IntConditionalFrequencyDistribution<K>
HMapKI. This class keeps track of frequencies using ints, so beware when dealing with a
large number of observations.| Constructor and Description |
|---|
Object2IntConditionalFrequencyDistributionEntry() |
| Modifier and Type | Method and Description |
|---|---|
void |
check()
Performs an internal consistency check of this data structure.
|
int |
get(K k,
K cond)
Returns the observed count of
k conditioned on cond. |
Object2IntFrequencyDistribution<K> |
getConditionalDistribution(K cond)
Returns the frequency distribution conditioned on
cond. |
long |
getMarginalCount(K k)
Returns the marginal count of
k. |
long |
getSumOfAllCounts()
Returns the sum of all counts.
|
void |
increment(K k,
K cond)
Increments the observed count of
k conditioned on cond. |
void |
increment(K k,
K cond,
int v)
Increments the observed count of
k conditioned on cond by
v. |
void |
set(K k,
K cond,
int v)
Sets the observed count of
k conditioned on cond to v. |
public Object2IntConditionalFrequencyDistributionEntry()
public void set(K k, K cond, int v)
Object2IntConditionalFrequencyDistributionk conditioned on cond to v.set in interface Object2IntConditionalFrequencyDistribution<K extends Comparable<K>>public void increment(K k, K cond)
Object2IntConditionalFrequencyDistributionk conditioned on cond.increment in interface Object2IntConditionalFrequencyDistribution<K extends Comparable<K>>public void increment(K k, K cond, int v)
Object2IntConditionalFrequencyDistributionk conditioned on cond by
v.increment in interface Object2IntConditionalFrequencyDistribution<K extends Comparable<K>>public int get(K k, K cond)
Object2IntConditionalFrequencyDistributionk conditioned on cond.get in interface Object2IntConditionalFrequencyDistribution<K extends Comparable<K>>public long getMarginalCount(K k)
Object2IntConditionalFrequencyDistributionk. That is, sum of counts of k
conditioned on all cond.getMarginalCount in interface Object2IntConditionalFrequencyDistribution<K extends Comparable<K>>public Object2IntFrequencyDistribution<K> getConditionalDistribution(K cond)
Object2IntConditionalFrequencyDistributioncond.getConditionalDistribution in interface Object2IntConditionalFrequencyDistribution<K extends Comparable<K>>public long getSumOfAllCounts()
Object2IntConditionalFrequencyDistributiongetSumOfAllCounts in interface Object2IntConditionalFrequencyDistribution<K extends Comparable<K>>public void check()
Object2IntConditionalFrequencyDistributioncheck in interface Object2IntConditionalFrequencyDistribution<K extends Comparable<K>>Copyright © 2018. All rights reserved.