edu.ucla.belief
Interface FiniteVariable

All Superinterfaces:
Cloneable, Comparable, Variable
All Known Subinterfaces:
DSLNode, HuginNode, StandardNode
All Known Implementing Classes:
DSLNodeImpl, FiniteVariableImpl, HuginNodeImpl, StandardNodeImpl, XmlbifParser.BifNode

public interface FiniteVariable
extends Variable

A class for representing finite variables. It consists of a name as well as a list of possible values.


Method Summary
 boolean contains(Object instance)
           
 CPTShell getCPTShell()
           
 CPTShell getCPTShell(DSLNodeType type)
           
 DSLNodeType getDSLNodeType()
          moved from DSLNode 010905
 int grep(Filter filter, Collection results)
           
 int grep(Matcher matcher, boolean invert, Collection results)
           
 int grep(Pattern pattern, boolean invert, Collection results)
           
 int index(Object instance)
          Returns the index associated with the instance.
 boolean insert(int index, Object instance)
           
 Object instance(int index)
          Returns the instance associated with the index.
 Object instance(String name)
           
 List instances()
           
 Object remove(int index)
           
 Object set(int index, Object objNew)
           
 void setCPTShell(CPTShell shell)
          Deprecated.  
 void setCPTShell(DSLNodeType type, CPTShell shell)
           
 void setDSLNodeType(DSLNodeType newVal)
          moved from DSLNode 010905
 int size()
          Returns the number of possible values.
 
Methods inherited from interface Variable
clone, delete, getEnumProperties, getID, getProperty, getUserObject, setID, setProperty, setUserObject
 
Methods inherited from interface Comparable
compareTo
 

Method Detail

size

int size()
Returns the number of possible values.


instance

Object instance(int index)
Returns the instance associated with the index.


index

int index(Object instance)
Returns the index associated with the instance. Returns -1 if instance is not one of the values this variable can take on.


contains

boolean contains(Object instance)
Since:
121802

instance

Object instance(String name)
Specified by:
instance in interface Variable
Since:
100803

grep

int grep(Filter filter,
         Collection results)
Parameters:
results - accumulate matches
Returns:
count matched
Since:
20070419

grep

int grep(Pattern pattern,
         boolean invert,
         Collection results)
Parameters:
invert - invert the sense of the grep, i.e. accumulate non-matches
results - accumulate matches
Returns:
count matched
Since:
20070329

grep

int grep(Matcher matcher,
         boolean invert,
         Collection results)
Parameters:
invert - invert the sense of the grep, i.e. accumulate non-matches
results - accumulate matches
Returns:
count matched
Since:
20070329

instances

List instances()

set

Object set(int index,
           Object objNew)
Since:
101102

insert

boolean insert(int index,
               Object instance)

remove

Object remove(int index)

getDSLNodeType

DSLNodeType getDSLNodeType()
moved from DSLNode 010905

Since:
010905

setDSLNodeType

void setDSLNodeType(DSLNodeType newVal)
moved from DSLNode 010905

Since:
010905

getCPTShell

CPTShell getCPTShell()

setCPTShell

void setCPTShell(CPTShell shell)
Deprecated. 


getCPTShell

CPTShell getCPTShell(DSLNodeType type)

setCPTShell

void setCPTShell(DSLNodeType type,
                 CPTShell shell)


Copyright 2010 UCLA Automated Reasoning Group