|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdata.ProbSystemHash
public class ProbSystemHash
ProbSystem Hash
This class represents a probabilistic system constructed using hash table structures. A probabilistic system must respect the following constraints :Copyright(c) 2005 Université Laval, LSFM research group.
Constructor Summary | |
---|---|
ProbSystemHash(double initialState,
IntervalList statesList,
int nbAct)
Initialize a new system from its starting state and its state space |
Method Summary | |
---|---|
void |
addAction(java.lang.String action)
Adds the specified action to the action list. |
void |
addLabelToStates(java.util.HashMap map)
Associate several labels to states using an association table |
void |
addLabelToStates(java.lang.String ap,
IntervalList l)
Adds a label associated to certain states of the system. |
void |
addTransition(Transition t)
Adds a transition to the system and the associations if the transition is not already present in the system. |
void |
addTransition(Transition t,
boolean verify)
Adds a transition to the system and the associations if the transition is not already present in the system. |
java.util.HashMap |
computeProbabilities(IntervalList list,
java.lang.String act,
Variable v,
Parser p)
This function returns the intervals and their respective repartition function which are reachable using the states in the list of starting states using the action act. |
java.util.ArrayList |
getActions()
Returns all the action that can be applied in the system. |
java.util.TreeSet |
getAP()
Returns the atomic propositions set |
java.util.ArrayList |
getEnd()
Returns the ending state sets |
Interval[] |
getEndingStates(java.lang.String act,
Interval init)
Returns all the ending intervals that can be reached by the specified action from the specified starting interval. |
java.util.ArrayList |
getExp()
Returns the list of repartition functions |
double |
getInitialState()
Returns the initial state of the system |
Mtbdd |
getM()
Returns an integer associated with the CUDD manager used by this system. |
int |
getNbAction()
Returns the maximum number of actions in the system |
java.util.ArrayList |
getStart()
Returns the starting state set |
Interval[] |
getStartingStates(java.lang.String act)
Returns all the starting sets x from X for which the specified action may produce some result. |
IntervalList |
getStates()
Returns the entire state space of the system |
IntervalList |
getStatesForLabel(java.lang.String ap)
Returns the states set associated with the atomic proposition. |
int |
getTrans()
Returns an integer associated with the transition list in the CUDD library. |
Transition |
getTransition(java.lang.String act,
Interval init,
Interval end)
Returns the transition associated with the specified triplet. |
Transition[] |
getTransitions()
Returns all the transitions of the system into a simple array |
java.util.Vector |
getTransitionsVector()
Returns all the transitions of the system into a vector. |
void |
removeLabelFromStates(java.lang.String ap,
IntervalList l)
Dissociate an atomic proposition from the states |
void |
removeTransition(Transition t)
Removes the transition from the system |
void |
setInitialState(double newInitialState)
Modifies the initial state of the system |
void |
setStates(IntervalList newStateSpace)
Sets all the possible states of the system. |
java.lang.String |
toString()
Implements the serailzable method toString that returns a string representing the entire probabilistic system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProbSystemHash(double initialState, IntervalList statesList, int nbAct)
initialState
- the initial state of the systemstatesList
- the entire state spacenbAct
- maximum number of actionsMethod Detail |
---|
public int getNbAction()
getNbAction
in interface ProbSystem
public Mtbdd getM()
getM
in interface ProbSystem
public int getTrans()
getTrans
in interface ProbSystem
public java.util.ArrayList getExp()
getExp
in interface ProbSystem
public void addAction(java.lang.String action)
action
- the action to register.public void addTransition(Transition t) throws ProbSystemException
addTransition
in interface ProbSystem
t
- the transition to add.
ProbSystemException
- if one of the constraints has been violated.public void addTransition(Transition t, boolean verify) throws ProbSystemException
addTransition
in interface ProbSystem
t
- the transition to add.verify
- true if the system's integrity should be verified
ProbSystemException
- if one of the constraints has been violated.public void removeTransition(Transition t)
removeTransition
in interface ProbSystem
t
- the transition to removepublic IntervalList getStates()
getStates
in interface ProbSystem
public void setStates(IntervalList newStateSpace) throws java.lang.Exception
setStates
in interface ProbSystem
java.lang.Exception
- should the new state space be invalidpublic java.util.TreeSet getAP()
getAP
in interface ProbSystem
public void addLabelToStates(java.util.HashMap map) throws ProbSystemException
addLabelToStates
in interface ProbSystem
map
- an association table containg associations of label -> transitions
ProbSystemException
- should invalid associations be specifiedpublic void addLabelToStates(java.lang.String ap, IntervalList l) throws ProbSystemException
addLabelToStates
in interface ProbSystem
ap
- a label to add to the states. Must be a single word beginning with a lowercase letter.l
- the states to associate with the label
ProbSystemException
- if the label does not begin with a lowercase letterpublic void removeLabelFromStates(java.lang.String ap, IntervalList l)
removeLabelFromStates
in interface ProbSystem
ap
- the atomic proposition to dissociatel
- the states to be dissociatedpublic IntervalList getStatesForLabel(java.lang.String ap)
getStatesForLabel
in interface ProbSystem
ap
- the label to fetch the intervals from.
public java.util.ArrayList getStart()
getStart
in interface ProbSystem
public java.util.ArrayList getEnd()
getEnd
in interface ProbSystem
public java.util.ArrayList getActions()
getActions
in interface ProbSystem
public Interval[] getStartingStates(java.lang.String act)
act
- the action from which to list the starting state sets x
public Interval[] getEndingStates(java.lang.String act, Interval init)
act
- the action that must be appliedinit
- the starting interval from which the action is applied
public Transition getTransition(java.lang.String act, Interval init, Interval end)
act
- the action appliedinit
- the initial state set from with the action is applied.end
- the ending state set resulting from the applicaiton.
public Transition[] getTransitions()
getTransitions
in interface ProbSystem
public java.util.Vector getTransitionsVector()
getTransitionsVector
in interface ProbSystem
public java.lang.String toString()
toString
in interface ProbSystem
toString
in class java.lang.Object
public double getInitialState()
getInitialState
in interface ProbSystem
public void setInitialState(double newInitialState) throws java.lang.Exception
setInitialState
in interface ProbSystem
newInitialState
- the new initial state
java.lang.Exception
- if the initial state is invalidpublic java.util.HashMap computeProbabilities(IntervalList list, java.lang.String act, Variable v, Parser p)
computeProbabilities
in interface ProbSystem
list
- the starting interval listact
- the action to applyv
- the variable used during computationp
- an expression parser in order to determine the reachable states
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |