From 76f95a74b9cb93eaece9a7e26f2b38b0aca58a25 Mon Sep 17 00:00:00 2001 From: swaits Date: Wed, 21 Feb 2007 01:10:23 +0000 Subject: [PATCH] --- pso.cpp | 6 ++++++ pso.h | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pso.cpp create mode 100644 pso.h diff --git a/pso.cpp b/pso.cpp new file mode 100644 index 0000000..fa96f4c --- /dev/null +++ b/pso.cpp @@ -0,0 +1,6 @@ +#include "pso.h" + +int main() +{ + return 0; +} diff --git a/pso.h b/pso.h new file mode 100644 index 0000000..b47e2a1 --- /dev/null +++ b/pso.h @@ -0,0 +1,34 @@ +#ifndef __pso_h__ +#define __pso_h__ + +namespace PSO +{ + template + class Engine + { + public: + + Engine(); + virtual ~Engine(); + + void Reset(); + + const double* GetBest() const; + + void SetRange(double minimum, double maximum); + void SetRange(const Vector& minimum, const Vector& maximum); + + virtual double CalculateError(const double testcase[DIM], bool& stop) = 0; + + bool Solve(unsigned int maxgenerations = 1000000000); + + private: + + + }; + +}; + + +#endif // __pso_h__ +