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

FgPeriodicTopologicalConstraint.h
1
11#pragma once
12
13#include <MachineLearning/FgIBackconstraint.h>
14
15 namespace NeuralEngine
16{
17 namespace MachineLearning
18 {
19 namespace GPModels
20 {
52 template<typename Scalar>
53 class NE_IMPEXP PTC : public IBackconstraint<Scalar>
54 {
55 public:
56
62 PTC();
63
69 virtual ~PTC();
70
79 virtual void Init(const af::array& Y, const af::array& X, const af::array& segments);
80
88 virtual int GetNumParameters();
89
97 virtual void SetParameters(const af::array& param);
98
106 virtual af::array GetParameters();
107
115 virtual af::array GetConstraintX();
116
126 virtual af::array BackconstraintGradient(const af::array& gX);
127
128 protected:
129 af::array afA;
130 std::vector<int> pSegments;
131
132 int iNumSegments;
133
134 private:
135 friend class boost::serialization::access;
136
137 template<class Archive>
138 void serialize(Archive& ar, unsigned int version)
139 {
140 ar& boost::serialization::base_object<IBackconstraint<Scalar>>(*this);
141
142 ar& BOOST_SERIALIZATION_NVP(afA);
143 ar& BOOST_SERIALIZATION_NVP(pSegments);
144 ar& BOOST_SERIALIZATION_NVP(iNumSegments);
145 }
146 };
147 }
148 }
149}
NeuralEngine::MachineLearning::GPModels::IBackconstraint
Abstract class for back-constraints, a kind of prior knowledge to force topological positions of unce...
Definition: FgIBackconstraint.h:42
NeuralEngine::MachineLearning::GPModels::PTC
Back-constraints via Periodic topological constraint.
Definition: FgPeriodicTopologicalConstraint.h:54
NeuralEngine::MachineLearning::GPModels::PTC::GetNumParameters
virtual int GetNumParameters()
Gets number of to be optimized parameters.
NeuralEngine::MachineLearning::GPModels::PTC::SetParameters
virtual void SetParameters(const af::array &param)
Sets the parameters.
NeuralEngine::MachineLearning::GPModels::PTC::GetParameters
virtual af::array GetParameters()
Gets the parameters.
NeuralEngine::MachineLearning::GPModels::PTC::GetConstraintX
virtual af::array GetConstraintX()
Gets constraint x coordinates.
NeuralEngine::MachineLearning::GPModels::PTC::~PTC
virtual ~PTC()
Destructor.
NeuralEngine::MachineLearning::GPModels::PTC::BackconstraintGradient
virtual af::array BackconstraintGradient(const af::array &gX)
Back-constraint gradient.
NeuralEngine::MachineLearning::GPModels::PTC::PTC
PTC()
Default constructor.
NeuralEngine::MachineLearning::GPModels::PTC::Init
virtual void Init(const af::array &Y, const af::array &X, const af::array &segments)
Initializes this object.
NeuralEngine
Definition: NeArray2.h:18