NeuralEngine A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes. |

FgDiscreteVariableNode.h
1
11#pragma once
12
13#include <MachineLearning/FgIVariableNode.h>
14#include <MachineLearning/CommonUtil.h>
15
16 namespace NeuralEngine
17{
18 namespace MachineLearning
19 {
29 class NE_IMPEXP DiscreteVariableNode : public IVariableNode
30 {
31 public:
32
42 DiscreteVariableNode(std::string name, int numStates);
43
49 ~DiscreteVariableNode();
50
60 virtual bool IsSupported(MsgType type);
61
69 bool IsLeafNode();
70
80 virtual af::array& Marginal(MsgBox& neededMessages);
81
82 protected:
93 virtual IMessage ComputeMessage(std::string toNodeName, MsgBox& neededMessages);
94
95 private:
96 friend class boost::serialization::access;
97
98 template<class Archive>
99 void serialize(Archive& ar, unsigned int version)
100 {
101 ar & boost::serialization::base_object<IVariableNode>(*this);
102 }
103 };
104 }
105}
NeuralEngine::MachineLearning::DiscreteVariableNode
Class Discrete Variable Node.
Definition: FgDiscreteVariableNode.h:30
NeuralEngine::MachineLearning::DiscreteVariableNode::DiscreteVariableNode
DiscreteVariableNode(std::string name, int numStates)
Constructor.
NeuralEngine::MachineLearning::DiscreteVariableNode::Marginal
virtual af::array & Marginal(MsgBox &neededMessages)
Marginal propability of the node.
NeuralEngine::MachineLearning::DiscreteVariableNode::IsSupported
virtual bool IsSupported(MsgType type)
Query if message type is supported.
NeuralEngine::MachineLearning::DiscreteVariableNode::~DiscreteVariableNode
~DiscreteVariableNode()
Destructor.
NeuralEngine::MachineLearning::DiscreteVariableNode::IsLeafNode
bool IsLeafNode()
Query if this object is leaf node.
NeuralEngine::MachineLearning::DiscreteVariableNode::ComputeMessage
virtual IMessage ComputeMessage(std::string toNodeName, MsgBox &neededMessages)
Custom message computation for specific node.
NeuralEngine::MachineLearning::IMessage
Definition: FgIMessage.h:27
NeuralEngine::MachineLearning::IVariableNode
Definition: FgIVariableNode.h:21
NeuralEngine
Definition: NeArray2.h:18