NeuralEngine
A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes.
NeuralEngine::MachineLearning::IFactorNode Class Referenceabstract
Inheritance diagram for NeuralEngine::MachineLearning::IFactorNode:
Collaboration diagram for NeuralEngine::MachineLearning::IFactorNode:

Public Member Functions

 IFactorNode (IVariableNode &node)
 Constructor. More...
 
 IFactorNode (IVariableNode &node, std::string name)
 Constructor. More...
 
template<class T >
 IFactorNode (std::vector< T * > nodes, std::string name)
 Constructor. More...
 
template<class T >
 IFactorNode (std::vector< T * > nodes)
 Constructor. More...
 
 ~IFactorNode ()
 Destructor. More...
 
virtual bool IsSupported (MsgType type)=0
 Query if message type is supported. More...
 
- Public Member Functions inherited from NeuralEngine::MachineLearning::INode
 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

virtual IMessage ComputeMessage (std::string toNodeName, MsgBox &neededMessages)=0
 Calculates a message to connectd node. More...
 
- Protected Member Functions inherited from NeuralEngine::MachineLearning::INode
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...
 

Private Member Functions

template<class T >
std::string CreateName (std::vector< T * > &nodes)
 Creates a name for the node, if no name is given. More...
 
template<class Archive >
void serialize (Archive &ar, unsigned int version)
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Attributes inherited from NeuralEngine::MachineLearning::INode
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
 

Detailed Description

Definition at line 20 of file FgIFactorNode.h.

Constructor & Destructor Documentation

◆ IFactorNode() [1/4]

NeuralEngine::MachineLearning::IFactorNode::IFactorNode ( IVariableNode node)

Constructor.

Admin, 8/30/2017.

Parameters
node[in,out] The corresponding variable node.

◆ IFactorNode() [2/4]

NeuralEngine::MachineLearning::IFactorNode::IFactorNode ( IVariableNode node,
std::string  name 
)

Constructor.

Admin, 8/16/2017.

Parameters
node[in,out] The corresponding variable node.
nameThe name.

◆ IFactorNode() [3/4]

template<class T >
NeuralEngine::MachineLearning::IFactorNode::IFactorNode ( std::vector< T * >  nodes,
std::string  name 
)
inline

Constructor.

Admin, 8/30/2017.

Parameters
nodes[in,out] If non-null, the corresponding variable nodes.
nameThe name.

Definition at line 52 of file FgIFactorNode.h.

◆ IFactorNode() [4/4]

template<class T >
NeuralEngine::MachineLearning::IFactorNode::IFactorNode ( std::vector< T * >  nodes)
inline

Constructor.

Admin, 8/30/2017.

Parameters
nodes[in,out] If non-null, the corresponding variable nodes.

Definition at line 67 of file FgIFactorNode.h.

◆ ~IFactorNode()

NeuralEngine::MachineLearning::IFactorNode::~IFactorNode ( )

Destructor.

Admin, 8/16/2017.

Member Function Documentation

◆ IsSupported()

virtual bool NeuralEngine::MachineLearning::IFactorNode::IsSupported ( MsgType  type)
pure virtual

Query if message type is supported.

Admin, 7/25/2017.

Parameters
typeThe type.
Returns
true if supported, false if not.

Implements NeuralEngine::MachineLearning::INode.

Implemented in NeuralEngine::MachineLearning::DiscreteFactorNode.

◆ ComputeMessage()

virtual IMessage NeuralEngine::MachineLearning::IFactorNode::ComputeMessage ( std::string  toNodeName,
MsgBox &  neededMessages 
)
protectedpure virtual

Calculates a message to connectd node.

Admin, 7/26/2017.

Parameters
toNodeNameIdentifier for receiver node.
neededMessagesAll incomming messages, exept from receiver node.
Returns
The calculated message.

Implements NeuralEngine::MachineLearning::INode.

Implemented in NeuralEngine::MachineLearning::DiscreteFactorNode.

◆ CreateName()

template<class T >
std::string NeuralEngine::MachineLearning::IFactorNode::CreateName ( std::vector< T * > &  nodes)
inlineprivate

Creates a name for the node, if no name is given.

Admin, 8/30/2017.

Parameters
nodes[in,out] [in,out] If non-null, the nodes.
Returns
The new name.

Definition at line 115 of file FgIFactorNode.h.

◆ serialize()

template<class Archive >
void NeuralEngine::MachineLearning::IFactorNode::serialize ( Archive &  ar,
unsigned int  version 
)
inlineprivate

Definition at line 127 of file FgIFactorNode.h.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 124 of file FgIFactorNode.h.


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