tl.lin.data.cfd
Class Int2IntConditionalFrequencyDistributionEntry

java.lang.Object
  extended by tl.lin.data.cfd.Int2IntConditionalFrequencyDistributionEntry
All Implemented Interfaces:
Int2IntConditionalFrequencyDistribution

public class Int2IntConditionalFrequencyDistributionEntry
extends Object
implements Int2IntConditionalFrequencyDistribution

Implementation of Int2IntConditionalFrequencyDistribution based on HMapII.


Constructor Summary
Int2IntConditionalFrequencyDistributionEntry()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Int2IntConditionalFrequencyDistributionEntry

public Int2IntConditionalFrequencyDistributionEntry()
Method Detail

set

public void set(int k,
                int cond,
                int v)
Description copied from interface: Int2IntConditionalFrequencyDistribution
Sets the observed count of k conditioned on cond to v.

Specified by:
set in interface Int2IntConditionalFrequencyDistribution

increment

public void increment(int k,
                      int cond)
Description copied from interface: Int2IntConditionalFrequencyDistribution
Increments the observed count of k conditioned on cond.

Specified by:
increment in interface Int2IntConditionalFrequencyDistribution

increment

public void increment(int k,
                      int cond,
                      int v)
Description copied from interface: Int2IntConditionalFrequencyDistribution
Increments the observed count of k conditioned on cond by v.

Specified by:
increment in interface Int2IntConditionalFrequencyDistribution

get

public int get(int k,
               int cond)
Description copied from interface: Int2IntConditionalFrequencyDistribution
Returns the observed count of k conditioned on cond.

Specified by:
get in interface Int2IntConditionalFrequencyDistribution

getMarginalCount

public long getMarginalCount(int k)
Description copied from interface: Int2IntConditionalFrequencyDistribution
Returns the marginal count of k. That is, sum of counts of k conditioned on all cond.

Specified by:
getMarginalCount in interface Int2IntConditionalFrequencyDistribution

getConditionalDistribution

public Int2IntFrequencyDistribution getConditionalDistribution(int cond)
Description copied from interface: Int2IntConditionalFrequencyDistribution
Returns the frequency distribution conditioned on cond.

Specified by:
getConditionalDistribution in interface Int2IntConditionalFrequencyDistribution

getSumOfAllCounts

public long getSumOfAllCounts()
Description copied from interface: Int2IntConditionalFrequencyDistribution
Returns the sum of all counts.

Specified by:
getSumOfAllCounts in interface Int2IntConditionalFrequencyDistribution

check

public void check()
Description copied from interface: Int2IntConditionalFrequencyDistribution
Performs an internal consistency check of this data structure. An exception will be thrown if an error is found.

Specified by:
check in interface Int2IntConditionalFrequencyDistribution


Copyright © 2013. All Rights Reserved.