reasoner
Class UlEvent

java.lang.Object
  extended by reasoner.Concept
      extended by reasoner.Dynamic
          extended by reasoner.Event
              extended by reasoner.UlEvent
All Implemented Interfaces:
java.lang.Comparable, reasoner.FuzzySet

public class UlEvent
extends reasoner.Event
implements java.lang.Comparable

this class represents the concept of individuals being the events corresponding to a given ULine, together, for sake of simplicity, with the given ULine

Author:
marco furlan

Field Summary
private  java.lang.String name
          the UlEvent name
private  java.util.TreeMap<java.lang.Double,reasoner.Individual> timeMap
          the time map
 
Fields inherited from class reasoner.Concept
events, formatter, kb, NOW, SELF, staticMap, uLineMap
 
Constructor Summary
UlEvent(java.lang.String name, reasoner.KnowledgeBase kb)
           
 
Method Summary
 void add(java.lang.Double time, reasoner.Individual i)
           
 int compareTo(java.lang.Object i)
           
 reasoner.Individual firstMax(reasoner.Concept a)
          return the individual corrisponding on the first maximum value on the concept a
 double get(double time, reasoner.Concept c)
          return the concept value of the individual belonging this UlEvent, corresponding to the given time
 reasoner.Individual getFirst()
           
 reasoner.Individual getIndividual(java.lang.Double time)
           
 reasoner.Individual getLast()
           
 reasoner.Individual getLast(reasoner.Individual ind)
          return last Individual, in time ordering, before given Individual or null if such Individual does not exist
 reasoner.ULineInd getMyULine()
           
 java.lang.String getName()
          gives the Concept name
 reasoner.Individual getNext(reasoner.Individual ind)
          return next Individual, in time ordering, after given Individual or null if such Individual does not exist
 java.util.TreeMap<java.lang.Double,reasoner.Individual> getTimeMap()
           
 java.util.TreeSet<java.lang.Double> getTimeSet()
           
 UlEvent getWithoutLast()
          return a new UlEvent identical to the present except that the last Individual is missing
 reasoner.Individual lastMax(reasoner.Concept a)
           
 double max(reasoner.Concept a)
          gets the maximum value gained by this UlEvent on a given Concept
 void print()
          prints a String representation for this Concept, with all Event Individuals and values
 void setName(java.lang.String name)
          sets the Concept name
 void setProxy()
           
 void setTime(java.lang.Double d, reasoner.Individual i)
           
 void setTimeMap(java.util.TreeMap<java.lang.Double,reasoner.Individual> timeMap)
           
 java.lang.String toString()
           
 
Methods inherited from class reasoner.Concept
add, always, card, card, containsIndivName, containsKey, containsUlKey, get, getAlwaysMap, getEvents, getKb, getKeys, getLambda, getNextConcept, getNOW, getSELF, getSometimeMap, getStaticMap, getTempKeys, getTemporalLambda, getULineMap, interpole, intersection, printUlines, setAlwaysMap, setEvents, setKb, setNOW, setSELF, setSometimeMap, setStaticMap, setULineMap, sometime, subsumed, subsumed, totalLambda, totalTempLambda, until, until
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name
the UlEvent name


timeMap

private java.util.TreeMap<java.lang.Double,reasoner.Individual> timeMap
the time map

Constructor Detail

UlEvent

public UlEvent(java.lang.String name,
               reasoner.KnowledgeBase kb)
Parameters:
r -
name -
Method Detail

max

public double max(reasoner.Concept a)
gets the maximum value gained by this UlEvent on a given Concept

Parameters:
a -
Returns:

getFirst

public reasoner.Individual getFirst()
Returns:
the first Individual, in time ordering, in this Universal Line or null if this Universal Line is empty

getLast

public reasoner.Individual getLast()
Returns:
the last Individual, in time ordering, in this Universal Line or null if this UlEvent is empty

getNext

public reasoner.Individual getNext(reasoner.Individual ind)
return next Individual, in time ordering, after given Individual or null if such Individual does not exist

Parameters:
ind - the given Individual
Returns:

get

public double get(double time,
                  reasoner.Concept c)
return the concept value of the individual belonging this UlEvent, corresponding to the given time

Parameters:
time -
c -
Returns:

getLast

public reasoner.Individual getLast(reasoner.Individual ind)
return last Individual, in time ordering, before given Individual or null if such Individual does not exist

Parameters:
ind - the given Individual
Returns:

getWithoutLast

public UlEvent getWithoutLast()
return a new UlEvent identical to the present except that the last Individual is missing

Returns:

firstMax

public reasoner.Individual firstMax(reasoner.Concept a)
return the individual corrisponding on the first maximum value on the concept a

Parameters:
a - the Concept
Returns:

lastMax

public reasoner.Individual lastMax(reasoner.Concept a)

print

public void print()
Description copied from class: reasoner.Concept
prints a String representation for this Concept, with all Event Individuals and values

Overrides:
print in class reasoner.Concept

toString

public java.lang.String toString()
Overrides:
toString in class reasoner.Concept
Returns:
a String representation for this Concept, with all Event Individuals and values

setProxy

public void setProxy()

add

public void add(java.lang.Double time,
                reasoner.Individual i)

getTimeSet

public java.util.TreeSet<java.lang.Double> getTimeSet()

getName

public java.lang.String getName()
Description copied from class: reasoner.Concept
gives the Concept name

Overrides:
getName in class reasoner.Concept
Returns:
the name

setName

public void setName(java.lang.String name)
Description copied from class: reasoner.Concept
sets the Concept name

Overrides:
setName in class reasoner.Concept
Parameters:
name - the name to set

getTimeMap

public java.util.TreeMap<java.lang.Double,reasoner.Individual> getTimeMap()
Returns:
the timeMap

setTimeMap

public void setTimeMap(java.util.TreeMap<java.lang.Double,reasoner.Individual> timeMap)
Parameters:
timeMap - the timeMap to set

setTime

public void setTime(java.lang.Double d,
                    reasoner.Individual i)

getIndividual

public reasoner.Individual getIndividual(java.lang.Double time)

compareTo

public int compareTo(java.lang.Object i)
Specified by:
compareTo in interface java.lang.Comparable

getMyULine

public reasoner.ULineInd getMyULine()