public final class NodeDistributions extends AbstractMap<NodeDistributionKey,Distribution>
Node
. Temporal nodes may require more than one distribution to be fully specified.
In a Dynamic Bayesian Network (DBN) a node may require more than one distribution to be specified. This occurs when a temporal node has incoming links of order greater than zero. I.e. Has links from past time slices. For example, if a temporal node has an incoming link of order 1, then it will require a distribution at time t=0, and an additional distribution at t=1. This is because at time t=0 there is no previous time slice, but at time t=1 there is. For times greater than 1, in this example the distribution specified at time t=1 is still valid. However, if a new incoming link of order 12 was added, then an additional distribution would need to be specified at time t=12, valid for times t>=12.Modifier and Type  Class and Description 

static class 
NodeDistributions.DistributionOrder
Identifies a distribution and its temporal order.

AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type  Method and Description 

boolean 
canUpdate(NodeDistributionKey key)
Determines whether the distribution at the specified temporal order can be updated.

boolean 
canUpdate(NodeDistributionKey key,
NodeDistributionKind kind)
Determines whether the distribution at the specified temporal order can be updated.

Set<Map.Entry<NodeDistributionKey,Distribution>> 
entrySet() 
Distribution 
findForTime(int time)
Finds the temporal distribution that is suitable for the time specified.

Distribution 
findForTime(int time,
NodeDistributionKind kind)
Finds the temporal distribution that is suitable for the time specified.

NodeDistributions.DistributionOrder 
findForTimeWithOrder(int time)
Finds the temporal distribution that is suitable for the time specified.

NodeDistributions.DistributionOrder 
findForTimeWithOrder(int time,
NodeDistributionKind kind)
Finds the temporal distribution that is suitable for the time specified.

Distribution 
get(int temporalOrder)
Gets a distribution at a particular temporal order.

Distribution 
get(NodeDistributionKey key)
Gets a distribution with particular properties, such as temporal order.

Distribution 
get(NodeDistributionKey key,
NodeDistributionKind kind)
Gets a distribution with particular properties, such as temporal order.

Distribution 
get(NodeDistributionKind kind)
Gets a particular kind of distribution on the node.

Collection<NodeDistributionKey> 
getKeys()
Gets the collection of node distribution keys that require distributions.

int 
getMaxTemporalOrder()
Gets the current maximum temporal order.

Node 
getNode()
Gets the node that this instance belongs to.

void 
set(int temporalOrder,
Distribution value)
Sets a distribution at a particular temporal order.

void 
set(NodeDistributionKey key,
Distribution value)
Sets a distribution with particular properties, such as temporal order.

void 
set(NodeDistributionKey key,
NodeDistributionKind kind,
Distribution value)
Sets a distribution with particular properties, such as temporal order.

void 
set(NodeDistributionKind kind,
Distribution value)
Sets a particular kind of distribution on the node.

int 
size()
Gets the number of distributions in the container.

void 
validateDistribution(Distribution value,
NodeDistributionKey key)
Checks that a distribution is correctly specified for a particular temporal order.

void 
validateDistribution(Distribution value,
NodeDistributionKey key,
NodeDistributionKind kind)
Checks that a distribution is correctly specified for a particular temporal order.

clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, toString, values
public NodeDistributions.DistributionOrder findForTimeWithOrder(int time)
time
 The time.IllegalStateException
 Raised when an appropriate distribution could not be found.public Distribution findForTime(int time, NodeDistributionKind kind)
time
 The time.kind
 The kind of distribution to retrieve.IllegalStateException
 Raised when an appropriate distribution could not be found.public Distribution findForTime(int time)
time
 The time.IllegalStateException
 Raised when an appropriate distribution could not be found.public NodeDistributions.DistributionOrder findForTimeWithOrder(int time, NodeDistributionKind kind)
time
 The time.kind
 The kind of distribution to retrieve.IllegalStateException
 Raised when an appropriate distribution could not be found.public Node getNode()
public Collection<NodeDistributionKey> getKeys()
public int getMaxTemporalOrder()
public boolean canUpdate(NodeDistributionKey key)
key
 Properties identifying the distribution to check, such as temporal order/related node.true
if the distribution can be updated, false
otherwise.public boolean canUpdate(NodeDistributionKey key, NodeDistributionKind kind)
key
 Properties identifying the distribution to check, such as temporal order/related node.kind
 The kind of distribution to check.true
if the distribution can be updated, false
otherwise.public void validateDistribution(Distribution value, NodeDistributionKey key)
value
 The distribution to test.key
 The properties that identify a particular distribution such as temporal order/related node.public void validateDistribution(Distribution value, NodeDistributionKey key, NodeDistributionKind kind)
value
 The distribution to test.key
 The properties that identify a particular distribution such as temporal order/related node.kind
 The kind of distribution to validate.public Distribution get(int temporalOrder)
temporalOrder
 The required temporal order.IllegalArgumentException
 [temporalOrder] must be non negative.public void set(int temporalOrder, Distribution value)
temporalOrder
 The required temporal order.IllegalArgumentException
 [temporalOrder] must be non negative.public Distribution get(NodeDistributionKey key)
When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time 1 and 0.
For noisy nodes, multiple distributions are required, one for each parent and a leak distribution.
key
 The properties of the required distribution, such as temporal order.IllegalArgumentException
 Temporal order must be non negative.public void set(NodeDistributionKey key, Distribution value)
When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time 1 and 0.
For noisy nodes, multiple distributions are required, one for each parent and a leak distribution.
key
 The properties of the required distribution, such as temporal order.IllegalArgumentException
 Temporal order must be non negative.public Distribution get(NodeDistributionKind kind)
For temporal or noisy nodes, use the overload which accepts both a key and kind.
public void set(NodeDistributionKind kind, Distribution value)
For temporal or noisy nodes, use the overload which accepts both a key and kind.
public Distribution get(NodeDistributionKey key, NodeDistributionKind kind)
When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time 1 and 0.
For noisy nodes, multiple distributions are required, one for each parent and a leak distribution.
key
 The properties of the required distribution, such as temporal order.kind
 The kind of distribution we are getting or setting. This allows setting other distribution types than Probability, such as ExperienceIllegalArgumentException
 Temporal order must be non negative.public void set(NodeDistributionKey key, NodeDistributionKind kind, Distribution value)
When specifying temporal distributions, variables which belong to temporal nodes must have times associated. Each time must be specified relative to the current point in time which is defined as zero. E.g. to specify a distribution at time>=1 we would include variables at time 1 and 0.
For noisy nodes, multiple distributions are required, one for each parent and a leak distribution.
key
 The properties of the required distribution, such as temporal order.kind
 The kind of distribution we are getting or setting. This allows setting other distribution types than Probability, such as ExperienceIllegalArgumentException
 Temporal order must be non negative.public int size()
size
in interface Map<NodeDistributionKey,Distribution>
size
in class AbstractMap<NodeDistributionKey,Distribution>
public Set<Map.Entry<NodeDistributionKey,Distribution>> entrySet()
entrySet
in interface Map<NodeDistributionKey,Distribution>
entrySet
in class AbstractMap<NodeDistributionKey,Distribution>
Copyright © 2019. All rights reserved.