Lines Matching defs:weights
331 float weights[MAX_EXPRESSION_SPECS];
333 DE_ASSERT(numSpecs <= (int)DE_LENGTH_OF_ARRAY(weights));
335 // Compute weights
337 weights[ndx] = specs[ndx].getWeight(state, valueRange);
340 return &state.getRandom().chooseWeighted<const ExpressionSpec&>(specs, specs+numSpecs, weights);
999 float weights[DE_LENGTH_OF_ARRAY(storages)];
1008 weights[0] = de::max(1.0f-dynWeight, 0.1f);
1009 weights[1] = uniformOk ? dynWeight*0.5f : 0.0f;
1010 weights[2] = dynWeight;
1011 weights[3] = shaderInOk ? dynWeight*2.0f : 0.0f;
1013 state.getVariableManager().setStorage(variable, state.getRandom().chooseWeighted<Variable::Storage>(&storages[0], &storages[DE_LENGTH_OF_ARRAY(storages)], &weights[0]));
1145 // Copy value entries for computing weights.
1147 std::vector<float> weights;
1151 // Compute weights.
1152 weights.resize(availableVars.size());
1154 weights[ndx] = computeEntryReadWeight(availableVars[ndx]->getValueRange(), valueRange);
1157 const ValueEntry* entry = state.getRandom().chooseWeighted<const ValueEntry*>(availableVars.begin(), availableVars.end(), weights.begin());