Template Struct raiseNormToIntegerPower

Struct Documentation

template<typename Real, int n>
struct raiseNormToIntegerPower

Compute a quantity exponentiated by an integer power, using multiplication, at compile time. The exponent is assumed to be positve.

Template Parameters:
  • Real – the floating point type to use for arithmetic.

  • n – the exponent to raise the value to.

Public Static Functions

static inline Real compute(Real val)

pow compute the norm raised to the power n.

Parameters:

val – the square of the norm to be exponentiated.

Returns:

the norm raised to the integer power.