public void Modulo3FilterTestIntermediate() { int[] input = { 0, 1220, -20 }; int[] expected = Modulo3Filter.modulo3s(input); int[] output = { 0, 2, -2 }; CollectionAssert.AreEqual(expected, output); }
public void Modulo3FilterTestSimple() { int[] input = { 7, 2, 8, 3, 9, 4, 10, 5, 11, 6 }; int[] expected = Modulo3Filter.modulo3s(input); int[] output = { 1, 2, 2, 0, 0, 1, 1, 2, 2, 0 }; CollectionAssert.AreEqual(expected, output); }
public void Modulo3FilterSimple() { int[] input = { 7, 2, 8, 3, 9, 4, 10, 5, 11, 6 }; int[] output = Modulo3Filter.moduloInput(input); int[] expected = { 1, 2, 2, 0, 0, 1, 1, 2, 2, 0 }; foreach (var o in output) { Debug.Log(o); } CollectionAssert.AreEqual(expected, output); }
public void Modulo3FilterNegVal() { int[] input = { 0, -7, -9999999, -1234567 }; int[] output = Modulo3Filter.moduloInput(input); int[] expected = { 0, 2, 0, 2 }; foreach (var o in output) { Debug.Log(o); } CollectionAssert.AreEqual(expected, output); }
public static int[] combinedFilter(int[] xs) { return(Modulo3Filter.moduloInput(CubeFilter.cubes(xs))); }
public static int[] combinedFilter(int[] xs) { return(RunningTotal.adder(Modulo3Filter.modulo3s(xs))); }