// Constructors
        public SimpleNetworkTrainer(BackPropagationNetwork BPN, DataSet DS)
        {
            network    = BPN;  dataSet = DS;
            idx        = new Permutator(dataSet.Size);
            iterations = 0;

            errorHistory = new List <double>();
        }
        public void Initialize()
        {
            iterations = 0;

            if (idx == null)
            {
                idx = new Permutator(dataSet.Size);
            }
            else
            {
                idx.Permute(dataSet.Size);
            }

            if (errorHistory == null)
            {
                errorHistory = new List <double>();
            }
            else
            {
                errorHistory.Clear();
            }
        }