Analysing seismic-source mechanisms by linear-programming methods