Example #1
0
        // return the expected number of incoming messages
        // negative for any number.
        //		public abstract int NumInputMessages();

        // Load a FeatureMap in Matlab represented by the input
        // All FeatureMap objects can be serialized to struct with .toStruct()
        public static VectorMapper FromMatlabStruct(MatlabStruct s)
        {
            string       className = s.GetString("className");
            VectorMapper map       = null;

            if (className.Equals("RandFourierGaussMVMap"))
            {
                map = RFGMVMap.FromMatlabStruct(s);
            }
            else if (className.Equals("CondFMFiniteOut"))
            {
                map = CondFMFiniteOut.FromMatlabStruct(s);
            }
//			else if(className.Equals("CondCholFiniteOut")){
//				map = CondCholFiniteOut.FromMatlabStruct(s);
//			}
            else if (className.Equals(RFGJointKGG.MATLAB_CLASS))
            {
                map = RFGJointKGG.FromMatlabStruct(s);
            }
            else if (className.Equals(StackVectorMapper.MATLAB_CLASS))
            {
                map = StackVectorMapper.FromMatlabStruct(s);
            }
            else if (className.Equals(BayesLinRegFM.MATLAB_CLASS))
            {
                map = BayesLinRegFM.FromMatlabStruct(s);
            }
            else if (className.Equals(UAwareVectorMapper.MATLAB_CLASS))
            {
                map = UAwareVectorMapper.FromMatlabStruct(s);
            }
            else if (className.Equals(UAwareStackVectorMapper.MATLAB_CLASS))
            {
                map = UAwareStackVectorMapper.FromMatlabStruct(s);
            }
            else
            {
                throw new ArgumentException("Unknown className: " + className);
            }
            //			else if(className.Equals("RFGSumEProdMap")){
            //
            //			}else if(className.Equals("RFGEProdMap")){
            //
            //			}else if(className.Equals("RFGJointEProdMap")){
            //
            //			}else if(className.Equals("RFGProductEProdMap")){
            //
            //			}
            return(map);
        }
Example #2
0
        public static RandomFeatureMap FromMatlabStruct(MatlabStruct s)
        {
            string           className = s.GetString("className");
            RandomFeatureMap map       = null;

            if (className.Equals(RFGJointKGG.MATLAB_CLASS))
            {
                map = RFGJointKGG.FromMatlabStruct(s);
            }
            else
            {
                throw new ArgumentException("Unknown className: " + className);
            }
            //			else if(className.Equals("RFGSumEProdMap")){
            //
            //			}else if(className.Equals("RFGEProdMap")){
            //
            //			}else if(className.Equals("RFGJointEProdMap")){
            //
            //			}else if(className.Equals("RFGProductEProdMap")){
            //
            //			}
            return(map);
        }