    001    package calhoun.analysis.crf.features.interval13;
    002
    003    import calhoun.analysis.crf.CacheStrategySpec;
    004    import calhoun.analysis.crf.FeatureManagerNodeBoundaries;
    005    import calhoun.analysis.crf.CacheStrategySpec.CacheStrategy;
    006
    007
    008    public class ReferenceBasePredictorZeroPadInterval13 extends ReferenceBasePredictorInterval13Base implements FeatureManagerNodeBoundaries<Character> {
    009
    010            private static final long serialVersionUID = -1104446043334637758L;
    011
    012            public ReferenceBasePredictorZeroPadInterval13() {
    013            }
    014
    015            @Override
    016            public CacheStrategySpec getCacheStrategy() {
    017
    018                    CacheStrategySpec css = new CacheStrategySpec(CacheStrategy.DENSE_NODE_BOUNDARY);
    019                    CacheStrategySpec.DenseBoundaryCachingDetails details = new CacheStrategySpec.DenseBoundaryCachingDetails(9); // we will use 9 tables
    020
    021                    // state, table, featureIx, rightPad, leftPad
    022                    // If you want to debug and verify equality with the Markov case, then set all the pads to zero as below:
    023
    024                    details.add(0,0,startIx + (multipleFeatures ? 0 : 0),0,0);
    025                    details.add(1,1,startIx + (multipleFeatures ? 1 : 0),0,0);
    026                    details.add(2,2,startIx + (multipleFeatures ? 1 : 0),0,0);
    027                    details.add(3,3,startIx + (multipleFeatures ? 1 : 0),0,0);
    028                    details.add(4,4,startIx + (multipleFeatures ? 2 : 0),0,0);
    029                    details.add(5,4,startIx + (multipleFeatures ? 2 : 0),0,0);
    030                    details.add(6,4,startIx + (multipleFeatures ? 2 : 0),0,0);
    031                    details.add(7,5,startIx + (multipleFeatures ? 3 : 0),0,0);
    032                    details.add(8,6,startIx + (multipleFeatures ? 3 : 0),0,0);
    033                    details.add(9,7,startIx + (multipleFeatures ? 3 : 0),0,0);
    034                    details.add(10,8,startIx + (multipleFeatures ? 4 : 0),0,0);
    035                    details.add(11,8,startIx + (multipleFeatures ? 4 : 0),0,0);
    036                    details.add(12,8,startIx + (multipleFeatures ? 4 : 0),0,0);
    037
    038                    details.check();
    039
    040                    css.details = details;
    041
    042                    return css;
    043            }
    044    }