tables::column::min,max

1)

template <is_primitive_type P>
P column<P>::min()

2)

template <is_primitive_type P>
P column<P>::max()

  1. Returns the minimum element in the column ignoring nones.

  2. Returns the maximum element in the column ignoring nones.

Complexity

Linear

Example

Code

#include <cpptables/table.hh>

using namespace tables;
using namespace std;

void column_min_max()
{
  const column<unsigned> xs({ 1, 2, 3, 4, 5});

  cout << xs.min() << "\n";
  cout << xs.max() << "\n";
}

Output

1

5