tables::column::norm

template <is_primitive_type P>
double column<P>::norm() const

Returns the Euclidean norm of the elements in the column.

Complexity

Linear

Example

Code

#include <cpptables/table.hh>

using namespace tables;
using namespace std;

void column_norm()
{
  const column<unsigned> xs({ 2, 2});

  cout << xs.norm() << "\n";
}

Output

2.82843