tl.lin.data.cfd
Interface Int2IntConditionalFrequencyDistribution

All Known Implementing Classes:
Int2IntConditionalFrequencyDistributionEntry

public interface Int2IntConditionalFrequencyDistribution

A conditional frequency distribution where events are ints and counts are ints.


Method Summary
 void check()
          Performs an internal consistency check of this data structure.
 int get(int k, int cond)
          Returns the observed count of k conditioned on cond.
 Int2IntFrequencyDistribution getConditionalDistribution(int cond)
          Returns the frequency distribution conditioned on cond.
 long getMarginalCount(int k)
          Returns the marginal count of k.
 long getSumOfAllCounts()
          Returns the sum of all counts.
 void increment(int k, int cond)
          Increments the observed count of k conditioned on cond.
 void increment(int k, int cond, int v)
          Increments the observed count of k conditioned on cond by v.
 void set(int k, int cond, int v)
          Sets the observed count of k conditioned on cond to v.
 

Method Detail

set

void set(int k,
         int cond,
         int v)
Sets the observed count of k conditioned on cond to v.


increment

void increment(int k,
               int cond)
Increments the observed count of k conditioned on cond.


increment

void increment(int k,
               int cond,
               int v)
Increments the observed count of k conditioned on cond by v.


get

int get(int k,
        int cond)
Returns the observed count of k conditioned on cond.


getMarginalCount

long getMarginalCount(int k)
Returns the marginal count of k. That is, sum of counts of k conditioned on all cond.


getConditionalDistribution

Int2IntFrequencyDistribution getConditionalDistribution(int cond)
Returns the frequency distribution conditioned on cond.


getSumOfAllCounts

long getSumOfAllCounts()
Returns the sum of all counts.


check

void check()
Performs an internal consistency check of this data structure. An exception will be thrown if an error is found.



Copyright © 2013. All Rights Reserved.