Assume 2 n x n matrices A and B are known before hand and any precomputation can be done on them. Is there an efficient way to solve a set of linear problems: (A+w1 B) x1 = y1, (A+w2 B) x2 = y2, ... where w1, w2, ... are diagonal matrices (weights of a set of constraints), x1, x2, ... are unknown vectors and y1, y2, ... are right hand side vectors.
If w1 = w2 = ... = w, then we can LU decompose (A+w B) and simply solve for all (x, y) pairs. Now the problem is that w1, w2, ... are different. So do I have to solve each problem individually or is there a more efficient way?