|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectreasoner.Trapezoid
reasoner.Quantifier
public class Quantifier
This class represents a trapezoidal quantifier, with non negative values only
Field Summary | |
---|---|
protected KnowledgeBase |
kb
the KnowledgeBase |
protected double |
maxval
the max value |
protected double |
minval
the min value is set to 0.0 |
private java.lang.String |
name
the name |
private double |
NOW
the constant NOW |
private boolean |
relative
set to true if this Quantifier is relative, to false otherwise |
private double |
SELF
the constant SELF |
private static double |
v1
|
private static double |
v2
|
Fields inherited from class reasoner.Trapezoid |
---|
formatter, meaning, patternAround, patternBetween |
Constructor Summary | |
---|---|
Quantifier(java.lang.Double a1,
java.lang.Double b1,
java.lang.Double c1,
java.lang.Double d1,
java.lang.Double max,
KnowledgeBase kb)
Constructor by vertices, max and KnowledgeBase |
|
Quantifier(java.lang.String name,
java.lang.Double a1,
java.lang.Double b1,
java.lang.Double c1,
java.lang.Double d1,
java.lang.Double max,
KnowledgeBase kb)
Constructor by name, vertices, max and KnowledgeBase |
|
Quantifier(java.lang.String name,
KnowledgeBase kb)
Constructor by name and KnowledgeBase |
Method Summary | |
---|---|
Quantifier |
diff(Quantifier t)
Difference between this Quantifier and a second one. |
double |
eval(Role r,
Concept c)
Evaluates expression (Q)R.C = Q(R_intersection_C / R), with Q this relative Quantifier, R a Role and C a Concept. |
KnowledgeBase |
getKb()
|
java.util.TreeSet<java.lang.Double> |
getLambda()
Gives Lambda, the alpha level set for membership values |
double |
getMaxval()
|
double |
getMinval()
|
java.lang.String |
getName()
|
double |
getNOW()
|
double |
getSELF()
|
Quantifier |
intersection(FuzzySet f)
Intersection with a FuzzySet |
boolean |
isRelative()
|
void |
print()
Prints on the standard output a String representation for this Trapezoid |
void |
print(java.util.TreeSet<java.lang.Double> lambda2)
Prints Lambda, the alpha level set for membership values, as a TreeSet |
Quantifier |
prod(Quantifier t)
Product between this Quantifier and a second one. |
Quantifier |
ratio(Quantifier t)
Ratio between this Quantifier and a second one. |
void |
setKb(KnowledgeBase kb)
Sets the KnowledgeBase and constants NOW and SELF |
void |
setMaxval(double maxval)
|
void |
setMinval(double minval)
|
protected void |
setName()
Sets the name by the shape, for some cases |
void |
setName(java.lang.String name1)
|
void |
setNOW(double now)
|
void |
setRelative(boolean relative)
Sets the relative attribute. |
void |
setSELF(double self)
|
protected void |
setVertices(java.lang.Double a1,
java.lang.Double b1,
java.lang.Double c1,
java.lang.Double d1,
java.lang.Double max)
Sets vertices and max value. |
Quantifier |
sum(Quantifier t)
Sum between this Quantifier and a second one. |
java.lang.String |
toString()
return a String representation for this Trapezoid as a sequence of vertices |
Quantifier |
union(FuzzySet f)
Union with a FuzzySet |
Methods inherited from class reasoner.Trapezoid |
---|
card, diff, fixVertices, geta, getAroundValue, getb, getBetweenValue, getc, getd, getKeys, getMeaning, getVertValues, prod, qvalue, ratio, seta, setb, setc, setd, setMeaning, setMeaning, setVertices, sum |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String name
private static double v1
private static double v2
protected double maxval
protected double minval
protected KnowledgeBase kb
private double SELF
private double NOW
private boolean relative
Constructor Detail |
---|
public Quantifier(java.lang.Double a1, java.lang.Double b1, java.lang.Double c1, java.lang.Double d1, java.lang.Double max, KnowledgeBase kb)
a1
- first verticeb1
- second verticec1
- third verticed1
- forth verticemax
- the max valuekb
- the KnowledgeBasepublic Quantifier(java.lang.String name, java.lang.Double a1, java.lang.Double b1, java.lang.Double c1, java.lang.Double d1, java.lang.Double max, KnowledgeBase kb)
name
- the namea1
- first verticeb1
- second verticec1
- third verticed1
- forth verticemax
- the max valuekb
- the KnowledgeBasepublic Quantifier(java.lang.String name, KnowledgeBase kb)
name
- the namekb
- the KnowledgeBaseMethod Detail |
---|
public void setName(java.lang.String name1)
setName
in class Trapezoid
name1
- the name to setprotected void setName()
public java.lang.String getName()
getName
in class Trapezoid
protected void setVertices(java.lang.Double a1, java.lang.Double b1, java.lang.Double c1, java.lang.Double d1, java.lang.Double max)
a1
- first verticeb1
- second verticec1
- third verticed1
- forth verticemax
- the max valuepublic void print()
Trapezoid
print
in class Trapezoid
public java.lang.String toString()
Trapezoid
toString
in class Trapezoid
Object.toString()
public Quantifier sum(Quantifier t)
t
- the second Quantifier
public Quantifier diff(Quantifier t)
t
- the second Quantifier
public Quantifier prod(Quantifier t)
t
- the second Quantifier
public Quantifier ratio(Quantifier t)
t
- the second Quantifier
public Quantifier intersection(FuzzySet f)
Trapezoid
intersection
in class Trapezoid
f
- the FuzzySet
public Quantifier union(FuzzySet f)
Trapezoid
union
in class Trapezoid
f
- the FuzzySet
public double eval(Role r, Concept c)
r
- the Rolec
- the Concept
public void print(java.util.TreeSet<java.lang.Double> lambda2)
lambda2
- the Lambdapublic java.util.TreeSet<java.lang.Double> getLambda()
Trapezoid
getLambda
in interface FuzzySet
getLambda
in class Trapezoid
public boolean isRelative()
public void setRelative(boolean relative)
relative
- the relative to setpublic KnowledgeBase getKb()
public void setKb(KnowledgeBase kb)
kb
- the kb to setpublic double getMaxval()
getMaxval
in class Trapezoid
public void setMaxval(double maxval)
setMaxval
in class Trapezoid
maxval
- the maxval to setpublic double getMinval()
getMinval
in class Trapezoid
public void setMinval(double minval)
setMinval
in class Trapezoid
minval
- the minval to setpublic double getNOW()
public void setNOW(double now)
now
- the NOW to setpublic double getSELF()
public void setSELF(double self)
self
- the SELF to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |