Reviewed: Math.NET Numerics v2.6.1 (Bug Fix) (Mar 18, 2014)
Rated 5 Stars (out of 5) - Very appreciated project!
View ArticleNew Post: Thread Safe Random Variate Generation
Hi, I have an algorithm that wants to generate lots of random gamma and poissons in parrallel, I think my understanding of the code is correct but wanted to ask: If I download the Net4.0 binaries from...
View ArticleNew Post: Is there a method in recent Math.Net to return the SquaredNorm of a...
In the old version (Iridium) there was a method Vector.SquaredNorm() but in the most recent stable version of Math.Net there is none available. What method should I use?
View ArticleNew Post: Is there a method in recent Math.Net to return the SquaredNorm of a...
I assume you want the squared L2-norm (which is what Iridium did if I remember correctly).// straight forward, simply square the L2-norm directly: var squaredNorm1 = Math.Pow(v.L2Norm(),2); //...
View ArticleNew Post: Is there a method in recent Math.Net to return the SquaredNorm of a...
Hmmm... There is no such L2Norm() on a vector. I'm using the latest stable version, not the alpha.
View ArticleNew Post: In Iridium, there was Vector.Normalize() without a param but latest...
What should I give as the parameter value?
View ArticleNew Post: Is there a method in recent Math.Net to return the SquaredNorm of a...
Ah yes, the norms are one of the improved areas in v3. You can use p-norm with p=2 though: Norm(2). Or of course the dot product.
View ArticleNew Post: Is there a method in recent Math.Net to return the SquaredNorm of a...
Does V3, even as alpha, usable? I only use Precision and LinearAlgebra (on double) stuff.
View ArticleNew Post: Is there a method in recent Math.Net to return the SquaredNorm of a...
We use semantic versioning, so the alpha primarily indicates that the API may still change a bit and you may need to updated your code accordingly (i.e. no compatibility guarantees) - not that the...
View ArticleNew Post: In Iridium, there was Vector.Normalize() without a param but latest...
Iridium was always normalizing to the Euclidean L2-norm, so to get the same result use p=2.
View ArticleNew Post: Thread Safe Random Variate Generation
Hi, Yes, the RNGs will be thread-safe then (with v3 alpha there's also a SystemRandomSource that wraps System.Random in a thread-safe way but is faster than our MersenneTwister). However, if you can...
View ArticleNew Post: Create beta distribution with 4 parameters?
Hi, The Beta distribution indeed does not support the 4-parameter variant yet. The transformation with the two bounds is quite straightforward. However, we should consider to add full support for this...
View ArticleNew Post: Missing Vector.ScalarMultiply(Vector), and more
Here what's missing from Iridium and not sure what replacement to use: Vector.ScalarMultiply (Vector) Vector.ScalarProduct (Vector, Vector) Vector.ScaleInplace (double) Vector.AddInplace (Vector)
View ArticleNew Post: Missing Vector.ScalarMultiply(Vector), and more
Ok, I think that the * operator can be used for ScalarMultiply and ScalarProduct: double value = v1.ScalarMultiply (v2) .... now becomes double value = v1 * v2; double value = Vector.ScalarProduct...
View ArticleNew Post: Missing Vector.ScalarMultiply(Vector), and more
double value = ...; //inplace scalar multiply v1.Multiply(value, v1); //inplace scalar add v1.Add(value, v1); v1.Add(v2, v1);Everything is there, already.
View ArticleNew Post: Sparse Matrix Solver
Hi, I'm working on a non-linear finite element solver . I have to solve many times the classical system Ax = b where the matrix A is constant and varies only the side b . I currently use dense arrays ,...
View ArticleNew Post: Thread Safe Random Variate Generation
Hello, Thanks for the response (and the awesome library). I am somewhat new to the ThreadLocal class and so was great to hear about this. So I have a step in an MCMC routine that runs parallel across...
View ArticleNew Post: Missing Vector.ScalarMultiply(Vector), and more
Vector.Multiply and Vector.Add do not modify the vector "in place", they return a copy. In the end I did the following:// Replaces Vector.ScaleInplace (double)double scalar = 2; v1.MapInPlace (value...
View ArticleNew Post: Missing Vector.ScalarMultiply(Vector), and more
Actually, yes, the void Vector.Multiply(scalar, result) and void Vector.Add(other, result) overloads accept the resulting vector as last argument and thus operate in-place if the input vector is passed...
View Article