edu::tum::cs::srl::bayesnets::RelationalNode Class Reference

Inheritance diagram for edu::tum::cs::srl::bayesnets::RelationalNode:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Aggregator { FunctionalOr = (true, "=OR"), NoisyOr = (false, "OR"), Average = (false, "AVG") }

Public Member Functions

String getCleanName ()
Vector< HashMap< String, String > > getConstantAssignments ()
Discrete getDomain ()
RelationalNode getFreeParamGroundingParent () throws Exception
String getFunctionName ()
Vector< Integer > getIndicesOfConstantParams ()
String getName ()
RelationalBeliefNetwork getNetwork ()
int getNodeIndex ()
HashMap< String, String > getParameterBinding (String[] actualParams, Database db) throws Exception
ParentGrounder getParentGrounder () throws Exception
Vector< RelationalNodegetParents ()
Vector< RelationalNodegetPreconditionParents ()
Vector< RelationalNodegetRelationalParents ()
Signature getSignature ()
String getValueInDB (String[] actualParams, Database db, boolean closedWorld) throws Exception
String getVariableName (String[] actualParams) throws Exception
boolean hasAggregator ()
boolean hasCPT ()
boolean hasParam (String param)
boolean hasParams (String[] params)
boolean isBoolean ()
boolean isBuiltInPred ()
boolean isFragment ()
boolean isRelation ()
 RelationalNode (RelationalBeliefNetwork bn, BeliefNode node) throws Exception
void setLabel ()
String toAtom () throws Exception
Formula toFormula (Map< String, String > constantValues) throws Exception
Formula toLiteral (int domIdx, Map< String, String > constantValues)
String toLiteralString (int setting, HashMap< String, String > constantValues)
String toString ()

Static Public Member Functions

static String extractFunctionName (String varName)
static boolean isConstant (String identifier)
static Pair< String, String[]> parse (String variable)

Public Attributes

String[] addParams
Aggregator aggregator
boolean isAuxiliary
boolean isConstant
boolean isPrecondition
boolean isUnobserved
String[] params
String parentMode

Static Public Attributes

static final String BUILTINPRED_EQUALS = "EQ"
static final String BUILTINPRED_NEQUALS = "NEQ"

Protected Member Functions

void collectConstantAssignments (RelationalNode[] constNodes, int i, String[] assignment, Vector< HashMap< String, String >> assignments)

Protected Attributes

String functionName
Vector< Integer > indicesOfConstantArgs = null
ParentGrounder parentGrounder = null

Detailed Description

Definition at line 26 of file RelationalNode.java.


Member Enumeration Documentation

Enumerator:
FunctionalOr 
NoisyOr 
Average 

Definition at line 58 of file RelationalNode.java.


Constructor & Destructor Documentation

edu::tum::cs::srl::bayesnets::RelationalNode::RelationalNode ( RelationalBeliefNetwork  bn,
BeliefNode  node 
) throws Exception [inline]

Definition at line 116 of file RelationalNode.java.


Member Function Documentation

void edu::tum::cs::srl::bayesnets::RelationalNode::collectConstantAssignments ( RelationalNode[]  constNodes,
int  i,
String[]  assignment,
Vector< HashMap< String, String >>  assignments 
) [inline, protected]

Definition at line 507 of file RelationalNode.java.

static String edu::tum::cs::srl::bayesnets::RelationalNode::extractFunctionName ( String  varName  )  [inline, static]

extracts the node name (function/predicate name) from a variable name (which contains arguments)

Parameters:
varName 
Returns:

Definition at line 93 of file RelationalNode.java.

String edu::tum::cs::srl::bayesnets::RelationalNode::getCleanName (  )  [inline]

gets the clean name of this node (the label without prefixes or suffixes), i.e. only the predicate and its parameters

Returns:

Definition at line 207 of file RelationalNode.java.

Vector<HashMap<String,String> > edu::tum::cs::srl::bayesnets::RelationalNode::getConstantAssignments (  )  [inline]

gets a collection of possible constant assignments (i.e. assignments to parents of this node that are constant nodes)

Returns:
a vector of mappings from constant name to value

Definition at line 490 of file RelationalNode.java.

Discrete edu::tum::cs::srl::bayesnets::RelationalNode::getDomain (  )  [inline]

Definition at line 448 of file RelationalNode.java.

RelationalNode edu::tum::cs::srl::bayesnets::RelationalNode::getFreeParamGroundingParent (  )  throws Exception [inline]

gets the node (which must be a relation) that grounds the free parameters of this node (applicable only to nodes that have free parameters)

Returns:
Exceptions:
Exception 

Definition at line 408 of file RelationalNode.java.

String edu::tum::cs::srl::bayesnets::RelationalNode::getFunctionName (  )  [inline]

gets the name of the function/predicate that this node corresponds to

Returns:

Definition at line 228 of file RelationalNode.java.

Vector<Integer> edu::tum::cs::srl::bayesnets::RelationalNode::getIndicesOfConstantParams (  )  [inline]

gets the (ordered) vector of indices of parameters that correspond to constants (i.e. are grounded by a constant node)

Returns:

Definition at line 535 of file RelationalNode.java.

String edu::tum::cs::srl::bayesnets::RelationalNode::getName (  )  [inline]

gets the full name/label of this node

Returns:

Definition at line 191 of file RelationalNode.java.

RelationalBeliefNetwork edu::tum::cs::srl::bayesnets::RelationalNode::getNetwork (  )  [inline]

gets the network this node belongs to

Definition at line 329 of file RelationalNode.java.

int edu::tum::cs::srl::bayesnets::RelationalNode::getNodeIndex (  )  [inline]

gets the index of the corresponding belief node in the RBN

Returns:

Definition at line 199 of file RelationalNode.java.

HashMap<String,String> edu::tum::cs::srl::bayesnets::RelationalNode::getParameterBinding ( String[]  actualParams,
Database  db 
) throws Exception [inline]

gets a complete parameter binding (including functionally determined parameters needed in paretns) for a given vector of actual parameters for this node

Parameters:
actualParams 
db an evidence database (containing, e.g. the evidence predicates for functional lookups)
Returns:
Exceptions:
Exception 

Definition at line 563 of file RelationalNode.java.

ParentGrounder edu::tum::cs::srl::bayesnets::RelationalNode::getParentGrounder (  )  throws Exception [inline]

Definition at line 550 of file RelationalNode.java.

Vector<RelationalNode> edu::tum::cs::srl::bayesnets::RelationalNode::getParents (  )  [inline]

Definition at line 375 of file RelationalNode.java.

Vector<RelationalNode> edu::tum::cs::srl::bayesnets::RelationalNode::getPreconditionParents (  )  [inline]

Definition at line 567 of file RelationalNode.java.

Vector<RelationalNode> edu::tum::cs::srl::bayesnets::RelationalNode::getRelationalParents (  )  [inline]

gets all the parents of this node that are instances of RelationalNode

Returns:

Definition at line 527 of file RelationalNode.java.

Signature edu::tum::cs::srl::bayesnets::RelationalNode::getSignature (  )  [inline]

retrieves this node's signature

Returns:

Definition at line 351 of file RelationalNode.java.

String edu::tum::cs::srl::bayesnets::RelationalNode::getValueInDB ( String[]  actualParams,
Database  db,
boolean  closedWorld 
) throws Exception [inline]

gets the value of this node for a specific setting of its parameters given a specific database

Parameters:
paramSets 
db 
Returns:
Exceptions:
Exception 

Definition at line 459 of file RelationalNode.java.

String edu::tum::cs::srl::bayesnets::RelationalNode::getVariableName ( String[]  actualParams  )  throws Exception [inline]

gets the name of the variable (grounded node) that results when applying the given actual parameters to this node

Parameters:
actualParams 
Returns:
Exceptions:
Exception 

Definition at line 369 of file RelationalNode.java.

boolean edu::tum::cs::srl::bayesnets::RelationalNode::hasAggregator (  )  [inline]
Returns:
true iff this node has a combination function (i.e. an aggregator) assigned to it

Definition at line 343 of file RelationalNode.java.

boolean edu::tum::cs::srl::bayesnets::RelationalNode::hasCPT (  )  [inline]
Returns:
true if the node has a conditional probability distribution given as a CPT

Definition at line 336 of file RelationalNode.java.

boolean edu::tum::cs::srl::bayesnets::RelationalNode::hasParam ( String  param  )  [inline]

Definition at line 396 of file RelationalNode.java.

boolean edu::tum::cs::srl::bayesnets::RelationalNode::hasParams ( String[]  params  )  [inline]
Parameters:
params 
Returns:
true if the node has all of the given parameters

Definition at line 384 of file RelationalNode.java.

boolean edu::tum::cs::srl::bayesnets::RelationalNode::isBoolean (  )  [inline]
Returns:
true if the node node is boolean, i.e. it has a boolean domain

Definition at line 216 of file RelationalNode.java.

boolean edu::tum::cs::srl::bayesnets::RelationalNode::isBuiltInPred (  )  [inline]

Definition at line 482 of file RelationalNode.java.

static boolean edu::tum::cs::srl::bayesnets::RelationalNode::isConstant ( String  identifier  )  [inline, static]
Returns:
true if the given identifier is a constant name, false otherwise
Parameters:
identifier 

Definition at line 112 of file RelationalNode.java.

boolean edu::tum::cs::srl::bayesnets::RelationalNode::isFragment (  )  [inline]

determines whether this node corresponds to a fragment variable

Returns:
true if the node corresponds to a fragment

Definition at line 176 of file RelationalNode.java.

boolean edu::tum::cs::srl::bayesnets::RelationalNode::isRelation (  )  [inline]
Returns:
true if the node represents a relation between two or more objects

Definition at line 358 of file RelationalNode.java.

static Pair<String, String[]> edu::tum::cs::srl::bayesnets::RelationalNode::parse ( String  variable  )  [inline, static]

Definition at line 100 of file RelationalNode.java.

void edu::tum::cs::srl::bayesnets::RelationalNode::setLabel (  )  [inline]

changes the node label to reflect the internal status of this node

Definition at line 434 of file RelationalNode.java.

String edu::tum::cs::srl::bayesnets::RelationalNode::toAtom (  )  throws Exception [inline]
Deprecated:
use toLiteralString
Returns:
Exceptions:
Exception 

Definition at line 425 of file RelationalNode.java.

Formula edu::tum::cs::srl::bayesnets::RelationalNode::toFormula ( Map< String, String >  constantValues  )  throws Exception [inline]

returns a logical representation of the semantics of this node (only applicable to nodes with aggregators!)

Parameters:
constantValues a mapping of constant parents of this node to values (may be null)
Returns:
a formula that corresponds to the semantics of this node or null if no translation could be made
Exceptions:
Exception 

Definition at line 278 of file RelationalNode.java.

Formula edu::tum::cs::srl::bayesnets::RelationalNode::toLiteral ( int  domIdx,
Map< String, String >  constantValues 
) [inline]

generates a logical representation of what it means to set this node to the given domain index

Parameters:
domIdx 
constantValues 
Returns:
a logical formula (e.g. literal or (negated) equality statement)

Definition at line 298 of file RelationalNode.java.

String edu::tum::cs::srl::bayesnets::RelationalNode::toLiteralString ( int  setting,
HashMap< String, String >  constantValues 
) [inline]

generates a textual representation of the logical literal that this node represents for a certain assignment (and, optionally, substitutions of its parameters)

Parameters:
setting the value this node is set to given by an index into the node's domain
constantValues mapping of this node's arguments to constants; any subset/superset of arguments may be mapped; may be null
Returns:

Definition at line 238 of file RelationalNode.java.

String edu::tum::cs::srl::bayesnets::RelationalNode::toString (  )  [inline]
Returns:
the full name/label of this node

Definition at line 183 of file RelationalNode.java.


Member Data Documentation

additional parameters that are free in some parents, necessitating the use of an aggregator

Definition at line 38 of file RelationalNode.java.

specification of an aggregation to handle a variable number of parent sets

Definition at line 43 of file RelationalNode.java.

Definition at line 55 of file RelationalNode.java.

Definition at line 56 of file RelationalNode.java.

the function/predicate name this node is concerned with (without any arguments)

Definition at line 30 of file RelationalNode.java.

Definition at line 48 of file RelationalNode.java.

Definition at line 39 of file RelationalNode.java.

Definition at line 39 of file RelationalNode.java.

Definition at line 39 of file RelationalNode.java.

Definition at line 39 of file RelationalNode.java.

the list of node parameters

Definition at line 34 of file RelationalNode.java.

a parent grounder used to instantiate variables (which is created on demand)

Definition at line 53 of file RelationalNode.java.

an additional parameterization of the aggregation method

Definition at line 47 of file RelationalNode.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations


srldb
Author(s): Dominik Jain, Stefan Waldherr, Moritz Tenorth
autogenerated on Fri Jan 11 09:58:43 2013