コード例 #1
0
        public override void Initialize(string name, XmlElement xmlConfig)
        {
            base.Initialize(name, xmlConfig);
            var substrateElements = xmlConfig.GetElementsByTagName("Substrate");

            if (substrateElements.Count != 1)
            {
                throw new ArgumentException("Must be only one substrate element in the xml.");
            }
            _substrate =
                ExperimentUtils.ReadSubstrateFromXml(xmlConfig.GetElementsByTagName("Substrate")[0] as XmlElement, xmlConfig.GetElementsByTagName("SubstrateSettings")[0] as XmlElement);
            _cppnActivationScheme = ExperimentUtils.CreateActivationScheme(xmlConfig, "CPPNActivation");
            _cppnInputLength      = XmlUtils.TryGetValueAsBool(xmlConfig, "CPPNDistanceInput") ?? false;
        }