示例#1
0
 public void Bind(object pArgument)
 {
     if (pArgument is softMaxFunctionArguments)
     {
         softMaxFunctionArguments arg = (softMaxFunctionArguments)pArgument;
         inrsBandsCoef = arg.InRasterCoefficients;
         outrs         = arg.OutRaster;
         xVls          = new double[((IRasterBandCollection)inrsBandsCoef).Count];
         //Console.WriteLine("Number of Bands in outrs = " + ((IRasterBandCollection)outrs).Count.ToString());
         lm = arg.LogitModel;
         myFunctionHelper.Bind(outrs);
         myFunctionHelperCoef.Bind(inrsBandsCoef);
         myRasterInfo = myFunctionHelper.RasterInfo;
         myPixeltype  = myRasterInfo.PixelType;
         myValidFlag  = true;
     }
     else
     {
         throw new System.Exception("Incorrect arguments object. Expected: plrFunctionArguments");
     }
 }
 public IFunctionRasterDataset calcSoftMaxNnetFunction(object inRaster, Statistics.dataPrepSoftMaxPlr sm)
 {
     IFunctionRasterDataset rRst = createIdentityRaster(inRaster);
     string tempAr = funcDir + "\\" + FuncCnt + ".afr";
     IFunctionRasterDataset frDset = new FunctionRasterDatasetClass();
     IFunctionRasterDatasetName frDsetName = new FunctionRasterDatasetNameClass();
     frDsetName.FullName = tempAr;
     frDset.FullName = (IName)frDsetName;
     IRasterFunction rsFunc = new FunctionRasters.softMaxFunctionDataset();
     FunctionRasters.softMaxFunctionArguments args = new FunctionRasters.softMaxFunctionArguments(this);
     args.InRasterCoefficients = rRst;
     args.LogitModel = sm;
     frDset.Init(rsFunc, args);
     return frDset;
 }