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

#if !defined(_HARKLIB_NODE_DELTA_H_INCLUDED_)
#define _HARKLIB_NODE_DELTA_H_INCLUDED_ 1

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

#include <vector>

namespace hark
{
namespace node
{
    class Delta: public NodeDef
    {
    public:
        Delta();
        virtual void reset();
        virtual bool operator () (size_t count, InputDataBundle &input, OutputDataBundle &output);

    private:
        void initialize(InputDataBundle &input);

    private:
        int _fbank_count;
        int _delta_window;
        int _B;
        std::vector<float>_A1;
        std::vector<float>_A2;
        std::vector<float>_sum;
    };
}
}

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

/* end of file */
