Example #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);
        }
Example #2
0
        public CrowNetSOM2DUP Duplicate()
        {
            CrowNetSOM2DUP dup = new CrowNetSOM2DUP(netType, layerWidth, layerHeight, isCircularRows, isCircularColumns, latticeTopology, neighborhood, neighborDistance, learningRate);

            return(dup);
        }