Public Member Functions | List of all members
Piecewise Class Reference

A piecewise distribution function. More...

#include <piecewise.hpp>

Inheritance diagram for Piecewise:
Inheritance graph
[legend]
Collaboration diagram for Piecewise:
Collaboration graph
[legend]

Public Member Functions

 Piecewise (const Shape2D &shape, const SpatialDistribution &inside, const SpatialDistribution &outside)
 Class constructor. More...
 
double operator() (const Vector2D &point) const
 Evaluates the function. More...
 

Detailed Description

A piecewise distribution function.

Uses one distribution function if a point is withing a specified shape, and another if it is outside

Definition at line 15 of file piecewise.hpp.

Constructor & Destructor Documentation

◆ Piecewise()

Piecewise::Piecewise ( const Shape2D shape,
const SpatialDistribution inside,
const SpatialDistribution outside 
)

Class constructor.

Parameters
shapeA shape
insideFunction to use when inside the shape
outsideFunction to use when outside the shape

Definition at line 3 of file piecewise.cpp.

Member Function Documentation

◆ operator()()

double Piecewise::operator() ( const Vector2D point) const
virtual

Evaluates the function.

Parameters
pointPosition
Returns
The value of the function at the point

Implements SpatialDistribution.

Definition at line 8 of file piecewise.cpp.


The documentation for this class was generated from the following files: