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

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
NeuralEngine::MachineLearning::INode Class Referenceabstract

Base Class INode. More...

`#include <FgINode.h>`

Inheritance diagram for NeuralEngine::MachineLearning::INode:
[legend]
Collaboration diagram for NeuralEngine::MachineLearning::INode:
[legend]

## Public Member Functions
| INode (std::string name)
| Default constructor. More...
| ~INode ()
| Destructor. More...
std::string | Name ()
| Gets the name. More...
virtual void | SendMsg (std::string toNodeName)
| Sends a message. More...
virtual void | ReceiveMsg (std::string fromNodeName, IMessage &message)
| Receives a message. More...
virtual void | AddIncoming (INode *node)
| Adds ingoing connection to the node. More...
virtual void | AddOutgoing (INode *node)
| Adds outgoing connection to the node. More...
virtual void | AddConnection (INode *node, const std::string &tag)
| Adds a custom connection with the given tag. More...
virtual bool | IsSupported (MsgType type)=0
| Query if message type is supported. More...
const MsgBox & | GetAllMessages () const
| Gets all the messages of this node. More...
void | ClearMessages ()
| Clears all incomming messages for next iteration. More...

## Protected Member Functions
void | SetMessage (std::string fromNodeName, IMessage &msg)
| Sets a incomming message from specific node. More...
virtual IMessage | ComputeMessage (std::string fromNodeName, MsgBox &neededMessages)=0
| Virtual function to calculate a message to connectd node. More...

## Protected Attributes
std::map< std::string, INode * > | mNodes
MsgBox | mMessageBox
std::set< std::string > | sIncomming
std::set< std::string > | sOutgoing
std::map< std::string, std::string > | mConnections

## Private Member Functions
template<class Archive >
void | serialize (Archive &ar, unsigned int version)

## Private Attributes
std::string | sName

## Friends
class | boost::serialization::access

## Detailed Description

Base Class INode.

Basic functionalities of a Node in a Factor Graph.

Admin, 7/24/2017.

Definition at line 33 of file FgINode.h.

## Constructor & Destructor Documentation

## ◆ INode()

NeuralEngine::MachineLearning::INode::INode | ( | std::string | name | ) |

Default constructor.

Admin, 7/24/2017.

## ◆ ~INode()

NeuralEngine::MachineLearning::INode::~INode | ( |  | ) |

Destructor.

Admin, 7/24/2017.

## Member Function Documentation

## ◆ Name()

std::string NeuralEngine::MachineLearning::INode::Name | ( |  | ) |

Gets the name.

Hmetal T, 11.08.2017.

Returns
  A std::string.

## ◆ SendMsg()

virtual void NeuralEngine::MachineLearning::INode::SendMsg | ( | std::string | toNodeName | ) |
| virtual

Sends a message.

Admin, 7/24/2017.

Parameters

  toNodeID | Identifier to which node should be the message send.

## ◆ ReceiveMsg()

virtual void NeuralEngine::MachineLearning::INode::ReceiveMsg | ( | std::string | fromNodeName,
|  | IMessage & | message
| ) |  |
| virtual

Receives a message.

Admin, 7/24/2017.

Parameters

  fromNodeID | Identifier for from which node the message comes from.
  message | [in,out] The message.

## ◆ AddIncoming()

virtual void NeuralEngine::MachineLearning::INode::AddIncoming | ( | INode * | node | ) |
| virtual

Adds ingoing connection to the node.

Admin, 7/25/2017.

Parameters

  node | [in,out] If non-null, the node.

## ◆ AddOutgoing()

virtual void NeuralEngine::MachineLearning::INode::AddOutgoing | ( | INode * | node | ) |
| virtual

Adds outgoing connection to the node.

Admin, 7/25/2017.

Parameters

  node | [in,out] If non-null, the node.

## ◆ AddConnection()

virtual void NeuralEngine::MachineLearning::INode::AddConnection | ( | INode * | node,
|  | const std::string & | tag
| ) |  |
| virtual

Adds a custom connection with the given tag.

Admin, 7/25/2017.

Parameters

  node | [in,out] If non-null, the node.
  tag | The tag.

## ◆ IsSupported()

virtual bool NeuralEngine::MachineLearning::INode::IsSupported | ( | MsgType | type | ) |
| pure virtual

Query if message type is supported.

Admin, 7/25/2017.

Parameters

  type | The type.

Returns
  true if supported, false if not.

Implemented in NeuralEngine::MachineLearning::DiscreteFactorNode, NeuralEngine::MachineLearning::DiscreteVariableNode, NeuralEngine::MachineLearning::IFactorNode, and NeuralEngine::MachineLearning::IVariableNode.

## ◆ GetAllMessages()

const MsgBox & NeuralEngine::MachineLearning::INode::GetAllMessages | ( |  | ) | const

Gets all the messages of this node.

Admin, 7/25/2017.

Returns
  A reference to a const MsgBox.

## ◆ ClearMessages()

void NeuralEngine::MachineLearning::INode::ClearMessages | ( |  | ) |

Clears all incomming messages for next iteration.

Admin, 7/26/2017.

## ◆ SetMessage()

void NeuralEngine::MachineLearning::INode::SetMessage | ( | std::string | fromNodeName,
|  | IMessage & | msg
| ) |  |
| protected

Sets a incomming message from specific node.

Admin, 7/25/2017.

Parameters

  fromNodeID | Identifier for from node.
  msg | The message.

## ◆ ComputeMessage()

virtual IMessage NeuralEngine::MachineLearning::INode::ComputeMessage | ( | std::string | fromNodeName,
|  | MsgBox & | neededMessages
| ) |  |
| protected pure virtual

Virtual function to calculate a message to connectd node.

Different computations for all kinds of derived classes of node types.

Admin, 7/26/2017.

Parameters

  toNodeName | Identifier for receiver node.
  neededMessages | All incomming messages, exept from receiver node.

Returns
  The calculated message.

Implemented in NeuralEngine::MachineLearning::DiscreteFactorNode, NeuralEngine::MachineLearning::DiscreteVariableNode, NeuralEngine::MachineLearning::IFactorNode, and NeuralEngine::MachineLearning::IVariableNode.

## ◆ serialize()

template<class Archive >

void NeuralEngine::MachineLearning::INode::serialize | ( | Archive & | ar,
|  | unsigned int | version
| ) |  |
| inline private

Definition at line 239 of file FgINode.h.

## Friends And Related Function Documentation

## ◆ boost::serialization::access

friend class boost::serialization::access
| friend

Definition at line 236 of file FgINode.h.

## Member Data Documentation

## ◆ mNodes

std::map<std::string, INode*> NeuralEngine::MachineLearning::INode::mNodes
| protected

Definition at line 228 of file FgINode.h.

## ◆ mMessageBox

MsgBox NeuralEngine::MachineLearning::INode::mMessageBox
| protected

Definition at line 229 of file FgINode.h.

## ◆ sIncomming

std::set<std::string> NeuralEngine::MachineLearning::INode::sIncomming
| protected

Definition at line 230 of file FgINode.h.

## ◆ sOutgoing

std::set<std::string> NeuralEngine::MachineLearning::INode::sOutgoing
| protected

Definition at line 231 of file FgINode.h.

## ◆ mConnections

std::map<std::string, std::string> NeuralEngine::MachineLearning::INode::mConnections
| protected

Definition at line 233 of file FgINode.h.

## ◆ sName

std::string NeuralEngine::MachineLearning::INode::sName
| private

Definition at line 249 of file FgINode.h.

The documentation for this class was generated from the following file:

- FgINode.h