static IDataFrameViewGroupResults RecGroupBy <T1, T2>(IDataFrameView df, int[] icols, bool sort) where T1 : IEquatable <T1>, IComparable <T1> where T2 : IEquatable <T2>, IComparable <T2> { var kind = df.Kinds[icols[2]]; if (icols.Length == 3) { switch (kind) { case DataKind.BL: return(df.TGroupBy <T1, T2, DvBool>(icols, sort)); case DataKind.I4: return(df.TGroupBy <T1, T2, DvInt4>(icols, sort)); case DataKind.U4: return(df.TGroupBy <T1, T2, uint>(icols, sort)); case DataKind.I8: return(df.TGroupBy <T1, T2, DvInt8>(icols, sort)); case DataKind.R4: return(df.TGroupBy <T1, T2, float>(icols, sort)); case DataKind.R8: return(df.TGroupBy <T1, T2, double>(icols, sort)); case DataKind.TX: return(df.TGroupBy <T1, T2, DvText>(icols, sort)); default: throw new NotImplementedException($"GroupBy is not implemented for type '{kind}'."); } } else { throw new NotImplementedException($"soGroupByrt is not implemented for {icols.Length} columns."); } }
static IDataFrameViewGroupResults RecGroupBy(IDataFrameView df, int[] icols, bool sort) { var kind = df.Kinds[icols[0]]; if (icols.Length == 1) { switch (kind) { case DataKind.BL: return(df.TGroupBy <DvBool>(icols, sort)); case DataKind.I4: return(df.TGroupBy <DvInt4>(icols, sort)); case DataKind.U4: return(df.TGroupBy <uint>(icols, sort)); case DataKind.I8: return(df.TGroupBy <DvInt8>(icols, sort)); case DataKind.R4: return(df.TGroupBy <float>(icols, sort)); case DataKind.R8: return(df.TGroupBy <double>(icols, sort)); case DataKind.TX: return(df.TGroupBy <DvText>(icols, sort)); default: throw new NotImplementedException($"GroupBy is not implemented for type '{kind}'."); } } else { switch (kind) { case DataKind.BL: return(RecGroupBy <DvBool>(df, icols, sort)); case DataKind.I4: return(RecGroupBy <DvInt4>(df, icols, sort)); case DataKind.U4: return(RecGroupBy <uint>(df, icols, sort)); case DataKind.I8: return(RecGroupBy <DvInt8>(df, icols, sort)); case DataKind.R4: return(RecGroupBy <float>(df, icols, sort)); case DataKind.R8: return(RecGroupBy <double>(df, icols, sort)); case DataKind.TX: return(RecGroupBy <DvText>(df, icols, sort)); default: throw new NotImplementedException($"GroupBy is not implemented for type '{kind}'."); } } }
static IDataFrameViewGroupResults RecGroupBy <T1, T2>(IDataFrameView df, int[] icols, bool sort) where T1 : IEquatable <T1>, IComparable <T1> where T2 : IEquatable <T2>, IComparable <T2> { var kind = df.Kinds[icols[2]]; if (icols.Length == 3) { if (kind.IsVector()) { throw new NotImplementedException(); } else { switch (kind.RawKind()) { case DataKind.Boolean: return(df.TGroupBy <T1, T2, bool>(icols, sort)); case DataKind.Int32: return(df.TGroupBy <T1, T2, int>(icols, sort)); case DataKind.UInt32: return(df.TGroupBy <T1, T2, uint>(icols, sort)); case DataKind.Int64: return(df.TGroupBy <T1, T2, long>(icols, sort)); case DataKind.Single: return(df.TGroupBy <T1, T2, float>(icols, sort)); case DataKind.Double: return(df.TGroupBy <T1, T2, double>(icols, sort)); case DataKind.String: return(df.TGroupBy <T1, T2, DvText>(icols, sort)); default: throw new NotImplementedException($"GroupBy is not implemented for type '{kind}'."); } } } else { throw new NotImplementedException($"soGroupByrt is not implemented for {icols.Length} columns."); } }
static IDataFrameViewGroupResults RecGroupBy <T1>(IDataFrameView df, int[] icols, bool sort) where T1 : IEquatable <T1>, IComparable <T1> { var kind = df.Kinds[icols[1]]; if (icols.Length == 2) { if (kind.IsVector()) { throw new NotImplementedException(); } else { switch (kind.RawKind()) { case DataKind.BL: return(df.TGroupBy <T1, bool>(icols, sort)); case DataKind.I4: return(df.TGroupBy <T1, int>(icols, sort)); case DataKind.U4: return(df.TGroupBy <T1, uint>(icols, sort)); case DataKind.I8: return(df.TGroupBy <T1, long>(icols, sort)); case DataKind.R4: return(df.TGroupBy <T1, float>(icols, sort)); case DataKind.R8: return(df.TGroupBy <T1, double>(icols, sort)); case DataKind.TX: return(df.TGroupBy <T1, DvText>(icols, sort)); default: throw new NotImplementedException($"GroupBy is not implemented for type '{kind}'."); } } } else { if (kind.IsVector()) { throw new NotImplementedException(); } else { switch (kind.RawKind()) { case DataKind.BL: return(RecGroupBy <T1, bool>(df, icols, sort)); case DataKind.I4: return(RecGroupBy <T1, int>(df, icols, sort)); case DataKind.U4: return(RecGroupBy <T1, uint>(df, icols, sort)); case DataKind.I8: return(RecGroupBy <T1, long>(df, icols, sort)); case DataKind.R4: return(RecGroupBy <T1, float>(df, icols, sort)); case DataKind.R8: return(RecGroupBy <T1, double>(df, icols, sort)); case DataKind.TX: return(RecGroupBy <T1, DvText>(df, icols, sort)); default: throw new NotImplementedException($"GroupBy is not implemented for type '{kind}'."); } } } }
static IDataFrameViewGroupResults RecGroupBy(IDataFrameView df, int[] icols, bool sort) { var kind = df.Kinds[icols[0]]; if (icols.Length == 1) { if (kind.IsVector()) { throw new NotImplementedException(); } else { switch (kind.RawKind()) { case DataKind.Boolean: return(df.TGroupBy <bool>(icols, sort)); case DataKind.Int32: return(df.TGroupBy <int>(icols, sort)); case DataKind.UInt32: return(df.TGroupBy <uint>(icols, sort)); case DataKind.Int64: return(df.TGroupBy <long>(icols, sort)); case DataKind.Single: return(df.TGroupBy <float>(icols, sort)); case DataKind.Double: return(df.TGroupBy <double>(icols, sort)); case DataKind.String: return(df.TGroupBy <DvText>(icols, sort)); default: throw new NotImplementedException($"GroupBy is not implemented for type '{kind}'."); } } } else { if (kind.IsVector()) { throw new NotImplementedException(); } else { switch (kind.RawKind()) { case DataKind.Boolean: return(RecGroupBy <bool>(df, icols, sort)); case DataKind.Int32: return(RecGroupBy <int>(df, icols, sort)); case DataKind.UInt32: return(RecGroupBy <uint>(df, icols, sort)); case DataKind.Int64: return(RecGroupBy <long>(df, icols, sort)); case DataKind.Single: return(RecGroupBy <float>(df, icols, sort)); case DataKind.Double: return(RecGroupBy <double>(df, icols, sort)); case DataKind.String: return(RecGroupBy <DvText>(df, icols, sort)); default: throw new NotImplementedException($"GroupBy is not implemented for type '{kind}'."); } } } }