MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / activatePrecalculationMode

Method activatePrecalculationMode

src/openms_gui/source/VISUAL/MultiGradient.cpp:222–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220 }
221
222 void MultiGradient::activatePrecalculationMode(double min, double max, UInt steps)
223 {
224 //add security margin to range to avoid numerical problems
225 pre_min_ = std::min(min, max) - 0.000005;
226 pre_size_ = fabs(max - min) + 0.00001;
227 pre_steps_ = steps - 1;
228 pre_.clear();
229 pre_.reserve(steps);
230 for (Size step = 0; step < steps; ++step)
231 {
232 pre_.push_back(interpolatedColorAt(step, 0, pre_steps_));
233 //cout << pre_.back().red() << " " << pre_.back().green() << " " << pre_.back().blue() << endl;
234 }
235 }
236
237 void MultiGradient::deactivatePrecalculationMode()
238 {

Callers 3

Calls 3

clearMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected