/*
   HARK Library
   Copyright (C) 2021 Honda Research Institute Japan Inc.
 */

#if !defined(_HARKLIB_NODE_BGN_ESTIMATOR_H_INCLUDED_)
#define _HARKLIB_NODE_BGN_ESTIMATOR_H_INCLUDED_ 1

#include "hark-lib/hark-lib.h"
#include "hark-lib/node.h"

#include "hark-lib/matrix.h"

#include <string>
#include <vector>
#include <complex>

namespace hark
{
namespace node
{
    class BGNEstimator: public NodeDef
    {
    public:
        BGNEstimator();

        void initialize(InputDataBundle &input);
        virtual void reset();
        virtual bool operator () (size_t count, InputDataBundle &input, OutputDataBundle &output);

    private:
        float delta;
        int l;
        float alpha_s;
        float noise_compense;
        float alpha_d_min;
        int num_init_frame;

        Matrix<float> S;
        Matrix<float> Sf;
        Matrix<float> Smin;
        Matrix<float> Stmp;
        Matrix<float> Lambda;
        int num_proc;
    };
}
}

#endif /* #if !defined(_HARKLIB_NODE_BGN_ESTIMATOR_H_INCLUDED_) */

/* end of file */
