The generalized inverse of a nonnegative matrix