Correspondence between discrete and piecewise linear models of gene regulatory networks