Untitled

ExampleFunction.h
 avatar
user_9702121
c_cpp
2 years ago
1.3 kB
4
Indexable
#ifndef EXAMPLEFUNCTION_H
#define EXAMPLEFUNCTION_H

#include "NumericalOptimizerInterface.h"
#include "Wrapper.hpp"
#include <iostream>

struct bin;

class ExampleFunction : public NumericalOptimizerInterface
{
public:
    ExampleFunction(wrapper::Placement & _placement, double Eta, double beta, int BinDiv);
    void evaluateFG(const vector<double> &x, double &f, vector<double> &g);
    void evaluateF(const vector<double> &x, double &f);
    unsigned dimension();
    void thetaX(int binID, int moduleID, double &thetaXF, double &thetaXG, const vector<double> &x);
    void thetaY(int binID, int moduleID, double &thetaYF, double &thetaYG, const vector<double> &x);
    void thetaX(int binID, int moduleID, double &thetaXF, const vector<double> &x);
    void thetaY(int binID, int moduleID, double &thetaYF, const vector<double> &x);
    void ComputeCi(const vector<double> &x);
    double eta = 0.0;
    unsigned int binDiv = 0, numBins = 0;
    double beta = 0.0, binH = 0.0, binW = 0.0, binSize = 0.0, avDens = 0.0;
    wrapper::Placement &placement;
    vector<double> paras;
    vector<bin> bins;
    vector<double> ci;
};

typedef struct bin {
    double binDens = 0.0;
    double xb = 0.0;
    double yb = 0.0;
} bin;
#endif // EXAMPLEFUNCTION_H
Editor is loading...
Leave a Comment