|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.Stats.ProbabilityTable
public class ProbabilityTable
Probability Table.> TODO: use marf.util.Matrix. $Id: ProbabilityTable.java,v 1.31 2005/07/30 20:05:45 mokhov Exp $
Constructor Summary | |
---|---|
ProbabilityTable(java.lang.String pstrLanguage)
Constructor with the language parameter other than default. |
Method Summary | |
---|---|
void |
dumpCSV()
Allows dumping the contents of the table in the CSV format. |
java.lang.String |
getLang()
Retrieves current language. |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
double |
getOccurence(int x)
Allows getting an occurence given the x coordinate. |
double |
getOccurence(int x,
int y)
Allows getting an occurence given x and y coordinates. |
double |
getOccurence(int x,
int y,
int z)
Allows getting an occurence given x, y, and z coordinates. |
double |
getOccurence(java.util.Vector poObservationList)
Allows getting the occurence of a list of observations. |
int |
incFrequency(java.util.Vector poObservationList)
Increments the frequency of occurences of a list of observations. |
boolean |
normalize()
Not implemented. |
double |
P(Observation poObservationCause,
Observation poObservationEffect)
Not implemented. |
double |
P(Observation poObservationCause,
java.util.Vector poObservationList)
Not implemented. |
double |
P(java.util.Vector poObservationList)
Retrieves the probability of a list of observations as a number of occurences. |
void |
setLang(java.lang.String pstrLang)
Allows setting a natural language associated with this table. |
void |
setOccurence(int x,
double pdOccurence)
Allows setting an occurence given the x coordinate. |
void |
setOccurence(int x,
int y,
double pdOccurence)
Allows setting an occurence given the x and y coordinates. |
void |
setOccurence(int x,
int y,
int z,
double pdOccurence)
Allows setting an occurence given the x, y, and z coordinates. |
void |
setOccurence(java.util.Vector poObservationList,
double pdOccurence)
Allows setting an occurence of a list of observations. |
int |
size()
Retrieves the size of the table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProbabilityTable(java.lang.String pstrLanguage)
pstrLanguage
- the language this table is forstrLang
Method Detail |
---|
public final double P(Observation poObservationCause, Observation poObservationEffect)
poObservationCause
- unusedpoObservationEffect
- unused
public final double P(Observation poObservationCause, java.util.Vector poObservationList)
poObservationCause
- unusedpoObservationList
- unused
public final double P(java.util.Vector poObservationList)
poObservationList
-
public final int size()
public final void setOccurence(int x, double pdOccurence)
x
- pdOccurence
-
java.lang.ArrayIndexOutOfBoundsException
- if the coordinate is out of rangepublic final void setOccurence(int x, int y, double pdOccurence)
x
- y
- pdOccurence
-
java.lang.ArrayIndexOutOfBoundsException
- if either of the coordinates is out of rangepublic final void setOccurence(int x, int y, int z, double pdOccurence)
x
- y
- z
- pdOccurence
-
java.lang.ArrayIndexOutOfBoundsException
- if either of the coordinates is out of rangepublic final double getOccurence(int x)
x
-
java.lang.ArrayIndexOutOfBoundsException
- if the coordinate is out of rangepublic final double getOccurence(int x, int y)
x
- y
-
java.lang.ArrayIndexOutOfBoundsException
- if either of the coordinates is out of rangepublic final double getOccurence(int x, int y, int z)
x
- y
- z
-
java.lang.ArrayIndexOutOfBoundsException
- if either of the coordinates is out of rangepublic final void setOccurence(java.util.Vector poObservationList, double pdOccurence)
poObservationList
- the listpdOccurence
- the desired occurencepublic final double getOccurence(java.util.Vector poObservationList)
poObservationList
- the list
public final int incFrequency(java.util.Vector poObservationList)
poObservationList
- the list to work with
public final boolean normalize()
public void dumpCSV()
public final void setLang(java.lang.String pstrLang)
pstrLang
- the languagepublic final java.lang.String getLang()
public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |