it.unibo.cs.belief
Class TreeBeliefFunction

java.lang.Object
  extended by it.unibo.cs.belief.TreeBeliefFunction
All Implemented Interfaces:
BeliefFunction

public class TreeBeliefFunction
extends java.lang.Object
implements BeliefFunction

An efficient implementation of a belief function based on a tree map.

Version:
0.1
Author:
Matteo Magnani

Field Summary
private  Proposition core
           
private  Frame frame
           
private  java.util.TreeMap sets
           
 
Constructor Summary
TreeBeliefFunction(Frame frame)
           
 
Method Summary
 void addBelief(Proposition prop, double mass)
          Increases the belief in a proposition by a specified value.
 double getBelief(Proposition prop)
          Finds the belief assigned to a proposition so far.
 CommonalityFunction toCommonalityFunction()
          Produces the commonality function corresponding to this belief function.
 MassPotential toMassPotential()
          Produces a mass potential corresponding to this belief function.
 PlausibilityFunction toPlausibilityFunction()
          Produces the plausibility function corresponding to this belief function.
 java.lang.String toString()
          Produces a string representation of this belief function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

frame

private Frame frame

core

private Proposition core

sets

private java.util.TreeMap sets
Constructor Detail

TreeBeliefFunction

public TreeBeliefFunction(Frame frame)
Method Detail

addBelief

public void addBelief(Proposition prop,
                      double mass)
Description copied from interface: BeliefFunction
Increases the belief in a proposition by a specified value. This method may lead to functions that do not represent degrees of beliefs. Therefore, it should not be used by classes outside the package, except if you know what you are doing.

Specified by:
addBelief in interface BeliefFunction
Parameters:
prop - the proposition to which the belief is assigned
mass - the belief assigned to the proposition

getBelief

public double getBelief(Proposition prop)
Description copied from interface: BeliefFunction
Finds the belief assigned to a proposition so far.

Specified by:
getBelief in interface BeliefFunction
Parameters:
prop - the proposition we want to check
Returns:
a degree of belief

toMassPotential

public MassPotential toMassPotential()
Description copied from interface: BeliefFunction
Produces a mass potential corresponding to this belief function. In particular, this mass potential is (approximately) a mass function.

Specified by:
toMassPotential in interface BeliefFunction
Returns:
a mass potential

toPlausibilityFunction

public PlausibilityFunction toPlausibilityFunction()
Description copied from interface: BeliefFunction
Produces the plausibility function corresponding to this belief function.

Specified by:
toPlausibilityFunction in interface BeliefFunction
Returns:
a plausibility function

toCommonalityFunction

public CommonalityFunction toCommonalityFunction()
Description copied from interface: BeliefFunction
Produces the commonality function corresponding to this belief function.

Specified by:
toCommonalityFunction in interface BeliefFunction
Returns:
a commonality function

toString

public java.lang.String toString()
Produces a string representation of this belief function.

Overrides:
toString in class java.lang.Object
Returns:
a list of all subsets of the frame corresponding to this belief function, with their numerical degrees of belief