2D piecewise type. Used for images
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public, | allocatable | :: | cdf(:) |
cumulative distribution function (CDF) of array. |
||
real(kind=wp), | public | :: | cell_height |
Height of each cell |
|||
real(kind=wp), | public | :: | cell_width |
Width of each cell |
|||
integer, | private | :: | xoffset |
Offsets |
|||
integer, | private | :: | yoffset |
Offsets |
Initalise the piecewise2D type with a given cell_width, cell_height and input image
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | cell_width |
Input cell width |
||
real(kind=wp), | intent(in) | :: | cell_height |
Input cell height |
||
real(kind=wp), | intent(in) | :: | image(:,:) |
Input image |
Overloaded sampling function
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(piecewise2D), | intent(in) | :: | this | |||
real(kind=wp), | intent(out) | :: | x | |||
real(kind=wp), | intent(out) | :: | y | |||
real(kind=wp), | intent(in), | optional | :: | value |
type, extends(piecewise) :: piecewise2D !> Height of each cell real(kind=wp) :: cell_height !> Width of each cell real(kind=wp) :: cell_width !>cumulative distribution function (CDF) of array. real(kind=wp), allocatable :: cdf(:) !> Offsets integer, private :: xoffset, yoffset contains !> Overloaded sampling function procedure :: sample => sample2D end type piecewise2D