edu.berkeley.nlp.lm.values
Class ProbBackoffPair

java.lang.Object
  extended by edu.berkeley.nlp.lm.values.ProbBackoffPair
All Implemented Interfaces:
LongRepresentable<ProbBackoffPair>, Comparable<ProbBackoffPair>

public class ProbBackoffPair
extends Object
implements Comparable<ProbBackoffPair>, LongRepresentable<ProbBackoffPair>


Field Summary
 float backoff
           
 float prob
           
 
Constructor Summary
ProbBackoffPair(float logProb, float backoff)
           
ProbBackoffPair(long probBackoff)
           
 
Method Summary
 long asLong()
           
static float backoffOf(long key)
           
 int compareTo(ProbBackoffPair arg0)
           
 boolean equals(Object obj)
           
static long floatsToLong(float prob, float backoff)
           
 int hashCode()
           
static float probOf(long key)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

prob

public float prob

backoff

public float backoff
Constructor Detail

ProbBackoffPair

public ProbBackoffPair(long probBackoff)

ProbBackoffPair

public ProbBackoffPair(float logProb,
                       float backoff)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(ProbBackoffPair arg0)
Specified by:
compareTo in interface Comparable<ProbBackoffPair>

asLong

public long asLong()
Specified by:
asLong in interface LongRepresentable<ProbBackoffPair>

floatsToLong

public static long floatsToLong(float prob,
                                float backoff)
Parameters:
prob -
backoff -
Returns:

probOf

public static float probOf(long key)

backoffOf

public static float backoffOf(long key)