I’m developing a linear solver for an optimization solver that requires a scaled constraint matrix. I am solving an LP, so the constraint matrix is constant. I would like to be able to scale the constraints within the optimization solver, so each row in the matrix has norm 1. Currently I’m doing it within the linear solver

foreach(normalize!,eachrow(A))

I would like to be doing this in JuMP instead so it only needs to be done once. Is there an efficient way to do this?

Thanks, I have already done some tests with some “offline” linear systems pulled from optimization problems, and this seemed best.

Normalizing in JuMP seemed most natural, because I’m not actually changing the underlying optimization problem (as long as I divide the RHS as well). I’ll do it within the solver then