MCPcopy Create free account
hub / github.com/KDE/labplot / run

Method run

src/frontend/matrix/MatrixFunctionDialog.cpp:160–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 }
159
160 void run() override {
161 const int rows = m_matrixData[m_startCol].size();
162 double x = m_xStart;
163 double y = m_yStart;
164 DEBUG("FILL col" << m_startCol << "-" << m_endCol << " x/y =" << x << '/' << y << " steps =" << m_xStep << '/' << m_yStep << " rows =" << rows)
165
166 Parsing::parser_var vars[] = {{"x", x}, {"y", y}};
167 Parsing::Parser parser(true);
168 for (int col = m_startCol; col < m_endCol; ++col) {
169 vars[0].value = x;
170 for (int row = 0; row < rows; ++row) {
171 vars[1].value = y;
172 double z = parser.parse_with_vars(m_func, vars, 2, qPrintable(QLocale().name()));
173 // DEBUG(" z =" << z);
174 m_matrixData[col][row] = z;
175 y += m_yStep;
176 }
177
178 y = m_yStart;
179 x += m_xStep;
180 }
181 }
182
183private:
184 int m_startCol;

Callers

nothing calls this directly

Calls 3

parse_with_varsMethod · 0.80
sizeMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected