Basis- and tripartition identification for quadratic programming and lineair complementary problems; From an interior solution to an optimal basis and viceversa