FunctionSampler
A utility class for creating a visual sampling of a function.
Constructors
FunctionSampler
#Create a new sampler based on an evaluation delegate.
public FunctionSampler()
x0,
Lowest x value for sampling region.
x1,
Highest x value for sampling region.
y0,
Lowest y value visible within sampling region.
y1,
Highest y value visible within sampling region.
samples,
Number of samples required. This is usually the number of visible pixels.
function
Delegate.
FunctionSampler
#Create a new sampler based on an IFunction.
public FunctionSampler()
x0,
Lowest x value for sampling region.
x1,
Highest x value for sampling region.
y0,
Lowest y value visible within sampling region.
y1,
Highest y value visible within sampling region.
samples,
Number of samples required. This is usually the number of visible pixels.
function
Function.
Properties
Level
#Gets the level of sampling density currently available.
Negative or zero means no samples have been computed at all.
A positive integer indices every nth sample has been computed.
Methods
ComputeNextSampling
#Compute the next level sampling density.
Returns: Time it took to compute this sampling. If no additional sampling was performed, this method returns TimeSpan.Zero
GraphSegments
#Iterate over all defined stretches of samples. Think of these as the graph segments.
Returns: A collection of zero or more segments, each containing one or more points.
GraphSegments
#Iterate over all defined stretches of samples. Think of these as the graph segments.
public IEnumerable<PointF[]> GraphSegments()
RectangleF
frame
Visible frame for mapping the samples into.
Returns: A collection of zero or more segments, each containing one or more points.