Creates a least-squares solver.
LeastSquaresSolver(this.x, this.y, this.w) : assert(x.length == y.length), assert(y.length == w.length);