Each political party in the state desiring to select delegates to attend a quadrennial national nominating convention of the party to select a nominee for the office of President of the United States shall hold a preferential primary election in the state, and the delegates to the national party convention shall be apportioned to the presidential candidates whose names were on the ballot at the preferential primary or to “uncommitted” in the proportion that the votes cast for each candidate or for “uncommitted” bear to the total votes cast at the election, rounded to the closest whole number.