Algorithm 837: AMD, an approximate minimum degree ordering algorithm