Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:48:23

0001 /*
0002  * ScalingCell.h
0003  *
0004  *  Created on: Apr 23, 2016
0005  *      Author: Pawel Sznajder
0006  */
0007 
0008 #ifndef SCALINGCELL_H_
0009 #define SCALINGCELL_H_
0010 
0011 #include <string>
0012 #include <utility>
0013 #include <vector>
0014 
0015 #include "../beans/ScalingFunctionType.h"
0016 #include "../beans/ScalingModeType.h"
0017 #include "NeuralNetworkCell.h"
0018 
0019 namespace NumA {
0020 
0021 class ScalingFunction;
0022 
0023 class ScalingCell: public NeuralNetworkCell {
0024 
0025 public:
0026 
0027     ScalingCell();
0028     ScalingCell(ScalingFunctionType::Type scalingFunctionType,
0029             ScalingModeType::Type mode);
0030     virtual ~ScalingCell();
0031     virtual ScalingCell* clone() const;
0032     virtual std::string toString() const;
0033 
0034     virtual void evaluate();
0035     virtual double evaluateDerivativeBackward(
0036             NeuralNetworkNeuron* const neuron) const;
0037 
0038     virtual void checkConsistency() const;
0039 
0040     ScalingModeType::Type getScalingModeType() const;
0041     ScalingFunctionType::Type getScalingFunctionType() const;
0042 
0043     const std::pair<double, double>& getScalingParameters() const;
0044     void setScalingParameters(const std::pair<double, double>& input);
0045     void setScalingParameters(const std::vector<double>& input);
0046 
0047 protected:
0048 
0049     ScalingCell(const ScalingCell& other);
0050 
0051 private:
0052 
0053     ScalingModeType::Type m_scalingModeType;
0054     ScalingFunctionType::Type m_scalingFunctionType;
0055     ScalingFunction* m_pScalingFunction;
0056     std::pair<double, double> m_scalingParameters;
0057 };
0058 
0059 }
0060 
0061 #endif /* SCALINGCELL_H_ */