Basis- and partition identification for quadratic programming and linear complementarity problems