added support code and refactoring to make the infastructure for fastlda possible, specifically argsorts per vertex