Skip to content

Use "inline" initialization #7

@vp1981

Description

@vp1981

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions