|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnars.entity.TruthValue
public class TruthValue
Frequency and confidence.
| Field Summary | |
|---|---|
protected ShortFloat |
confidence
The confidence factor of the truth value |
private static char |
DELIMITER
The charactor that marks the two ends of a truth value |
protected ShortFloat |
frequency
The frequency factor of the truth value |
private static char |
SEPARATOR
The charactor that separates the factors in a truth value |
| Constructor Summary | |
|---|---|
TruthValue(float f,
float c)
Constructor with two ShortFloats |
|
TruthValue(TruthValue v)
Constructor with a TruthValue to clone |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object that)
Compare two truth values |
float |
getConfidence()
Get the confidence value |
float |
getExpDifAbs(TruthValue t)
Calculate the absolute difference of the expectation value and that of a given truth value |
float |
getExpectation()
Calculate the expectation value of the truth value |
float |
getFrequency()
Get the frequency value |
int |
hashCode()
The hash code of a TruthValue |
java.lang.String |
toString()
The String representation of a TruthValue |
java.lang.String |
toString2()
A simplified String representation of a TruthValue, where each factor is accruate to 1% |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final char DELIMITER
private static final char SEPARATOR
protected ShortFloat frequency
protected ShortFloat confidence
| Constructor Detail |
|---|
public TruthValue(float f,
float c)
f - The frequency valuec - The confidence valuepublic TruthValue(TruthValue v)
v - The truth value to be cloned| Method Detail |
|---|
public float getFrequency()
public float getConfidence()
public float getExpectation()
public float getExpDifAbs(TruthValue t)
t - The given value
public boolean equals(java.lang.Object that)
equals in class java.lang.Objectthat - The other TruthValue
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString2()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||