Exemple #1
0
        public int getAssociatedCategory(F2Neuron f2Neuron)
        {
            int code = -1;

            if (f2Neuron.getMapFieldConnection() != null)
            {
                code = f2Neuron.getMapFieldConnection().getCategory().getCode();
            }
            return(code);
        }
Exemple #2
0
        public MapFieldCategory recallCat(int contextCode, double[] Pattern) //THIS METHOD ASSUMES THAT EACH F2 NODE IS CONNECTED WITH ONLY ONE MAPFIELD NODE
        {
            ARTModule.reSetRho(rho);
            LayerF2 contextNeurons = (LayerF2)ARTModule.contextField[contextCode];

            object[,] artCluster = ARTModule.getCluster(contextCode, Pattern);
            if ((int)artCluster[0, 1] == -1)
            {
                return(null);
            }
            else
            {
                F2Neuron           f2Neuron = (F2Neuron)contextNeurons[(int)artCluster[0, 1]];
                MapFieldConnection mfConn   = f2Neuron.getMapFieldConnection();
                return(mfConn.getCategory());
            }
        }
Exemple #3
0
        //public int recall(int contextCode, double[] Pattern) // THIS METHOD ASSUMES THAT EACH F2 NODE HAS CONNECTIONS WITH ALL MAPFIELD NODES
        //{
        //    ARTModule.reSetRho(rho);
        //    int code = -1; // Don't Know
        //    LayerF2 contextNeurons = (LayerF2)ARTModule.contextField[contextCode];
        //    object [,]artCluster = ARTModule.getCluster(contextCode, Pattern);
        //    if ((int)artCluster[0, 1] == -1)
        //        code = -1;
        //    else
        //    {
        //        F2Neuron f2Neuron = (F2Neuron)contextNeurons[(int)artCluster[0, 1]];
        //        f2Neuron.getMapFieldConnections();
        //        ArrayList mapFieldConnections = f2Neuron.getMapFieldConnections();
        //        IEnumerator mapFieldConnEnum = mapFieldConnections.GetEnumerator();
        //        while (mapFieldConnEnum.MoveNext())
        //        {
        //            MapFieldConnection mapFieldConn = (MapFieldConnection)mapFieldConnEnum.Current;
        //            if (mapFieldConn.getWeight() == 1)
        //            {
        //                MapFieldCategory category = mapFieldConn.getCategory();
        //                code = category.getCode();
        //                //break;
        //            }
        //        }
        //    }
        //       // code = mapField.getAssociatedCategory(contextNeurons, (int)artCluster[0, 1]);
        //    return code;
        //}
        public int recall(int contextCode, double[] Pattern) //THIS METHOD ASSUMES THAT EACH F2 NODE IS CONNECTED WITH ONLY ONE MAPFIELD NODE
        {
            ARTModule.reSetRho(rho);
            int     code           = -1; // Don't Know
            LayerF2 contextNeurons = (LayerF2)ARTModule.contextField[contextCode];

            object[,] artCluster = ARTModule.getCluster(contextCode, Pattern);
            if ((int)artCluster[0, 1] == -1)
            {
                code = -1;
            }
            else
            {
                F2Neuron           f2Neuron = (F2Neuron)contextNeurons[(int)artCluster[0, 1]];
                MapFieldConnection mfConn   = f2Neuron.getMapFieldConnection();
                MapFieldCategory   category = mfConn.getCategory();
                code = category.getCode();
            }
            // code = mapField.getAssociatedCategory(contextNeurons, (int)artCluster[0, 1]);
            return(code);
        }