realization of simplex method in cpp