Skip to content

Commit

Permalink
Fix constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
terasakisatoshi committed Dec 16, 2024
1 parent 86ec696 commit 4275fa3
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions include/sparseir/basis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,21 @@ class AbstractBasis {

namespace sparseir {

template <typename S, typename K = LogisticKernel>
template <typename S, typename K=LogisticKernel>
class FiniteTempBasis : public AbstractBasis<S> {
public:
K kernel;
SVEResult<K> sve_result;
double accuracy;
double beta; // β
double beta;
PiecewiseLegendrePolyVector u;
PiecewiseLegendrePolyVector v;
Eigen::VectorXd s;
PiecewiseLegendreFTVector<S> uhat;
PiecewiseLegendreFTVector<S> uhat_full;

// Constructor
FiniteTempBasis<S>(
double beta, double omega_max,
FiniteTempBasis(double beta, double omega_max,
double epsilon = std::numeric_limits<double>::quiet_NaN(),
int max_size = -1)
{
Expand All @@ -185,16 +184,16 @@ class FiniteTempBasis : public AbstractBasis<S> {
sve_result, max_size);
}

FiniteTempBasis<S, K>(double beta, double omega_max, double epsilon,
K kernel)
FiniteTempBasis(double beta, double omega_max, double epsilon,
K& kernel)
{
SVEResult<K> sve_result = compute_sve<K>(kernel, epsilon);
int max_size = -1;
FiniteTempBasis<S, K>(beta, omega_max, epsilon, kernel, sve_result,
max_size);
}

FiniteTempBasis<S, K>(double beta, double omega_max, double epsilon,
FiniteTempBasis(double beta, double omega_max, double epsilon,
K kernel, SVEResult<K> sve_result, int max_size = -1)
{
if (beta <= 0.0) {
Expand Down Expand Up @@ -455,14 +454,14 @@ class FiniteTempBasis : public AbstractBasis<S> {
};

/*
std::pair<FiniteTempBasis<Fermionic, LogisticKernel>, FiniteTempBasis<Bosonic,
inline std::pair<FiniteTempBasis<Fermionic, LogisticKernel>, FiniteTempBasis<Bosonic,
LogisticKernel>> finite_temp_bases( double beta, double omega_max, double
epsilon = std::numeric_limits<double>::quiet_NaN()
)
{
return std::make_pair(FiniteTempBasis<Fermionic, LogisticKernel>(beta,
return std::make_pair<FiniteTempBasis<Fermionic, LogisticKernel>>(beta,
omega_max, epsilon), FiniteTempBasis<Bosonic, LogisticKernel>(beta, omega_max,
epsilon));
epsilon);
}
*/

Expand Down

0 comments on commit 4275fa3

Please sign in to comment.