CMACFeatureDatabase.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:DOO-Q_BRACIS2016 作者:
/**
 * Causes the <code>i</code>th tiling in this CMAC to be defined over the given attribute for the given OO-MDP class. Along that
 * dimension, the tiling will have a width of <code>windowSize</code>.
 * @param className the OO-MDP class name for which the provided attribute will be tiled.
 * @param attribute the OO-MDP attribute that will be tiled
 * @param windowSize the width of tilings over the specified attribute and OO-MDP class.
 */
public void addSpecificaitonForTiling(int i, String className, Attribute attribute, double windowSize){

    double bucketBoundary = 0.;
    if(this.arrangement == TilingArrangement.RANDOMJITTER){
        bucketBoundary = rand.nextDouble()*windowSize;
    }
    else if(this.arrangement == TilingArrangement.UNIFORM){
        bucketBoundary = ((double)i / (double)nTilings)*windowSize;
    }
    else{
        throw new RuntimeErrorException(new Error("Unknown CMAC tiling arrangement type"));
    }
    Tiling tiling = tilings.get(i);
    tiling.addSpecification(className, attribute, windowSize, bucketBoundary);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号