예제 #1
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            GH_Integer i1 = new GH_Integer();                    /// layerWidth
            GH_Integer i2 = new GH_Integer();                    /// layerHeight

            if (!DA.GetData(0, ref i1))
            {
                return;
            }
            if (!DA.GetData(1, ref i2))
            {
                return;
            }
            if (!DA.GetData(2, ref isCircularRows))
            {
                return;
            }
            if (!DA.GetData(3, ref isCircularColumns))
            {
                return;
            }
            if (!DA.GetData(4, ref latticeTopology))
            {
                return;
            }
            if (!DA.GetData(5, ref neighborhood))
            {
                return;
            }
            if (!DA.GetData(6, ref neighborDistance))
            {
                return;
            }
            if (!DA.GetData(7, ref learningRate))
            {
                return;
            }


            i1.CastTo <int>(out layerWidth);
            i2.CastTo <int>(out layerHeight);

            CrowNetSOM2DUP NetUP = new CrowNetSOM2DUP("som", layerWidth, layerHeight, isCircularRows, isCircularColumns, latticeTopology, neighborhood, neighborDistance, learningRate);

            DA.SetData(0, NetUP);
        }
예제 #2
0
파일: CrowNetUP.cs 프로젝트: substage/Crow
        public CrowNetSOM2DUP Duplicate()
        {
            CrowNetSOM2DUP dup = new CrowNetSOM2DUP(netType, layerWidth, layerHeight, isCircularRows, isCircularColumns, latticeTopology, neighborhood, neighborDistance, learningRate);

            return(dup);
        }