13 return x == other.
x &&
y == other.
y;
Generic dynamically allocated resizable storage.
uint32_t Size
Integral type used to index arrays (by default).
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Object representing interval of real values.
#define NAMESPACE_SPH_END
Generic dynamically allocated resizable storage.
Represents a user-defined function, defined by a set of points interpolated by either piecewise linea...
const CurvePoint & getPoint(const Size idx) const
Returns the position of idx-th point.
Interval rangeY() const
Returns the extent of the curve in y-direction.
Curve & operator=(const Curve &curve)
void setPoint(const Size idx, const CurvePoint &newPoint)
Modifies the position of idx-th points.
Size getPointCnt() const
Returns the number of points defining the curve.
void addPoint(const CurvePoint &newPoint)
Adds a new point to the curve.
void setSegment(const Size idx, const bool cubic)
Modifies the interpolation type of idx-th segment.
Interval rangeX() const
Returns the extent of the curve in x-direction.
Float operator()(const Float x) const
Evaluates the function and returns the result.
bool getSegment(const Size idx) const
Returns the interpolation type of idx-th segment.
Curve()
Creates an identity function, defined in interval [0, 1].
void deletePoint(const Size idx)
Removes idx-th point from curve.
Object representing a 1D interval of real numbers.
bool operator==(const CurvePoint &other) const