public void TestPredictWithPrevs() { LinearPosePredicter pred = new LinearPosePredicter(); pred.AddPoseData(1, new Pose(new Vector3(1, 1, 1), new Vector3())); pred.AddPoseData(2, new Pose(new Vector3(2, 2, 2), new Vector3())); float[] output = pred.PredictPoseAt(3); float[] expected = new float[] { 1, 1, 1, 0, 0, 0 }; Assert.AreEqual(expected, output); expected = new float[] { 3, 3, 3, 0, 0, 0 }; Assert.AreEqual(expected, pred.PredictPoseAt(5)); }
public void TestPredict() { LinearPosePredicter pred = new LinearPosePredicter(); float[] output = pred.PredictPoseAt(1); Assert.AreEqual(new float[] { 0, 0, 0, 0, 0, 0 }, output); }
public void TestInvalidTimeStamp2() { LinearPosePredicter pred = new LinearPosePredicter(); pred.AddPoseData(1, new Pose(new Vector3(1, 1, 1), new Vector3())); pred.AddPoseData(2, new Pose(new Vector3(2, 2, 2), new Vector3())); Assert.Throws <ArgumentException>(() => pred.PredictPoseAt(0)); }