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

Method minimum

src/backend/core/column/Column.cpp:1777–1790  ·  view source on GitHub ↗

! * calculates the minimal value in the column. * for \c count = 0, the minimum of all elements is returned. * for \c count > 0, the minimum of the first \p count elements is returned. * for \c count < 0, the minimum of the last \p count elements is returned. */

Source from the content-addressed store, hash-verified

1775 * for \c count < 0, the minimum of the last \p count elements is returned.
1776 */
1777double Column::minimum(int count) const {
1778 if (count == 0 && d->available.min)
1779 return d->statistics.minimum;
1780 else {
1781 int startIndex = 0, endIndex = rowCount() - 1;
1782
1783 if (count > 0)
1784 endIndex = std::min(rowCount() - 1, count - 1);
1785 else if (count < 0)
1786 startIndex = std::max(rowCount() - count, 0);
1787
1788 return minimum(startIndex, endIndex);
1789 }
1790}
1791
1792/*!
1793 * \brief Column::minimum

Callers 12

doubleMinimumMethod · 0.45
integerMinimumMethod · 0.45
bigIntMinimumMethod · 0.45
testRange01Method · 0.45
testRange02Method · 0.45
testRange03Method · 0.45
testRange04Method · 0.45
testRange05Method · 0.45
testPlottingMethod · 0.45

Calls 2

rowCountFunction · 0.85
dataClass · 0.85

Tested by 12

doubleMinimumMethod · 0.36
integerMinimumMethod · 0.36
bigIntMinimumMethod · 0.36
testRange01Method · 0.36
testRange02Method · 0.36
testRange03Method · 0.36
testRange04Method · 0.36
testRange05Method · 0.36
testPlottingMethod · 0.36