function x = lupSolve(b,l,u,p)
% function x = lupSolve(b,l,u,p)
%
% given an lup factorization, applies it to solve for x
%
% Daniel A. Spielman, Yale University

bp = b(p);
yp = l \ bp;
xp = u \ yp;
x(p) = xp;
x = x(:);
