def test_002_fsm (self): I = 2 S = 4 O = 4 NS = (0, 2, 0, 2, 1, 3, 1, 3) OS = (0, 3, 3, 0, 1, 2, 2, 1) f = trellis.fsm(I,S,O,NS,OS) g = trellis.fsm(f) self.assertEqual((g.I(),g.S(),g.O(),g.NS(),g.OS()),(f.I(),f.S(),f.O(),f.NS(),f.OS()))
def test_001_viterbi(self): """ Runs some coding/decoding tests with a few different FSM specs. """ for name, args in fsm_args.items(): constellation = constells[args[2]] fsms = trellis.fsm(*args) noise = 0.1 tb = trellis_tb(constellation, fsms, noise) tb.run() # Make sure all packets succesfully transmitted. self.assertEqual(tb.dst.ntotal(), tb.dst.nright())
def test_004_fsm(self): """ Test to make sure fsm works with a single state fsm.""" # Just checking that it initializes properly. f = trellis.fsm(*fsm_args["rep2"])
def test_002_fsm(self): f = trellis.fsm(*fsm_args["awgn1o2_4"]) g = trellis.fsm(f) self.assertEqual((g.I(), g.S(), g.O(), g.NS(), g.OS()), (f.I(), f.S(), f.O(), f.NS(), f.OS()))
def test_001_fsm(self): f = trellis.fsm(*fsm_args["awgn1o2_4"]) self.assertEqual(fsm_args["awgn1o2_4"], (f.I(), f.S(), f.O(), f.NS(), f.OS()))
def test_002_fsm (self): f = trellis.fsm(*fsm_args["awgn1o2_4"]) g = trellis.fsm(f) self.assertEqual((g.I(),g.S(),g.O(),g.NS(),g.OS()),(f.I(),f.S(),f.O(),f.NS(),f.OS()))
def test_001_fsm (self): f = trellis.fsm(*fsm_args["awgn1o2_4"]) self.assertEqual(fsm_args["awgn1o2_4"],(f.I(),f.S(),f.O(),f.NS(),f.OS()))