VectSharp 2.6.1
A light library for C# vector graphics
|
Represents a function of two variables that has been sampled in some points. More...
Public Types | |
enum | GridType |
Describes the arrangement of the points that have been sampled. More... | |
Public Member Functions | |
Function2DGrid (IReadOnlyList< IReadOnlyList< double > > dataPoints) | |
Create a new Function2DGrid from a list of sampled values. More... | |
Function2DGrid (Func< double[], double > function, double minX, double minY, double maxX, double maxY, int stepsX, int stepsY, GridType type) | |
Create a new Function2DGrid by sampling the provided function. More... | |
Function2DGrid | ToRectangular () |
Converts a hexagonal grid into a rectangular grid. More... | |
Properties | |
IReadOnlyList< IReadOnlyList< double > > | DataPoints [get] |
The points where the function has been sampled. More... | |
double | MinX [get] |
The minimum X value that has been sampled. More... | |
double | MaxX [get] |
The maximum X value that has been sampled. More... | |
double | MinY [get] |
The minimum Y value that has been sampled. More... | |
double | MaxY [get] |
The maximum Y value that has been sampled. More... | |
double | MinZ [get] |
The minimum value that has been obtained for the function. More... | |
double | MaxZ [get] |
The maximum value that has been obtained for the function. More... | |
int | StepsX [get] |
If the function has been sampled along a regular grid, the number of steps between MinX and MaxX on the X axis. More... | |
int | StepsY [get] |
If the function has been sampled along a regular grid, the number of steps between MinY and MaxY on the X axis. More... | |
GridType | Type [get] |
The type of grid. More... | |
Represents a function of two variables that has been sampled in some points.
Definition at line 29 of file Function2D.cs.
Describes the arrangement of the points that have been sampled.
Definition at line 34 of file Function2D.cs.
VectSharp.Plots.Function2DGrid.Function2DGrid | ( | IReadOnlyList< IReadOnlyList< double > > | dataPoints | ) |
Create a new Function2DGrid from a list of sampled values.
dataPoints | The sampled values. Each element of this IReadOnlyList<T> should be a collection of three values: the X coordinate of the sampled point, the Y coordinate of the sampled point, and the value of the function at that point. |
Definition at line 117 of file Function2D.cs.
VectSharp.Plots.Function2DGrid.Function2DGrid | ( | Func< double[], double > | function, |
double | minX, | ||
double | minY, | ||
double | maxX, | ||
double | maxY, | ||
int | stepsX, | ||
int | stepsY, | ||
GridType | type | ||
) |
Create a new Function2DGrid by sampling the provided function.
function | The function to sample. |
minX | The minimum X value at which the function should be sampled. |
minY | The minimum Y value at which the function should be sampled. |
maxX | The maximum X value at which the function should be sampled. |
maxY | The maximum Y value at which the function should be sampled. |
stepsX | If type is not GridType.Irregular, the number of steps between minX and maxX on the X axis. Otherwise, the number of sampled points is determined by multiplying stepsX and stepsY together. |
stepsY | If type is not GridType.Irregular, the number of steps between minY and maxY on the Y axis. Otherwise, the number of sampled points is determined by multiplying stepsX and stepsY together. |
type | The strategy used to select points to sample. If this is GridType.Irregular, uniformly distributed random points between (minX , minY ) and (maxX , maxY ) are sampled. |
Definition at line 163 of file Function2D.cs.
Function2DGrid VectSharp.Plots.Function2DGrid.ToRectangular | ( | ) |
Converts a hexagonal grid into a rectangular grid.
InvalidOperationException | Thrown if Type is GridType.Irregular. |
Definition at line 322 of file Function2D.cs.
|
get |
The points where the function has been sampled.
Definition at line 62 of file Function2D.cs.
|
get |
The maximum X value that has been sampled.
Definition at line 72 of file Function2D.cs.
|
get |
The maximum Y value that has been sampled.
Definition at line 82 of file Function2D.cs.
|
get |
The maximum value that has been obtained for the function.
Definition at line 92 of file Function2D.cs.
|
get |
The minimum X value that has been sampled.
Definition at line 67 of file Function2D.cs.
|
get |
The minimum Y value that has been sampled.
Definition at line 77 of file Function2D.cs.
|
get |
The minimum value that has been obtained for the function.
Definition at line 87 of file Function2D.cs.
|
get |
If the function has been sampled along a regular grid, the number of steps between MinX and MaxX on the X axis.
Definition at line 98 of file Function2D.cs.
|
get |
If the function has been sampled along a regular grid, the number of steps between MinY and MaxY on the X axis.
Definition at line 104 of file Function2D.cs.
|
get |
The type of grid.
Definition at line 109 of file Function2D.cs.