reasoner
Class UniversalLine

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

public class UniversalLine
extends Event
implements java.lang.Comparable

Author:
marco furlan this class represents the Concept of individuals being the events of a given ULine, together, for sake of simplicity, with the given ULine

Field Summary
private  java.lang.String name
           
private  java.util.TreeMap<java.lang.Double,Individual> timeMap
           
 
Fields inherited from class reasoner.Concept
formatter, kb, m, NOW, SELF, uLineMap
 
Constructor Summary
UniversalLine(java.lang.String name, KnowledgeBase kb)
           
 
Method Summary
 void add(java.lang.Double time, Individual i)
           
 int compareTo(java.lang.Object i)
           
 double eval(Concept a)
          gets the maximum value gained by this UniversalLine on a given Concept
 Individual firstMax(Concept a)
          return the individual corrisponding on the first maximum value on the concept a
 double get(double time, Concept c)
          return the concept value of the individual belonging this UniversalLine, corresponding to the given time
 Individual getFirst()
           
 Individual getIndividual(java.lang.Double time)
           
 Individual getLast()
           
 Individual getLast(Individual ind)
          return last Individual, in time ordering, before given Individual or null if such Individual does not exist
 java.lang.String getName()
          give the Concept name
 Individual getNext(Individual ind)
          return next Individual, in time ordering, after given Individual or null if such Individual does not exist
 Individual getMySelf()
           
 java.util.TreeMap<java.lang.Double,Individual> getTimeMap()
           
 java.util.TreeSet<java.lang.Double> getTimeSet()
           
 UniversalLine getWithoutLast()
          return a new UniversalLine identical to the present except that the last Individual is missing
 Individual lastMax(Concept a)
           
 void print()
          print a String representation for this Concept, with all Event Individuals and values
 void setName(java.lang.String name)
          set the Concept name
 void setProxy()
           
 void setTime(java.lang.Double d, Individual i)
           
 void setTimeMap(java.util.TreeMap<java.lang.Double,Individual> timeMap)
           
 java.lang.String toString()
           
 
Methods inherited from class reasoner.Concept
add, always, card, card, containsIndivName, containsKey, containsUlKey, get, getA1, getAlwaysMap, getKb, getKeys, getLambda, getMap, getNextConcept, getNOW, getR, getSELF, getSometimeMap, getTempKeys, getTemporalLambda, getULineMap, interpole, intersection, printUlines, setA1, setAlwaysMap, setKb, setMap, setNOW, setR, setSELF, setSometimeMap, 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

timeMap

private java.util.TreeMap<java.lang.Double,Individual> timeMap
Constructor Detail

UniversalLine

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

eval

public double eval(Concept a)
gets the maximum value gained by this UniversalLine on a given Concept

Parameters:
a -
Returns:

getFirst

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

getLast

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

getNext

public Individual getNext(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,
                  Concept c)
return the concept value of the individual belonging this UniversalLine, corresponding to the given time

Parameters:
time -
c -
Returns:

getLast

public Individual getLast(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 UniversalLine getWithoutLast()
return a new UniversalLine identical to the present except that the last Individual is missing

Returns:

firstMax

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

Parameters:
a - the Concept
Returns:

lastMax

public Individual lastMax(Concept a)

print

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

Overrides:
print in class Concept

toString

public java.lang.String toString()
Overrides:
toString in class 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,
                Individual i)

getTimeSet

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

getName

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

Overrides:
getName in class Concept
Returns:
the name

setName

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

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

getTimeMap

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

setTimeMap

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

setTime

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

getIndividual

public Individual getIndividual(java.lang.Double time)

compareTo

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

getMySelf

public Individual getMySelf()