reasoner
Class Role

java.lang.Object
  extended by reasoner.Role
All Implemented Interfaces:
FuzzySet

public class Role
extends java.lang.Object
implements FuzzySet

Author:
marco a role as a fuzzy set note that this class may be used for describing concept as well

Field Summary
private  java.util.Map<java.lang.String,java.lang.Double> r
           
 
Constructor Summary
Role()
          construct an empty role
Role(java.util.TreeMap<java.lang.String,java.lang.Double> r)
           
 
Method Summary
 Role add(java.lang.String s, java.lang.Double d)
          add a point to this role
 java.lang.Integer card(java.lang.Double a)
          the cardinality of this role at an alfa level
 boolean containsKey(java.lang.Object key)
           
 Role diff(FuzzySet f)
           
 double get(java.lang.Object key)
           
 java.util.Set<java.lang.String> getKeys()
           
 java.util.TreeSet<java.lang.Double> getLambda()
          get the set of value to this role
 Role intersection(Concept c)
           
 Role intersection(FuzzySet f)
           
 void print()
           
 Role ratio(FuzzySet f)
           
 Role sum(FuzzySet f)
           
 java.util.TreeSet<java.lang.Double> totalLambda(Concept c)
          get the total set of value to this role together with a concept
 java.util.TreeSet<java.lang.Double> totalLambda(Role c)
          get the total set of value to this role together with a concept
 Role union(FuzzySet f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

r

private java.util.Map<java.lang.String,java.lang.Double> r
Constructor Detail

Role

public Role(java.util.TreeMap<java.lang.String,java.lang.Double> r)
Parameters:
r -

Role

public Role()
construct an empty role

Method Detail

add

public Role add(java.lang.String s,
                java.lang.Double d)
add a point to this role

Parameters:
s - the key
d - the value
Returns:
this role after adding point

card

public java.lang.Integer card(java.lang.Double a)
the cardinality of this role at an alfa level

Specified by:
card in interface FuzzySet
Parameters:
a - the alfa value
Returns:
the integer number cardinality of the alfa-set

totalLambda

public java.util.TreeSet<java.lang.Double> totalLambda(Concept c)
get the total set of value to this role together with a concept

Parameters:
c -
Returns:

totalLambda

public java.util.TreeSet<java.lang.Double> totalLambda(Role c)
get the total set of value to this role together with a concept

Parameters:
c -
Returns:

getLambda

public java.util.TreeSet<java.lang.Double> getLambda()
get the set of value to this role

Specified by:
getLambda in interface FuzzySet
Returns:

sum

public Role sum(FuzzySet f)
Parameters:
f -
Returns:
the sum with a FuzzySet

diff

public Role diff(FuzzySet f)
Parameters:
f -
Returns:
the difference with a FuzzySet

ratio

public Role ratio(FuzzySet f)
Parameters:
f -
Returns:
the ratio with a FuzzySet

intersection

public Role intersection(FuzzySet f)
Parameters:
f -
Returns:
the intersection with a FuzzySet

getKeys

public java.util.Set<java.lang.String> getKeys()
Returns:
the set of keys of this role as a TreeSet

containsKey

public boolean containsKey(java.lang.Object key)

intersection

public Role intersection(Concept c)
Parameters:
c - the concept
Returns:
a new role, intersection between this role and a concept

get

public double get(java.lang.Object key)

union

public Role union(FuzzySet f)
Parameters:
f -
Returns:
the union of FuzzySets

print

public void print()