Skip to content

Confused about the 2d interpolation and evaluation operations in volepsi/volePSI/SimpleIndex.cpp #3

@orzcy

Description

@orzcy

At Line 267-270 in volepsi/volePSI/SimpleIndex.cpp, there are

auto a0 = (diffBin)*sizes[numBinsLow][numBallsLow] + (1 - diffBin) * sizes[numBinsLow][numBallsHgh];
auto a1 = (diffBin)*sizes[numBinsHgh][numBallsLow] + (1 - diffBin) * sizes[numBinsHgh][numBallsHgh];

auto b0 = (diffBall)*a0 + (1 - diffBall) * a1;

I am confused why diffBin is used as the coefficient for [numBallsLow] and [numBallsHgh] to calculate a0, a1, while diffBall is used to calculate b0. It seems more natural to use diffBall when calculating a0, a1 and diffBin when calculating b0.

Therefore, should this code snippet be modified to

auto a0 = (diffBall)*sizes[numBinsLow][numBallsLow] + (1 - diffBall) * sizes[numBinsLow][numBallsHgh];
auto a1 = (diffBall)*sizes[numBinsHgh][numBallsLow] + (1 - diffBall) * sizes[numBinsHgh][numBallsHgh];

auto b0 = (diffBin)*a0 + (1 - diffBin) * a1;

Looking forward to your reply.

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