Replaced array reverse in getLatentOrdering with method from Apache
Commons Lang.