Use RowVectorXd instead of VectorXd