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

Method reIndex

highs/util/HVectorBase.cpp:124–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122
123template <typename Real>
124void HVectorBase<Real>::reIndex() {
125 /*
126 * Possibly determine the indices from scratch by passing through
127 * the array
128 */
129 // Don't do it if there are relatively few nonzeros
130 if (count >= 0 && count <= size * 0.1) return;
131 count = 0;
132 for (HighsInt i = 0; i < size; i++)
133 if ((double)array[i]) index[count++] = i;
134}
135
136template <typename Real>
137template <typename FromReal>

Callers 2

ftranCallMethod · 0.80
btranCallMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected