Пример #1
0
        public override AbstractGate Clone()
        {
            int numState = state.Length;
            StatefulTruthTable tt = new StatefulTruthTable(NumberOfInputs, Output.Length, numState);

            // values all look the same, just needed to diff. state to have inputs and outputs
            for (int x = 0; x < values.GetLength(0); x++)
                for (int y = 0; y < values[0].GetLength(0); y++)
                    tt.values[x][y] = values[x][y];
            
            return tt;
        }
Пример #2
0
        public override AbstractGate Clone()
        {
            int numState          = state.Length;
            StatefulTruthTable tt = new StatefulTruthTable(NumberOfInputs, Output.Length, numState);

            // values all look the same, just needed to diff. state to have inputs and outputs
            for (int x = 0; x < values.GetLength(0); x++)
            {
                for (int y = 0; y < values[0].GetLength(0); y++)
                {
                    tt.values[x][y] = values[x][y];
                }
            }

            return(tt);
        }