I am trying to create a matrix of doubles, representing a correlation between entities.
Here's how I'm doing it via LINQ
double[][] correlationsRaw = (from e in entitiesInOrder
select
(from f in entitiesInOrder
select correlations.GetCorrelation(e, f)
).ToArray()).ToArray();
That works fine.
But what I want is a two dimensional array (double[,]), not a jagged array.
Obviously, I can write some nested for loop to convert one into the other.
But is there some elegant LINQ trick I can use here?