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)); }
public PrimalGPOnlineMapper(OnlineStackBayesLinReg bayesVecMap, DistBuilder <T> distBuilder) : base(bayesVecMap, distBuilder) { this.bayesSuffMappers = bayesVecMap; }
protected OnlineDistMapper(OnlineVectorMapper suffMapper, DistBuilder <T> distBuilder) : base(suffMapper, distBuilder) { }
// suffMapper must implement IUAwareVectorMapper public UAwareGenericMapper(UAwareVectorMapper suffMapper, DistBuilder <T> distBuilder) : base(suffMapper, distBuilder) { }
protected UAwareDistMapper(UAwareVectorMapper suffMapper, DistBuilder <T> distBuilder) : base(suffMapper, distBuilder) { }
public GenericMapper(VectorMapper suffMapper, DistBuilder <T> distBuilder) { this.suffMapper = suffMapper; this.distBuilder = distBuilder; }