function pivotedLine (x, slope) { return (1 + (slope * (x - 3))) } function hingedLine (x, slope) { return (1 + slope * (x - 3)) } function coqualmoLine (x, slope) { return (1 + slope * (x - 3)) } function em2effort(key, project) { return pivotedLine(project[getRating(key)], project[getEffortSlope(key)]) } function em2rin(key, project) { return pivotedLine(project[getRating(key)], project[getReqSlope(key)]) } function em2din(key, project) { return pivotedLine(project[getRating(key)], project[getDesignSlope(key)]) } function em2cin(key, project) { return pivotedLine(project[getRating(key)], project[getCodeSlope(key)]) } function sf2effort(key, project) { return hingedLine(project[getRating(key)], project[getEffortSlope(key)]) } function sf2rin(key, project) { return hingedLine(project[getRating(key)], project[getReqSlope(key)]) } function sf2din(key, project) { return hingedLine(project[getRating(key)], project[getDesignSlope(key)]) } function sf2cin(key, project) { return hingedLine(project[getRating(key)], project[getCodeSlope(key)]) } function dr2rout(key, project) { return coqualmoLine(project[getRating(key)], project[getReqSlope(key)]) } function dr2dout(key, project) { return coqualmoLine(project[getRating(key)], project[getDesignSlope(key)]) } function dr2cout(key, project) { return coqualmoLine(project[getRating(key)], project[getCodeSlope(key)]) } #for all attributes, look up attr range in model, pick a tuning within that range function getTunings(project, model, indx,keys,key,slope) { split(model[getKeys()], keys, " ") for (indx in keys) { key = keys[indx] print "dbg2: " model[getEffort##]##THE BELOW MAKES NO SENSE project[getEffortSlope(key)] = \ pickRange( \ model[getRangeMin(model[getEffortSlope(key)])], model[getRangeMax(model[getEffortSlope(key)])]) project[getReqSlope(key)] = \ pickRange( \ model[getRangeMin(model[getReqSlope(key)])], model[getRangeMax(model[getReqSlope(key)])]) project[getDesignSlope(key)] = \ pickRange( \ model[getRangeMin(model[getDesignSlope(key)])], model[getRangeMax(model[getDesignSlope(key)])]) project[getCodeSlope(key)] = \ pickRange( \ model[getRangeMin(model[getCodeSlope(key)])], model[getRangeMax(model[getCodeSlope(key)])]) } }