MCPcopy Create free account
hub / github.com/LiangliangNan/PolyFit / add_coefficient

Method add_coefficient

code/math/linear_program.cpp:201–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199
200
201void LinearExpression::add_coefficient(int var_index, double coeff) {
202 if (coefficients_.find(var_index) == coefficients_.end())
203 coefficients_[var_index] = coeff;
204 else
205 coefficients_[var_index] += coeff;
206}
207
208double LinearExpression::solution_value(bool rounded /* = false*/) const {
209 double solution = 0.0;

Callers 4

optimizeMethod · 0.80
FOR_EACH_FACETFunction · 0.80
re_orientMethod · 0.80
loadMethod · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected