code: public void updateFromModel(FgModel model) {
          initialized = true;
          int numConfigs = this.getVars().calcNumConfigs();
          for (int c=0; c<numConfigs; c++) {
              double dot = getDotProd(c, model);                
              assert !Double.isNaN(dot) && dot != Double.POSITIVE_INFINITY : "Invalid value for factor: " + dot;
              this.setValue(c, dot);
          }
      }
docs: If this factor depends on the model, this method will updates this
  factor's internal representation accordingly.
  
  @param model The model.