docs: public void calc(int numLabels){
  		//计算最大阶
  		int numTemplets = size();
  		this.orders = new int[numTemplets];
  		for(int j=0; j<numTemplets; j++) {
  			Templet t = get(j);
  			this.orders[j] = t.getOrder();
  			if (orders[j] > maxOrder)
  				maxOrder = orders[j];
  		}
  		
  		base = new int[maxOrder+2];
  		base[0]=1;
  		for(int i=1; i<base.length; i++) {
  			base[i]=base[i-1]*numLabels;
  		}
  		this.numStates = base[maxOrder+1];
  		offset = new int[numTemplets][numStates];
  		
  		for(int t=0; t<numTemplets; t++) {
  			Templet tpl =  this.get(t);
  			int[] vars = tpl.getVars();
  			/**
  			 * 记录每一阶的状态
  			 */
  			int[] bits = new int[maxOrder+1];
  			int v;
  			for(int s=0; s<numStates; s++) {
  				int d = s;
  				//对于一个n阶状态组合，计算每个成员状态
  				for(int i=0; i<maxOrder+1; i++) {
  					bits[i] = d%numLabels;
  					d = d/numLabels;
  				}
  				//对于一个n阶状态组合，记录一个特征模板映射到特征空间中到基地址的偏移
  				//TODO 是否可以和上面合并简化
  				v = 0;						
  				for(int i=0; i<vars.length; i++) {
  					v = v*numLabels + bits[-vars[i]];
  				}
  				offset[t][s] = v;
  			}
  		}
  	}