edu.ucla.belief.decision
Class DecisionNodeAbstract
Object
DecisionNodeAbstract
- All Implemented Interfaces:
- DecisionNode, Cloneable
- Direct Known Subclasses:
- DecisionInternal, DecisionLeaf
public class DecisionNodeAbstract
- extends Object
- implements DecisionNode
- Since:
- 120804
- Author:
- Keith Cascio
Method Summary |
void |
addListener(DecisionListener listener)
|
Object |
clone()
|
DecisionNode |
deepClone(Factory factory)
|
DecisionBackup |
deflate()
|
DecisionBackup |
deflate(Map alreadydeflated)
|
void |
deracinate()
|
int |
equivalenceHashCode()
|
boolean |
equivales(DecisionNode node)
|
static void |
findAllNotRootedAt(DecisionNode root,
Set setnotrooted,
Set setrooted)
|
void |
findAncestorsNotRootedAt(DecisionNode root,
Set setnotrooted,
Set setrooted)
|
Set |
getAncestors(Set container,
Classifier classifier)
|
Set |
getChildDecisionNodes()
|
Set |
getDescendants(Set container,
Classifier classifier)
|
Set |
getLeaves(Set container)
|
DecisionNode |
getNext(int index)
|
DecisionNode |
getNext(Object value)
|
Set |
getOutcomes(Set container)
|
Parameter |
getParameter(int index)
|
Parameter |
getParameter(Object value)
|
Set |
getParents()
|
DecisionNodeAbstract |
getRoot()
|
FiniteVariable |
getVariable()
|
Map |
groupInstancesByOutcome(Map map)
|
boolean |
hasOutcome(Object outcome)
|
boolean |
insertParent(FiniteVariable var,
DecisionNode oldParent,
Factory factory)
|
boolean |
isDeeplyEquivalent(DecisionNode node,
double epsilon,
Map checked)
|
boolean |
isDescendant(DecisionNode node)
|
boolean |
isEditable()
|
boolean |
isLeaf()
|
int |
numOutcomes()
|
boolean |
removeChild(DecisionNode child)
|
boolean |
removeListener(DecisionListener listener)
|
void |
setEditable(boolean flag)
|
void |
setID(String id)
|
void |
setNext(int index,
DecisionNode next)
|
void |
setNext(Object value,
DecisionNode next)
|
static void |
severNonTreeNodes(DecisionNodeAbstract newroot)
|
String |
toString()
|
DecisionNodeAbstract
public DecisionNodeAbstract()
DecisionNodeAbstract
public DecisionNodeAbstract(DecisionNodeAbstract toCopy)
- Since:
- 011105
clone
public Object clone()
- Specified by:
clone
in interface DecisionNode
- Overrides:
clone
in class Object
- Since:
- 011105
deepClone
public DecisionNode deepClone(Factory factory)
- Specified by:
deepClone
in interface DecisionNode
- Since:
- 011105
setID
public void setID(String id)
- Specified by:
setID
in interface DecisionNode
toString
public String toString()
- Overrides:
toString
in class Object
isDeeplyEquivalent
public final boolean isDeeplyEquivalent(DecisionNode node,
double epsilon,
Map checked)
- Specified by:
isDeeplyEquivalent
in interface DecisionNode
- Since:
- 020205
equivales
public boolean equivales(DecisionNode node)
- Specified by:
equivales
in interface DecisionNode
- Since:
- 010905
equivalenceHashCode
public int equivalenceHashCode()
- Specified by:
equivalenceHashCode
in interface DecisionNode
- Since:
- 010905
deflate
public DecisionBackup deflate()
- Since:
- 011005
deflate
public DecisionBackup deflate(Map alreadydeflated)
- Since:
- 011005
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interface DecisionNode
getNext
public DecisionNode getNext(int index)
throws StateNotFoundException
- Specified by:
getNext
in interface DecisionNode
- Throws:
StateNotFoundException
getNext
public DecisionNode getNext(Object value)
throws StateNotFoundException
- Specified by:
getNext
in interface DecisionNode
- Throws:
StateNotFoundException
setNext
public void setNext(int index,
DecisionNode next)
throws StateNotFoundException
- Specified by:
setNext
in interface DecisionNode
- Throws:
StateNotFoundException
setNext
public void setNext(Object value,
DecisionNode next)
throws StateNotFoundException
- Specified by:
setNext
in interface DecisionNode
- Throws:
StateNotFoundException
removeChild
public boolean removeChild(DecisionNode child)
- Specified by:
removeChild
in interface DecisionNode
getParameter
public Parameter getParameter(int index)
- Specified by:
getParameter
in interface DecisionNode
getParameter
public Parameter getParameter(Object value)
throws StateNotFoundException
- Specified by:
getParameter
in interface DecisionNode
- Throws:
StateNotFoundException
getChildDecisionNodes
public Set getChildDecisionNodes()
- Specified by:
getChildDecisionNodes
in interface DecisionNode
getOutcomes
public Set getOutcomes(Set container)
- Specified by:
getOutcomes
in interface DecisionNode
numOutcomes
public int numOutcomes()
- Specified by:
numOutcomes
in interface DecisionNode
hasOutcome
public boolean hasOutcome(Object outcome)
- Specified by:
hasOutcome
in interface DecisionNode
getVariable
public FiniteVariable getVariable()
- Specified by:
getVariable
in interface DecisionNode
isEditable
public boolean isEditable()
- Specified by:
isEditable
in interface DecisionNode
setEditable
public void setEditable(boolean flag)
- Specified by:
setEditable
in interface DecisionNode
getLeaves
public Set getLeaves(Set container)
- Specified by:
getLeaves
in interface DecisionNode
getAncestors
public Set getAncestors(Set container,
Classifier classifier)
- Specified by:
getAncestors
in interface DecisionNode
getDescendants
public Set getDescendants(Set container,
Classifier classifier)
- Specified by:
getDescendants
in interface DecisionNode
isDescendant
public boolean isDescendant(DecisionNode node)
- Specified by:
isDescendant
in interface DecisionNode
groupInstancesByOutcome
public Map groupInstancesByOutcome(Map map)
- Specified by:
groupInstancesByOutcome
in interface DecisionNode
- Since:
- 020205
insertParent
public boolean insertParent(FiniteVariable var,
DecisionNode oldParent,
Factory factory)
- Specified by:
insertParent
in interface DecisionNode
getParents
public Set getParents()
- Specified by:
getParents
in interface DecisionNode
getRoot
public DecisionNodeAbstract getRoot()
deracinate
public void deracinate()
- Specified by:
deracinate
in interface DecisionNode
severNonTreeNodes
public static void severNonTreeNodes(DecisionNodeAbstract newroot)
findAllNotRootedAt
public static void findAllNotRootedAt(DecisionNode root,
Set setnotrooted,
Set setrooted)
findAncestorsNotRootedAt
public void findAncestorsNotRootedAt(DecisionNode root,
Set setnotrooted,
Set setrooted)
addListener
public void addListener(DecisionListener listener)
- Specified by:
addListener
in interface DecisionNode
removeListener
public boolean removeListener(DecisionListener listener)
- Specified by:
removeListener
in interface DecisionNode
Copyright 2010 UCLA Automated Reasoning Group