Generalized MX(Sparsity,val) constructor, #982