Skip to content
Snippets Groups Projects

MuonR4 - Introduce mapping function between symmetric matrices & vectors

Merged Johannes Junggeburth requested to merge jojungge/athena:MatHelpers into main
All threads resolved!
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
@@ -6,9 +6,11 @@
#include <CxxUtils/ArrayHelper.h>
#include <array>
namespace MuonR4{
/** @brief Returns the sign of a number */
constexpr double sign(const double x) {
return x > 0. ? 1. : x < 0. ? -1. : 0.;
}
/** @brief Calculates the sum of 1 + 2 +3 +4 +... + k */
constexpr unsigned int sumUp(unsigned k){
return k*(k+1)/ 2;
Loading