MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / getCol

Method getCol

check/Avgas.cpp:159–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void Avgas::getCol(const HighsInt col, double& cost, double& lower,
160 double& upper, std::vector<HighsInt>& index,
161 std::vector<double>& value) {
162 index.clear();
163 value.clear();
164 lower = 0;
165 upper = 1;
166 if (col == 0) {
167 cost = 0;
168 index.push_back(0);
169 value.push_back(-1);
170 index.push_back(4);
171 value.push_back(-1);
172 index.push_back(6);
173 value.push_back(2);
174 index.push_back(7);
175 value.push_back(5);
176 } else if (col == 1) {
177 cost = -2;
178 index.push_back(0);
179 value.push_back(-1);
180 index.push_back(5);
181 value.push_back(-1);
182 index.push_back(8);
183 value.push_back(1);
184 index.push_back(9);
185 value.push_back(1);
186 } else if (col == 2) {
187 cost = -1;
188 index.push_back(1);
189 value.push_back(-1);
190 index.push_back(4);
191 value.push_back(-1);
192 index.push_back(6);
193 value.push_back(1);
194 index.push_back(7);
195 value.push_back(3);
196 } else if (col == 3) {
197 cost = -3;
198 index.push_back(1);
199 value.push_back(-1);
200 index.push_back(5);
201 value.push_back(-1);
202 index.push_back(8);
203 value.push_back(-1);
204 } else if (col == 4) {
205 cost = -2;
206 index.push_back(2);
207 value.push_back(-1);
208 index.push_back(4);
209 value.push_back(-1);
210 index.push_back(7);
211 value.push_back(-3);
212 } else if (col == 5) {
213 cost = -4;
214 index.push_back(2);
215 value.push_back(-1);
216 index.push_back(5);

Callers 2

testAvgasGetColFunction · 0.45

Calls 2

push_backMethod · 0.80
clearMethod · 0.45

Tested by 1

testAvgasGetColFunction · 0.36