public void addExperiment(final String expName,final String definition,final int segments){
  verifyChangesAllowed();
  final ExperimentConfig expDef=allExpDefs.get(definition);
  checkArgument(expDef != null,"reference to undefined experiment %s",definition);
  final Collection<Integer> usedSegments=allocateSegments(segments,expName);
  final String expSalt=format("%s.%s",StringUtils.defaultString(salt,this.name),expName);
  final Experiment exp=new Experiment(expName,expSalt,expDef,usedSegments);
  final Experiment existingExp=activeExperiments.put(expName,exp);
  checkArgument(existingExp == null,"duplicate experiment name %s",expName);
  for (  Integer segment : usedSegments) {
    allocationMap[segment]=exp;
  }
}

public void addExperiment ( final String expName , final String definition , final int segments ) { verifyChangesAllowed ( ) ; final ExperimentConfig expDef = allExpDefs . get ( definition ) ; checkArgument ( expDef != null , "reference to undefined experiment %s" , definition ) ; final Collection < Integer > usedSegments = allocateSegments ( segments , expName ) ; final String expSalt = format ( "%s.%s" , StringUtils . defaultString ( salt , this . name ) , expName ) ; final Experiment exp = new Experiment ( expName , expSalt , expDef , usedSegments ) ; final Experiment existingExp = activeExperiments . put ( expName , exp ) ; checkArgument ( existingExp == null , "duplicate experiment name %s" , expName ) ; for ( Integer segment : usedSegments ) { allocationMap [ segment ] = exp ; } }
instantiates an experiment with a given name and number of segments .
