public override Instance Generate(int size) { SMInstance sm = new SMInstance(this.Name, size); for (int i = 0; i < sm.Size; i++) { Utilities.Util.Permute<int>(sm.MPrefMatrix[i]); Utilities.Util.Permute<int>(sm.WPrefMatrix[i]); } sm.BuildRankMatrices(); return sm; }
public override Instance Generate(int size) { SMInstance sm = new SMInstance(this.Name, size); // Compute shifts for each preference list. This takes advantage of the initialization // to the identify. for (int i = 1; i < size; i++) { Utilities.Util.LeftShift<int>(sm.WPrefMatrix[i - 1], i); Utilities.Util.LeftShift<int>(sm.MPrefMatrix[i], i); } sm.BuildRankMatrices(); return sm; }