Esempio n. 1
0
        //return list of Columns within given radius
        //radius is euclidean distance from centre point.
        //includeCenter - true includes the centre column (for connecting to InputPlane)
        //				  false does NOT include the centre column (for connecting Columns in the same Layer)
        public List <Column> GetColumnsFromCentre(int centreX, int centreY, double radius, bool includeCentre)
        {
            List <Column> result = new List <Column>();

            for (int x = 0; x < NumColumnsX; x++)
            {
                for (int y = 0; y < NumColumnsY; y++)
                {
                    Column col      = Columns[x][y];
                    double distance = Algebra.EuclideanDistance2D(centreX, centreY, col.X, col.Y);

                    if (distance <= radius)
                    {
                        if (distance > 0 || includeCentre == true)                         //include? centre Column
                        {
                            result.Add(col);
                        }
                    }
                }
            }

            return(result);
        }
Esempio n. 2
0
 //update Column InputOverlap
 public void Update_Proximal()
 {
     InputOverlap         = Boost * ProximalDendrite.Update();
     InputOverlap_TimeAve = Algebra.RunningAverage(InputOverlap_TimeAve, InputOverlap, Global.DEFAULT_TIME_AVERAGE_PERIOD);
 }