Skip to content

Commit 933c8d0

Browse files
f3schshahor02
authored andcommitted
COMMON: Fix flat idx (signed flip)
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent d1f1fe9 commit 933c8d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Common/MathUtils/include/MathUtils/LegendrePols.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class Legendre2DPolynominal final : public TNamed,
200200
boost::math::legendre_p(i - j, y);
201201
}
202202

203-
inline int getFlatIdx(int i, int j) const { return i * (i - 1) / 2 + j; }
203+
inline int getFlatIdx(int i, int j) const { return i * (i + 1) / 2 + j; }
204204

205205
unsigned int fOrder{0};
206206
std::vector<double> fParams;

0 commit comments

Comments
 (0)