Large-amplitude slow oscillation of wedges in inviscid hypersonic and supersonic flows