Example #1
0
        //create Proximal connections from this Column to Columns in Input Layer/Plane
        public void CreateProximalSynapses(Layer lr, Layer ip, double radius, double zoneCoveragePerc)
        {
            //scale layer locations	to InputPlane
            lr.MapPoint(X, Y, ip, out int scaledX, out int scaledY);

            //create random list of columns to connect - Inclusive of centre
            List <Column> potentialColumns = ip.GetColumnsFromCentre(scaledX, scaledY, radius, true);

            ProximalDendrite.CreateSynapses(potentialColumns, zoneCoveragePerc);
        }
Example #2
0
        public int CalcNumProximalSynapsesToCreate(Layer lr, InputPlane ip, double zoneSizePerc, double zoneCoveragePerc)
        {
            //calculate number of connections that will be created - Proximal
            double radius = ip.CalcRadius(zoneSizePerc);

            //scale between InputPlane and Layer location positions
            int scaledX, scaledY;

            lr.MapPoint(X, Y, ip, out scaledX, out scaledY);

            List <Column> potentialColumns = ip.GetColumnsFromCentre(scaledX, scaledY, radius, true);
            int           numToConnect     = (int)(potentialColumns.Count * zoneCoveragePerc);

            return(numToConnect);
        }