Instead of a specific Silverlight version, we now provide a separate
Portable Library assebly that supports .Net 4.0.1 and higher,
Silverlight 5 ad well as .Net for Metro style apps (WinRT).
New NuGet Package MathNet.Numerics.Portable with the portable library.
Since MathNet.Numerics.Portable now supports silverlight, the normal
package MathNet.Numerics no longer supports it (.Net 4 only).
Reworked the common parallel execution infrastructure for more reasonable
abstractions and better compatibility with portable libraries. Portable
libraries do support parts of the TPL, but neither the Parallel class nor
straight threading.
Linear Algebra comes with a set of IO classes for reading and writing text
files as well as files compatible with Matlab. These classes have now been
extracted into a separate MathNet.Numerics.IO project and assembly. The
core project no longer has zlib.net as dependency (only Numerics.IO has).
For non-complex matrices, the ConjugateTranspose is the same
as the transpose. Therefore, a sealed override for
ConjugateTranspose() that simply forwards the call to Transpose()
makes sense for double/single matrices.
Signed-off-by: Alexander Karatarakis <alex@karatarakis.com>
var NRow = 3;
var NCol = 3;
var m = new DenseMatrix(NRow, NCol);
var v = new DenseMatrix(NRow);
for (var i = 0; i < NRow; i++)
{
v[i, i] = 1;
}
var k = new DenseMatrix(NCol);
for (var i = 0; i < NCol; i++)
{
k[i, i] = 1;
}
var NewMatrix = new MatrixNormal(m, v, k);
var Sampleone = NewMatrix.Sample();
It is fine, but when I change NRow=4, (but keep NCol=3) it does not work. I checked the code, I think the problem is in MatrixNormal.cs Line 286:
var vector = SampleVectorNormal(rnd, new DenseVector(n * n, 0.0), vki);
but I think it should be:
var vector = SampleVectorNormal(rnd, new DenseVector(n * p, 0.0), vki);
Equals previously returned always false in case of (asymmetric) accidential
zeros. Instead, Equals now expects accidential zeros and treats them
correctly (so we can allow arithmetic algorithms to generate accidential
zeros, avoiding a lot of zero checks).
Previously sparse vectors for Complex and Complex32 did override
Object.Equals instead of the generic IEquatable<Vector<T>>.Equals.
Now only overrides the generic version to ensure that the right version
is called in all code paths.
CommonParallel did break on empty loops with an argument exception instead
of just doing nothing. It now exits early if there's nothing to do in
For and Invoke, no longer throwing an exception. Also, it now special cases
single-element iterations and inlines their execution (trivial loop
unrolling), skipping all the threading/task overhead.