QwtCurveFitter(3)

πŸ’– QwtCurveFitter(3) β€” like, the mother of all curve fitters πŸ’–

okay bestie, settle in, because this one's from the Qwt User's Guide manual and it's genuinely the blueprint of the whole curve-fitting family 🌸


✨ NAME ✨

QwtCurveFitter β€” the abstract base class for a curve fitter. yes. abstract. it's giving "i don't do the work, my children do" main character energy πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <qwt_curve_fitter.h>

Inherited by QwtPolarFitter, QwtSplineCurveFitter, and QwtWeedingCurveFitter β€” those three are the nepo babies that actually implement stuff, and we love them for it 🫢

πŸŽ€ Public Types

  • enum Mode { Polygon, Path } β€” the preferred mode of the fitting algorithm. like, what format does your fitter vibe with ✨

πŸŽ€ Public Member Functions

  • virtual ~QwtCurveFitter () β€” Destructor. say bye πŸ‘‹
  • Mode mode () const β€” tells you which mode it prefers
  • virtual QPolygonF fitCurve (const QPolygonF &polygon) const =0 β€” pure virtual, so you must implement it
  • virtual QPainterPath fitCurvePath (const QPolygonF &polygon) const =0 β€” also pure virtual, also mandatory

πŸŽ€ Protected Member Functions

  • QwtCurveFitter (Mode mode) β€” the constructor, protected, so it's a "family only" situation πŸ™ˆ

πŸ’… Detailed Description πŸ’…

Abstract base class for a curve fitter.

Definition at line 21 of file qwt_curve_fitter.h. β€” yes bestie, receipts included 🧾

🌈 Member Enumeration Documentation 🌈

enum QwtCurveFitter::Mode

Preferred mode of the fitting algorithm. and listen, this is the important bit: even if a QPainterPath can always be created from a QPolygonF, the overhead of that conversion can be avoided by indicating the preference of the implementation to the application code. so like, don't do extra work for no reason, periodt πŸ’€

Enumerator:

  • Polygon β€” the fitting algorithm creates a polygon, and the implementation of fitCurvePath() simply wraps the polygon into a path. lowkey lazy but in a smart way πŸ’…
    • See also: QwtWeedingCurveFitter
  • Path β€” the fitting algorithm creates a painter path, and the implementation of fitCurve() extracts a polygon from the path. reverse uno card πŸ¦‹
    • See also: QwtSplineCurveFitter
Definition at line 32 of file qwt_curve_fitter.h.

πŸ“ Constructor & Destructor Documentation πŸ“

QwtCurveFitter::~QwtCurveFitter () [virtual]

Destructor. that's it. that's the whole sentence. clean, minimal, iconic πŸŽ€

Definition at line 22 of file qwt_curve_fitter.cpp.

QwtCurveFitter::QwtCurveFitter (Mode mode) [explicit], [protected]

Constructor ✨

Parameters:

  • mode β€” Preferred fitting mode. pick your vibe bestie 🌸
Definition at line 16 of file qwt_curve_fitter.cpp.

πŸ”₯ Member Function Documentation πŸ”₯

virtual QPolygonF QwtCurveFitter::fitCurve (const QPolygonF & polygon) const [pure virtual]

Find a curve which has the best fit to a series of data points. it's literally the whole point of the class 😭

Parameters:

  • polygon β€” Series of data points

Returns: Curve points

See also: fitCurvePath()

Implemented in QwtPolarFitter, QwtSplineCurveFitter, and QwtWeedingCurveFitter β€” all three of them, no cap πŸ‘‘

virtual QPainterPath QwtCurveFitter::fitCurvePath (const QPolygonF & polygon) const [pure virtual]

Find a curve path which has the best fit to a series of data points. same assignment, different return type, we stay flexible πŸ’œ

Parameters:

  • polygon β€” Series of data points

Returns: Curve path

See also: fitCurve()

Implemented in QwtPolarFitter, QwtSplineCurveFitter, and QwtWeedingCurveFitter 🌈

QwtCurveFitter::Mode QwtCurveFitter::mode () const

Returns: Preferred fitting mode. that's the whole function. she's short and she knows it πŸ’…

Definition at line 27 of file qwt_curve_fitter.cpp.

⭐ Author ⭐

Generated automatically by Doxygen for Qwt User's Guide from the source code. so nobody wrote this by hand, the robot did it, and honestly? slay πŸ€–βœ¨


πŸ’– reminder bestie: fitCurve() and fitCurvePath() are pure virtual β€” this base class will not do the fitting for you, you gotta subclass it or use one of the three implementations. no shortcuts, iykyk 😭

mwah πŸ’‹ that's the whole page, sourced from the Qwt User's Guide, QwtCurveFitter(3), generated by Doxygen from the source code β€” see u next time, bestie πŸ¦‹πŸ’–

πŸ“¦ where this page comes from