예제 #1
0
        public SmartInterpolationBox(HyperBox <SummaryType> boundary, INumerifier <SummaryType> scoreHandler, int depthFromRoot = 0)
        {
            //int i;
            this.scoreHandler      = scoreHandler;
            this.currentBoundary   = boundary;
            this.observedBoundary  = null;
            this.splitDimension    = -1;
            this.datapoints        = new List <IDatapoint <SummaryType> >();
            this.pendingDatapoints = new List <IDatapoint <SummaryType> >();
            this.itemSummary       = scoreHandler.Default();
            this.depthFromRoot     = depthFromRoot;
#if MIN_SPLIT_COUNTS
            this.minSplitCounts = new int[boundary.NumDimensions];
#endif
#if CACHE_STDDEV
            this.inputs = new Distribution[boundary.NumDimensions];
            for (i = 0; i < this.inputs.Length; i++)
            {
                this.inputs[i] = new Distribution();
            }
#endif
        }
 public SimpleInterpolationBox(HyperBox <ScoreType> boundary, List <int> dimensionSplitOrder, int dimToSort, INumerifier <ScoreType> scoreHandler)
 {
     this.scoreHandler      = scoreHandler;
     this.currentBoundary   = boundary;
     this.observedBoundary  = null;
     this.dimensionsToSplit = dimensionSplitOrder;
     //this.datapointsByInput = new StatList<Datapoint, Datapoint>(new DatapointComparer(dimToSort), this);
     this.unpropogatedDatapoints = new List <IDatapoint <ScoreType> >(0);
     this.dimensionToSort        = dimToSort;
     this.numDatapoints          = 0;
     this.splitDimension         = dimensionSplitOrder.First();
     this.depthFromLeaves        = 0;
     //this.splitDimension_inputs = new Distribution();
 }
 // SummaryType is the type of object to put in each box (it's a summary of the datapoints that the box represents)
 public AdaptiveLinearInterpolator(HyperBox <SummaryType> inputBoundary, INumerifier <SummaryType> itemCombiner)
 {
     this.itemCombiner = itemCombiner;
     this.root         = new SmartInterpolationBox <SummaryType>(inputBoundary, itemCombiner);
 }