//
// Created by Krad on 2023/4/6.
//

#ifndef MATLABFUNCTIONS_MATRIXFUNCTIONS_H
#define MATLABFUNCTIONS_MATRIXFUNCTIONS_H

#include <complex>

namespace Aurora{
    double* malloc(size_t size,bool complex = false);
    void free(void* ptr);
    double* mul( double scalar, double * input, int size);
    double* mul( double* inputA, double * inputB, int size);
    double* mulz( std::complex<double> *inputA, std::complex<double> * inputB, int size);
    double immse(double * dataA, double * dataB, int size);
    double* std(int rows, int cols, double * input);
    double* random(int size);
    double* inv(int cols,double *pMatrix);
    double* real(int size, std::complex<double> * input);
    std::complex<double> * complex(int size, double * input);
    std::complex<double>* fft(long int size, std::complex<double> * input);
//  ic std::complex<double>* fft(long int size, double * input);
    std::complex<double>* ifft(long int size, std::complex<double> * input);
    std::complex<double>* hilbert(int size, double * input);
};


#endif //MATLABFUNCTIONS_MATRIXFUNCTIONS_H
