Esempio n. 1
0
        public new static KDistProduct2 <T1, T2> FromMatlabStruct(MatlabStruct s)
        {
//			s = struct();
//			s.className=class(this);
//			kcount = length(this.kernels);
//			kerCell = cell(1, kcount);
//			for i=1:kcount
//					kerCell{i} = this.kernels{i}.toStruct();
//			end
//			s.kernels = kerCell;

            string className = s.GetString("className");

            if (!className.Equals(MATLAB_CLASS))
            {
                throw new ArgumentException("The input does not represent a " + typeof(KDistProduct2 <T1, T2>));
            }
            MatlabStruct[,] kerStructs = s.GetStructCells("kernels");

            Kernel <T1> k1 = KDist <T1> .FromMatlabStruct(kerStructs[0, 0]);

            Kernel <T2> k2 = KDist <T2> .FromMatlabStruct(kerStructs[0, 1]);

            return(new KDistProduct2 <T1, T2>(k1, k2));
        }