Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "inline" initialization #7

Open
vp1981 opened this issue Feb 15, 2021 · 0 comments
Open

Use "inline" initialization #7

vp1981 opened this issue Feb 15, 2021 · 0 comments

Comments

@vp1981
Copy link
Collaborator

vp1981 commented Feb 15, 2021

This code

this->H0 = H0;

though compiles itself looks very odd. Just use

Methods(
        Matrix<double, 3, 3> H0,
        Matrix<double, 3, 3> W,
        Matrix<complex<double>, 3, 1> v,
        double v0,
        double n,
        function<double(double, double, double)> prof,
        double start,
        double end,
        double step

    ): H0(H0), W(W), v(v), v0(v0), n(n), start(start), end(end), step(step), prof(prof)

then in body of constructor you could calculate proper step for algorithms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant