33 lines
871 B
C++
33 lines
871 B
C++
#ifndef RC_ACTIVATION_H
|
|
#define RC_ACTIVATION_H
|
|
|
|
#include <math.h>
|
|
|
|
namespace Passer {
|
|
namespace RoboidControl {
|
|
|
|
class Activation {
|
|
public:
|
|
static float HeavisideStep(float inputValue, float bias = 0); // Range: {0,1}
|
|
|
|
static float Tanh(float inputValue); // Range: (-1, 1)
|
|
|
|
static float Sigmoid(float inputValue); // Range: (0, 1)
|
|
|
|
static float Linear(float inputValue, float bias = 0, float range = 0);
|
|
|
|
static float Quadratic(float inputValue,
|
|
float bias = 0,
|
|
float range = 0); // minValue = bias
|
|
|
|
static float ParticleLife(float minValue,
|
|
float maxValue,
|
|
float attraction,
|
|
float inputValue); // minValue = bias
|
|
};
|
|
|
|
} // namespace RoboidControl
|
|
} // namespace Passer
|
|
using namespace Passer::RoboidControl;
|
|
|
|
#endif |