コード例 #1
0
        public new static GenericMapper <T> FromMatlabStruct(MatlabStruct s)
        {
            string className = s.GetString("className");

            if (!(className.Equals(MATLAB_CLASS) ||
                  className.Equals(UAwareGenericMapper <T> .MATLAB_CLASS)))
            {
                throw new ArgumentException("The input does not represent a " +
                                            typeof(GenericMapper <T>));
            }
            // nv = number of variables.
//			int inVars = s.GetInt("nv");
            MatlabStruct    rawOperator     = s.GetStruct("operator");
            VectorMapper    instancesMapper = VectorMapper.FromMatlabStruct(rawOperator);
            MatlabStruct    rawBuilder      = s.GetStruct("distBuilder");
            DistBuilder <T> distBuilder     = DistBuilderBase.FromMatlabStruct(rawBuilder)
                                              as DistBuilder <T>;

            return(new GenericMapper <T>(instancesMapper, distBuilder));
        }
コード例 #2
0
 public PrimalGPOnlineMapper(OnlineStackBayesLinReg bayesVecMap,
                             DistBuilder <T> distBuilder)
     : base(bayesVecMap, distBuilder)
 {
     this.bayesSuffMappers = bayesVecMap;
 }
コード例 #3
0
 protected OnlineDistMapper(OnlineVectorMapper suffMapper,
                            DistBuilder <T> distBuilder)
     : base(suffMapper, distBuilder)
 {
 }
コード例 #4
0
 // suffMapper must implement IUAwareVectorMapper
 public UAwareGenericMapper(UAwareVectorMapper suffMapper,
                            DistBuilder <T> distBuilder)
     : base(suffMapper, distBuilder)
 {
 }
コード例 #5
0
 protected UAwareDistMapper(UAwareVectorMapper suffMapper,
                            DistBuilder <T> distBuilder) : base(suffMapper, distBuilder)
 {
 }
コード例 #6
0
 public GenericMapper(VectorMapper suffMapper, DistBuilder <T> distBuilder)
 {
     this.suffMapper  = suffMapper;
     this.distBuilder = distBuilder;
 }