added possibility to re-use the already decomposed matrix B in the generalized problem Added respective test