corresponds to version 3.3.7 from upstream plus some modifications to enable transposed and adjoint solve for Eigen::SparseLU