/**
 * @brief Prototypes of backends for Haydock/KuboBastin/TBPM calculations.
 *
 * @author Yunhai Li (liyunhai1016@hotmail.com)
 *
 * @copyright Copyright (c) 2024, TBPLaS develop team.
 */

#ifndef TBPLAS_TBPM_BACKEND_H
#define TBPLAS_TBPM_BACKEND_H

#include <eigen3/Eigen/Dense>

#include "config.h"

namespace tbplas::tbpm {

/**
 * @brief Abstract TBPM class.
 *
 * @tparam sparse_t
 */
template <typename sparse_t>
class AbstractTBPM {
public:
    virtual void tbpm_dos(
        const sparse_t& h_sparse,
        const TBPMConfig& config,
        const TBPMMeta& meta,
        Eigen::VectorXcd& corr)
        = 0;

    virtual void tbpm_ac_cond(
        const sparse_t& h_sparse,
        const sparse_t& curr_x,
        const sparse_t& curr_y,
        const TBPMConfig& config,
        const TBPMMeta& meta,
        Eigen::MatrixXcd& corr)
        = 0;

    virtual void tbpm_dyn_pol(
        const sparse_t& h_sparse,
        const Eigen::VectorXcd& den_coeff_q,
        const Eigen::VectorXcd& den_coeff_mq,
        const TBPMConfig& config,
        const TBPMMeta& meta,
        Eigen::VectorXd& corr)
        = 0;

    virtual void tbpm_quasi_eigenstates(
        const sparse_t& h_sparse,
        const TBPMConfig& config,
        const TBPMMeta& meta,
        Eigen::MatrixXd& wf2_qe)
        = 0;

    virtual void tbpm_dc_cond(
        const sparse_t& h_sparse,
        const sparse_t& curr_x,
        const sparse_t& curr_y,
        const TBPMConfig& config,
        const TBPMMeta& meta,
        Eigen::VectorXcd& corr_dos,
        Eigen::MatrixXcd& corr_dc_xx,
        Eigen::MatrixXcd& corr_dc_yy)
        = 0;

    virtual void tbpm_wft(
        const sparse_t& h_sparse,
        const TBPMConfig& config,
        const TBPMMeta& meta,
        Eigen::MatrixXcd& wft)
        = 0;
    
    virtual void tbpm_cd(
        const sparse_t& h_sparse,
        const TBPMConfig& config,
        const TBPMMeta& meta,
        Eigen::VectorXd& charge_density)
        = 0;
};
} // namespace tbplas::tbpm
#endif