Click here to Skip to main content
15,884,472 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Efficiently sort the following? Pin
harold aptroot24-Aug-17 10:28
harold aptroot24-Aug-17 10:28 
GeneralRe: Efficiently sort the following? Pin
arnold_w24-Aug-17 10:48
arnold_w24-Aug-17 10:48 
AnswerRe: Efficiently sort the following? Pin
Richard MacCutchan24-Aug-17 21:05
mveRichard MacCutchan24-Aug-17 21:05 
AnswerRe: Efficiently sort the following? Pin
Richard Deeming25-Aug-17 1:47
mveRichard Deeming25-Aug-17 1:47 
GeneralRe: Efficiently sort the following? Pin
arnold_w28-Aug-17 0:40
arnold_w28-Aug-17 0:40 
GeneralRe: Efficiently sort the following? Pin
Richard Deeming29-Aug-17 1:53
mveRichard Deeming29-Aug-17 1:53 
GeneralRe: Efficiently sort the following? Pin
arnold_w30-Aug-17 4:04
arnold_w30-Aug-17 4:04 
GeneralRe: Efficiently sort the following? Pin
Richard Deeming30-Aug-17 4:40
mveRichard Deeming30-Aug-17 4:40 
That's annoying. It sounds like C# 2.0 can't infer the generic type parameters properly. You might need to specify them explicitly:
C#
public static IEnumerable<Record> SortRecords(IEnumerable<Record> source)
{
    IEnumerable<IEnumerable<Record>> groupT = Enumerable.GroupBy<Record, int, IEnumerable<Record>>(source, 
        delegate(Record r) { return r.T; },
        delegate(int key, IEnumerable<Record> items)
        {
            IEnumerable<IGrouping<int, Record>> groupH = Enumerable.GroupBy<Record, int>(items, delegate(Record r) { return r.H; });
            return Enumerable.SelectMany<IEnumerable<Record>, Record>(groupH, delegate(IEnumerable<Record> g) { return g; });
        });
    
    return Enumerable.SelectMany<IEnumerable<Record>, Record>(groupT, delegate(IEnumerable<Record> g) { return g; });
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


AnswerRe: Efficiently sort the following? Pin
Alan N30-Aug-17 5:48
Alan N30-Aug-17 5:48 
GeneralRe: Efficiently sort the following? Pin
arnold_w31-Aug-17 23:50
arnold_w31-Aug-17 23:50 
GeneralRe: Efficiently sort the following? Pin
Alan N3-Sep-17 1:13
Alan N3-Sep-17 1:13 
GeneralRe: Efficiently sort the following? Pin
arnold_w3-Sep-17 2:37
arnold_w3-Sep-17 2:37 
QuestionHow to use tensorflow in c# Pin
delphix518-Jul-17 0:48
delphix518-Jul-17 0:48 
AnswerRe: How to use tensorflow in c# Pin
Richard MacCutchan18-Jul-17 2:09
mveRichard MacCutchan18-Jul-17 2:09 
QuestionC++ algorithm Question Pin
Member 1310646721-Jun-17 18:29
Member 1310646721-Jun-17 18:29 
AnswerRe: C++ algorithm Question Pin
OriginalGriff21-Jun-17 18:37
mveOriginalGriff21-Jun-17 18:37 
QuestionInvoice / Payments history table or statement of account Pin
Bastien Vandamme14-Jun-17 15:50
Bastien Vandamme14-Jun-17 15:50 
AnswerRe: Invoice / Payments history table or statement of account Pin
Gerry Schmitz14-Jun-17 16:17
mveGerry Schmitz14-Jun-17 16:17 
GeneralRe: Invoice / Payments history table or statement of account Pin
Bastien Vandamme14-Jun-17 16:46
Bastien Vandamme14-Jun-17 16:46 
GeneralRe: Invoice / Payments history table or statement of account Pin
Gerry Schmitz14-Jun-17 17:39
mveGerry Schmitz14-Jun-17 17:39 
AnswerRe: Invoice / Payments history table or statement of account Pin
jschell10-Jul-17 4:30
jschell10-Jul-17 4:30 
QuestionChaotic image encryption algorithm by Xingyuan Wang Pin
Member 1325934114-Jun-17 4:53
Member 1325934114-Jun-17 4:53 
QuestionSelecting values from list to make up totals in second list Pin
Wayne Gaylard15-May-17 21:45
professionalWayne Gaylard15-May-17 21:45 
AnswerRe: Selecting values from list to make up totals in second list Pin
Richard MacCutchan15-May-17 22:27
mveRichard MacCutchan15-May-17 22:27 
GeneralRe: Selecting values from list to make up totals in second list Pin
Wayne Gaylard15-May-17 22:34
professionalWayne Gaylard15-May-17 22:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.