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.