BayesVariable class

A variable in the BayesianNetwork graph.

Inheritance
Implemented types

Constructors

BayesVariable(String name, BayesianNetwork network, {List<String>? values, List<String>? parents, List<String>? probabilities, double? unseenMinimalProbability})

Properties

allRootChains List<List<BayesVariable>>
Returns all the chains until the root.
no setter
ancestors Set<BayesVariable>
Returns the ancestors BayesVariable nodes of this node.
no setteroverride
conditionVariables Iterable<BayesVariable>
no setterinherited
descendants Set<BayesVariable>
no setteroverride
domain Map<String, BayesValue>
The domain values of this node.
no setter
hashCode int
The hash code for this object.
no setteroverride
isFrozen bool
no setterinherited
isRoot bool
no setteroverride
isValid bool
Returns true if this instance is valid.
no setterinherited
name String
The name of the variable.
final
nameNoPhase String
final
network BayesianNetwork
The network of this element.
finalinherited
parents List<BayesVariable>
no setteroverride
parentsLength int
no setter
probabilities Map<BayesCondition, double>
The probability table of this node.
no setterinherited
rootChain List<BayesVariable>
Returns the smallest chain until the root.
no setteroverride
rootNodes List<BayesVariable>
Returns the root nodes of this node.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable<BayesValue>
no setteroverride
variables List<BayesVariable>
latefinal
variablesAsString String
no setteroverride

Methods

checkNotFrozen() → void
inherited
checkValid() → void
Checks if this instance is valid.
inherited
compareTo(BayesVariable other) int
Compares this object to another object.
override
containsNode(BayesVariable node) bool
freeze() bool
inherited
getProbability(String condition) double?
Returns a probability for condition in the probabilities table.
inherited
getValue(String name) BayesValue?
Returns a value with name in this node.
getValueName({String? name, BayesValueSignal? signal}) String?
Returns the name of a value in this node with name or signal.
nodeChain(BayesVariable node) List<BayesVariable>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseEvent(String line) BayesEvent
inherited
rootChains(List<BayesVariable> rootNodes) List<List<BayesVariable>>
Returns all the chains until the rootNodes.
toJson() Map<String, Object>
override
toString() String
A string representation of this object.
override
toStringProbabilities(String mainVariable) String
inherited
validate() Object?
Validates the instance. Returns the invalid Object or null when valid.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

resolveName(String name, {required NetworkCache? networkCache}) String
resolveNameNoPhase(String name, {required NetworkCache? networkCache}) String