Lines Matching full: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);
974 float weights[DE_LENGTH_OF_ARRAY(storages)];
983 weights[0] = de::max(1.0f-dynWeight, 0.1f);
984 weights[1] = uniformOk ? dynWeight*0.5f : 0.0f;
985 weights[2] = dynWeight;
986 weights[3] = shaderInOk ? dynWeight*2.0f : 0.0f;
988 state.getVariableManager().setStorage(variable, state.getRandom().chooseWeighted<Variable::Storage>(&storages[0], &storages[DE_LENGTH_OF_ARRAY(storages)], &weights[0]));
1120 // Copy value entries for computing weights.
1122 std::vector<float> weights;
1126 // Compute weights.
1127 weights.resize(availableVars.size());
1129 weights[ndx] = computeEntryReadWeight(availableVars[ndx]->getValueRange(), valueRange);
1132 const ValueEntry* entry = state.getRandom().chooseWeighted<const ValueEntry*>(availableVars.begin(), availableVars.end(), weights.begin());