public override List <KeyValuePair <long, long> > Decode(MemoryLine m, List <KeyValuePair <int, int> > currentMask)
        {
            var results = new List <KeyValuePair <long, long> >();

            int[] value = LongToBits(m.InputValue);

            var v = PutMask(value, currentMask);

            results.Add(new KeyValuePair <long, long>(m.Position, v));

            return(results);
        }
        private void ProcessMemoryLine(MemoryLine m)
        {
            foreach (var decoder in decoders)
            {
                var results = decoder.Decode(m, currentMask);

                foreach (var result in results)
                {
                    memory[result.Key] = result.Value;
                }
            }
        }
예제 #3
0
        public override List <KeyValuePair <long, long> > Decode(MemoryLine m, List <KeyValuePair <int, int> > currentMask)
        {
            var values = CreatePositions(m.Position, currentMask);

            return(values.Select(x => new KeyValuePair <long, long>(x, m.InputValue)).ToList());
        }
예제 #4
0
 public abstract List <KeyValuePair <long, long> > Decode(MemoryLine m, List <KeyValuePair <int, int> > currentMask);