/// <summary> /// Checks consistency of this reservoir instance configuration and given /// preprocessor's input and reservoir structure configuration /// </summary> /// <param name="inputCfg">Preprocessor's input configuration</param> /// <param name="reservoirStructureCfg">Reservoir structure configuration</param> public void CheckConsistency(InputEncoderSettings inputCfg, ReservoirStructureSettings reservoirStructureCfg) { if (StructureCfgName != reservoirStructureCfg.Name) { throw new InvalidOperationException($"Name of the reservoir structure configuration {StructureCfgName} is not equal to name of given reservoir structure configuration name {reservoirStructureCfg.Name}."); } foreach (InputConnSettings inputConnCfg in InputConnsCfg.ConnCfgCollection) { inputCfg.VaryingFieldsCfg.GetFieldID(inputConnCfg.InputFieldName, true); reservoirStructureCfg.PoolsCfg.GetPoolID(inputConnCfg.PoolName); } return; }
/// <summary> /// Performs an additional consistency check. /// </summary> /// <param name="inputCfg">The configuration of the input encoder.</param> /// <param name="reservoirStructureCfg">The configuration of the reservoir structure.</param> public void CheckConsistency(InputEncoderSettings inputCfg, ReservoirStructureSettings reservoirStructureCfg) { if (StructureCfgName != reservoirStructureCfg.Name) { throw new ArgumentException($"The specified name of the reservoir structure configuration {StructureCfgName} does not correspond.", "StructureCfgName"); } foreach (InputConnSettings inputConnCfg in InputConnsCfg.ConnCfgCollection) { inputCfg.VaryingFieldsCfg.GetFieldID(inputConnCfg.InputFieldName, true); reservoirStructureCfg.PoolsCfg.GetPoolID(inputConnCfg.PoolName); } return; }
//Constructor /// <summary> /// Creates an unitialized instance /// </summary> /// <param name="instanceName">The name of the reservoir instance.</param> /// <param name="structCfg">The name of the reservoir structure configuration.</param> /// <param name="numOfNeurons">The total number of neurons within the reservoir.</param> /// <param name="numOfPredictors">The total number of predictors.</param> public ReservoirStat(string instanceName, ReservoirStructureSettings structCfg, int numOfNeurons, int numOfPredictors ) { InstanceName = instanceName; StructCfgName = structCfg.Name; TotalNumOfNeurons = numOfNeurons; TotalNumOfPredictors = numOfPredictors; Pools = new List <PoolStat>(); foreach (PoolSettings poolCfg in structCfg.PoolsCfg.PoolCfgCollection) { Pools.Add(new PoolStat(poolCfg)); } Synapses = new SynapsesByRoleStat(); NeuronsAnomalies = new NeuronsAnomaliesStat(); return; }
/// <summary> /// The deep copy constructor. /// </summary> /// <param name="source">The source instance.</param> public ReservoirStructureSettings(ReservoirStructureSettings source) : this(source.Name, source.PoolsCfg, source.InterPoolConnectionsCfg) { return; }