setWeightOfContagiousness method

void setWeightOfContagiousness(
  1. int index,
  2. double weightOfContagiousness
)

Implementation

void setWeightOfContagiousness(int index, double weightOfContagiousness) {
  if (!(index >= 0 && index < 3)) {
    throw ArgumentError("index must be in [0,2]");
  }
  weightsOfContagiousness!.insert(index, weightOfContagiousness);
}