Ejemplo n.º 1
0
        public void Serialize(StreamWriter writer)
        {
            HtmSerializer2 ser = new HtmSerializer2();

            ser.SerializeBegin(nameof(HomeostaticPlasticityController), writer);

            ser.SerializeValue(this.m_MaxPreviousElements, writer);
            // m_HtmMemory is not serialized here. It is assumed to be serialized in the SP;
            ser.SerializeValue(this.m_Cycle, writer);
            ser.SerializeValue(this.m_MinCycles, writer);
            ser.SerializeValue(this.m_RequiredNumOfStableCycles, writer);
            ser.SerializeValue(this.m_NumOfStableCyclesForInput, writer);
            ser.SerializeValue(this.m_NumOfActiveColsForInput, writer);
            ser.SerializeValue(this.m_InOutMap, writer);
            ser.SerializeValue(this.m_IsStable, writer);

            ser.SerializeEnd(nameof(HomeostaticPlasticityController), writer);
        }
        public void Serialize(StreamWriter writer)
        {
            HtmSerializer2 ser = new HtmSerializer2();

            ser.SerializeBegin(nameof(HomeostaticPlasticityController), writer);

            ser.SerializeValue(this.m_RequiredSimilarityThreshold, writer);
            ser.SerializeValue(this.m_MaxPreviousElements, writer);
            ser.SerializeValue(this.m_Cycle, writer);
            ser.SerializeValue(this.m_MinCycles, writer);
            ser.SerializeValue(this.m_RequiredNumOfStableCycles, writer);
            ser.SerializeValue(this.m_NumOfStableCyclesForInput, writer);
            ser.SerializeValue(this.m_NumOfActiveColsForInput, writer);
            ser.SerializeValue(this.m_InOutMap, writer);
            ser.SerializeValue(this.m_IsStable, writer);

            if (this.m_HtmMemory != null)
            {
                this.m_HtmMemory.Serialize(writer);
            }

            ser.SerializeEnd(nameof(HomeostaticPlasticityController), writer);
        }