@@ -342,38 +342,38 @@ struct get_aggregate_frame<frame<Ts...>, index_defn<Inds...>, Ops...>
342
342
namespace agg
343
343
{
344
344
template <size_t Ind>
345
- detail::sum_op<Ind- 1 >
345
+ detail::sum_op<Ind>
346
346
sum ( columnindex<Ind> )
347
347
{
348
- return detail::sum_op<Ind- 1 >{};
348
+ return detail::sum_op<Ind>{};
349
349
}
350
350
351
351
template <size_t Ind>
352
- detail::min_op<Ind- 1 >
352
+ detail::min_op<Ind>
353
353
min ( columnindex<Ind> )
354
354
{
355
- return detail::min_op<Ind- 1 >{};
355
+ return detail::min_op<Ind>{};
356
356
}
357
357
358
358
template <size_t Ind>
359
- detail::max_op<Ind- 1 >
359
+ detail::max_op<Ind>
360
360
max ( columnindex<Ind> )
361
361
{
362
- return detail::max_op<Ind- 1 >{};
362
+ return detail::max_op<Ind>{};
363
363
}
364
364
365
365
template <size_t Ind>
366
- detail::mean_op<Ind- 1 >
366
+ detail::mean_op<Ind>
367
367
mean ( columnindex<Ind> )
368
368
{
369
- return detail::mean_op<Ind- 1 >{};
369
+ return detail::mean_op<Ind>{};
370
370
}
371
371
372
372
template <size_t Ind>
373
- detail::stddev_op<Ind- 1 >
373
+ detail::stddev_op<Ind>
374
374
stddev ( columnindex<Ind> )
375
375
{
376
- return detail::stddev_op<Ind- 1 >{};
376
+ return detail::stddev_op<Ind>{};
377
377
}
378
378
379
379
detail::count_op
@@ -451,16 +451,6 @@ class grouped_frame<index_defn<GroupInds...>, Ts...>
451
451
}
452
452
453
453
private:
454
- template <size_t ColInd, typename ... Ops, typename ... Us>
455
- void
456
- aggregate_rename_result_columns ( std::tuple<series<Us>...>& result_columns ) const
457
- {
458
- aggregate_rename_result_columns_args<0 , ColInd, Ops...>( result_columns );
459
- if constexpr (ColInd+1 < sizeof ...(Ts)) {
460
- aggregate_rename_result_columns<ColInd+1 , Ops...>( result_columns );
461
- }
462
- }
463
-
464
454
template <size_t ColInd>
465
455
std::string
466
456
get_op_name ( detail::sum_op<ColInd> ) const
@@ -496,13 +486,23 @@ class grouped_frame<index_defn<GroupInds...>, Ts...>
496
486
return " stddev" ;
497
487
}
498
488
489
+ template <size_t ColInd, typename ... Ops, typename ... Us>
490
+ void
491
+ aggregate_rename_result_columns ( std::tuple<series<Us>...>& result_columns ) const
492
+ {
493
+ aggregate_rename_result_columns_args<0 , ColInd, Ops...>( result_columns );
494
+ if constexpr (ColInd+1 < sizeof ...(Ts)) {
495
+ aggregate_rename_result_columns<ColInd+1 , Ops...>( result_columns );
496
+ }
497
+ }
498
+
499
499
template <size_t ArgInd, size_t ColInd, typename ... Ops, typename ... Us>
500
500
void
501
501
aggregate_rename_result_columns_args ( std::tuple<series<Us>...>& result_columns ) const
502
502
{
503
503
using OpsTup = std::tuple<Ops...>;
504
504
if constexpr (detail::is_colind_at_argind<ColInd, ArgInd, OpsTup>::value) {
505
- columnindex<ColInd+ 1 > ci;
505
+ columnindex<ColInd> ci;
506
506
auto name = m_frame.column_name (ci);
507
507
auto & s = std::get<ArgInd>(result_columns);
508
508
using Op = typename detail::pack_element<ArgInd, Ops...>::type;
@@ -578,7 +578,7 @@ class grouped_frame<index_defn<GroupInds...>, Ts...>
578
578
series<T>& result_column ) const
579
579
{
580
580
T temp = static_cast <T>(0 );
581
- columnindex<ColInd+ 1 > ci;
581
+ columnindex<ColInd> ci;
582
582
for ( size_t rowind : rowinds ) {
583
583
const auto & row = m_frame[rowind];
584
584
const T& t = row.at ( ci );
@@ -596,7 +596,7 @@ class grouped_frame<index_defn<GroupInds...>, Ts...>
596
596
using std::max;
597
597
using std::numeric_limits;
598
598
T temp = numeric_limits<T>::lowest ();
599
- columnindex<ColInd+ 1 > ci;
599
+ columnindex<ColInd> ci;
600
600
for ( size_t rowind : rowinds ) {
601
601
const auto & row = m_frame[rowind];
602
602
const T& t = row.at ( ci );
@@ -614,7 +614,7 @@ class grouped_frame<index_defn<GroupInds...>, Ts...>
614
614
using std::min;
615
615
using std::numeric_limits;
616
616
T temp = numeric_limits<T>::max ();
617
- columnindex<ColInd+ 1 > ci;
617
+ columnindex<ColInd> ci;
618
618
for ( size_t rowind : rowinds ) {
619
619
const auto & row = m_frame[rowind];
620
620
const T& t = row.at ( ci );
@@ -630,7 +630,7 @@ class grouped_frame<index_defn<GroupInds...>, Ts...>
630
630
series<T>& result_column ) const
631
631
{
632
632
T temp = static_cast <T>(0 );
633
- columnindex<ColInd+ 1 > ci;
633
+ columnindex<ColInd> ci;
634
634
for ( size_t rowind : rowinds ) {
635
635
const auto & row = m_frame[rowind];
636
636
const T& t = row.at ( ci );
@@ -647,7 +647,7 @@ class grouped_frame<index_defn<GroupInds...>, Ts...>
647
647
series<T>& result_column ) const
648
648
{
649
649
T sum = static_cast <T>(0 );
650
- columnindex<ColInd+ 1 > ci;
650
+ columnindex<ColInd> ci;
651
651
for ( size_t rowind : rowinds ) {
652
652
const auto & row = m_frame[rowind];
653
653
const T& t = row.at ( ci );
0 commit comments