|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectreasoner.Concept
public class Concept
This class represents a logic Concept as a FuzzySet of Individual
Field Summary | |
---|---|
private java.util.Map<Individual,java.lang.Double> |
alwaysMap
the always map |
protected java.util.Map<Individual,java.lang.Double> |
events
the map of EventInd and values |
protected java.text.NumberFormat |
formatter
utility formatter |
protected static KnowledgeBase |
kb
the Knowledge Base |
private java.lang.String |
name
the concept name |
protected static double |
NOW
the constant _now_ |
protected static double |
SELF
the constant _self_ |
private java.util.Map<Individual,java.lang.Double> |
sometimeMap
the sometime map |
protected java.util.Map<Individual,java.lang.Double> |
staticMap
the map of StaticInd and values |
protected java.util.Map<Individual,java.lang.Double> |
uLineMap
the map of ULineInd and values |
Constructor Summary | |
---|---|
Concept(java.util.Map<Individual,java.lang.Double> ev,
java.lang.String name,
KnowledgeBase kb)
Constructs a Concept from the given map of EventInds and values and with a given name and in a given knowledge base |
|
Concept(java.lang.String name,
KnowledgeBase kb)
Constructs an empty Concept, with a given name and in a given KnowledgeBase |
Method Summary | |
---|---|
Concept |
add(Individual i,
java.lang.Double d)
Add an Individual to this Concept, with a given membership value |
double |
always(Individual ind)
Returns the membership value of the given Individual on the logical expression [alwaysA(ind)], where A is this Concept, using the 'inf' semantics. |
java.lang.Integer |
card(java.lang.Double alpha,
java.lang.String mode)
Gives this Concept cardinality at an alpha level. |
boolean |
containsIndivName(java.lang.String name)
Tests on existence of a given EventInd name in this Concept |
boolean |
containsKey(Individual key)
Tests on existence of a given Individual, as EventInd or ULineInd or StaticInd, in this Concept |
double |
get(Individual key)
Gives the membership value of the given Individual, 0.0 if it does not exist |
java.util.Map<Individual,java.lang.Double> |
getAlwaysMap()
|
java.util.Map<Individual,java.lang.Double> |
getEvents()
|
java.util.Set<Individual> |
getEvKeys()
|
static KnowledgeBase |
getKb()
|
java.util.TreeSet<java.lang.Double> |
getLambda()
Gives Lambda, the alpha values set, for the EventInds only |
private Individual |
getLastAlways(ULineEvent ul)
Returns the last Individual, belonging to the given ULineEvent, for which the always value has been evaluated. |
private Individual |
getLastSometime(ULineEvent ul)
Returns the last Individual, belonging to the given ULineEvent, for which the sometime value has been evaluated. |
java.lang.String |
getName()
Gives this Concept name |
Concept |
getNextConcept(Individual ind)
Returns a new Concept being NextConcept for this Concept, for Individuals preceeding the given Individual. |
static double |
getNOW()
|
static double |
getSELF()
|
java.util.Map<Individual,java.lang.Double> |
getSometimeMap()
|
java.util.Map<Individual,java.lang.Double> |
getStaticMap()
|
java.util.Map<Individual,java.lang.Double> |
getULineMap()
|
java.util.Set<Individual> |
getUlKeys()
|
java.util.TreeSet<java.lang.Double> |
getUlLambda()
Gives Lambda, the alpha values set, for the ULineInds only |
Point |
interpole()
Constructs an ArrayList of Points, containing Concept values, and, with it, produces a linear interpolation. |
Concept |
intersection(Concept c)
The intersection between this Concept and a given second one |
void |
print()
Prints on the standard output a String representation for this Concept, with all EventInds and values. |
void |
printUlines()
Prints on the standard output a String representation for this Concept, with all ULineInds and values. |
void |
setAlwaysMap(java.util.Map<Individual,java.lang.Double> alwaysMap)
|
void |
setEvents(java.util.Map<Individual,java.lang.Double> ev)
|
private void |
setFormatter(int number)
|
static void |
setKb(KnowledgeBase kkb)
|
void |
setName(java.lang.String name)
Sets this Concept name |
static void |
setNOW(double now)
|
static void |
setSELF(double self)
|
void |
setSometimeMap(java.util.Map<Individual,java.lang.Double> sometimeMap)
|
void |
setStaticMap(java.util.Map<Individual,java.lang.Double> staticMap)
|
void |
setULineMap(java.util.Map<Individual,java.lang.Double> lineMap)
|
double |
sometime(Individual ind)
Returns the membership value of the given Individual on the logical expression [sometimeA(ind)], where A is this Concept, using the 'sup' semantics. |
double |
subsumed(Concept c)
Gives the subsumption value for this Concept in a given second one |
double |
subsumed(Quantifier q,
Concept c)
Returns the quantified subsumption value for this Concept in a given second one, given the quantifier. |
java.lang.String |
toString()
|
java.util.TreeSet<java.lang.Double> |
totalLambda(Concept c)
Gets the union set of alpha-values belonging to this Concept and to a given other Concept, for the EventInds only |
java.util.TreeSet<java.lang.Double> |
totalUlLambda(Concept c)
gets the total set of alpha-values belonging to this Concept and to a given other concept, for the ULine Individuals only |
double |
until(Concept b,
Individual ind)
Return the evaluation of the logical expression [A until B(ind)], where A is this Concept, B is a given Concept, ind is the Individual for which expression has to be evaluted. |
double |
until(Concept b,
Individual ind,
double lastUntil)
Returns the evaluation of the logical expression [A until B(ind)], where A is this Concept, B is a given other Concept, ind is the Individual for which expression has to be evaluated; lastUntil is the given expression value for the last (previous) Individual with respect to ind. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<Individual,java.lang.Double> events
protected java.util.Map<Individual,java.lang.Double> uLineMap
protected java.util.Map<Individual,java.lang.Double> staticMap
private java.util.Map<Individual,java.lang.Double> sometimeMap
private java.util.Map<Individual,java.lang.Double> alwaysMap
private java.lang.String name
protected static KnowledgeBase kb
protected static double NOW
protected static double SELF
protected java.text.NumberFormat formatter
Constructor Detail |
---|
public Concept(java.lang.String name, KnowledgeBase kb)
name
- the namekb
- the KnowledgeBasepublic Concept(java.util.Map<Individual,java.lang.Double> ev, java.lang.String name, KnowledgeBase kb)
ev
- the given map of EventInds and valuesname
- the namekb
- the knowledge baseMethod Detail |
---|
private void setFormatter(int number)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic double sometime(Individual ind)
ind
- the given Individual
public double always(Individual ind)
ind
- the given Individual
private Individual getLastSometime(ULineEvent ul)
ul
- the given ULineEvent
private Individual getLastAlways(ULineEvent ul)
ul
- the given ULineEvent
public double until(Concept b, Individual ind, double lastUntil)
b
- the Concept Bind
- the IndividuallastUntil
- the last value
public double until(Concept b, Individual ind)
b
- the Concept Bind
- the Individual
public Concept add(Individual i, java.lang.Double d)
i
- the Individuald
- the membership value
public java.lang.Integer card(java.lang.Double alpha, java.lang.String mode)
card
in interface FuzzySet
alpha
- the alpha levelmode
- the mode
public Point interpole()
public java.util.Set<Individual> getEvKeys()
public java.util.Set<Individual> getUlKeys()
public java.util.TreeSet<java.lang.Double> getLambda()
getLambda
in interface FuzzySet
public java.util.TreeSet<java.lang.Double> totalLambda(Concept c)
c
- the Concept
public java.util.TreeSet<java.lang.Double> getUlLambda()
public java.util.TreeSet<java.lang.Double> totalUlLambda(Concept c)
c
- the given Concept
public Concept intersection(Concept c)
c
- the given second Concept
public boolean containsKey(Individual key)
key
- the Individual
public boolean containsIndivName(java.lang.String name)
name
- the name as String
public double get(Individual key)
key
- the Individual
public double subsumed(Concept c)
c
- the subsuming Concept
public double subsumed(Quantifier q, Concept c)
q
- the Quantifierc
- the subsuming Concept
public java.lang.String toString()
toString
in class java.lang.Object
public void print()
public void printUlines()
public Concept getNextConcept(Individual ind)
ind
- the Individual
public java.util.Map<Individual,java.lang.Double> getEvents()
public void setEvents(java.util.Map<Individual,java.lang.Double> ev)
ev
- the events Map to setpublic java.util.Map<Individual,java.lang.Double> getULineMap()
public void setULineMap(java.util.Map<Individual,java.lang.Double> lineMap)
lineMap
- the uLineMap to setpublic static KnowledgeBase getKb()
public static void setKb(KnowledgeBase kkb)
kkb
- the kb to setpublic static double getNOW()
public static void setNOW(double now)
now
- the NOW to setpublic static double getSELF()
public static void setSELF(double self)
self
- the SELF to setpublic java.util.Map<Individual,java.lang.Double> getSometimeMap()
public void setSometimeMap(java.util.Map<Individual,java.lang.Double> sometimeMap)
sometimeMap
- the sometimeMap to setpublic java.util.Map<Individual,java.lang.Double> getAlwaysMap()
public void setAlwaysMap(java.util.Map<Individual,java.lang.Double> alwaysMap)
alwaysMap
- the alwaysMap to setpublic java.util.Map<Individual,java.lang.Double> getStaticMap()
public void setStaticMap(java.util.Map<Individual,java.lang.Double> staticMap)
staticMap
- the staticMap to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |