Appearance
fossil_sdf
Source: src/lib/fossil_sdf.f90
Dependencies
Contents
- compute_sdf
- smooth_sdf
- segment_sdf
- gmm_fit_1d
- kmeanspp_init
- gmm_e_step
- gmm_m_step
- argsort_ascending
- cone_directions
- ortho_basis
- gmm_argmax_posterior
- data_variance
- inv_perm
- median
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
SDF_STATUS_OK | integer(kind=I4P) | parameter | |
SDF_STATUS_BAD_INPUT | integer(kind=I4P) | parameter | |
SDF_SENTINEL | real(kind=R8P) | parameter | |
SDF_LABEL_UNASSIGNED | integer(kind=I4P) | parameter | |
SDF_DEFAULT_NUM_CLUSTERS | integer(kind=I4P) | parameter | |
SDF_DEFAULT_NUM_RAYS | integer(kind=I4P) | parameter | |
SDF_DEFAULT_CONE_DEG | real(kind=R8P) | parameter | |
SDF_DEFAULT_SMOOTHING_LAMBDA | real(kind=R8P) | parameter | |
SDF_DEFAULT_SMOOTHING_ITERATIONS | integer(kind=I4P) | parameter | |
SDF_MIN_HIT_FRACTION | real(kind=R8P) | parameter | |
PI_R8P | real(kind=R8P) | parameter | |
GOLDEN_ANGLE | real(kind=R8P) | parameter | |
ORIGIN_OFFSET_REL | real(kind=R8P) | parameter |
Subroutines
compute_sdf
fortran
subroutine compute_sdf(facet, tree, bmin, bmax, sdf, num_rays, cone_angle_deg, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | in | ||
tree | type(aabb_tree_object) | in | ||
bmin | type(vector_R8P) | in | ||
bmax | type(vector_R8P) | in | ||
sdf | real(kind=R8P) | out | allocatable | |
num_rays | integer(kind=I4P) | in | optional | |
cone_angle_deg | real(kind=R8P) | in | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
smooth_sdf
fortran
subroutine smooth_sdf(facet, sdf, lambda, iterations, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | in | ||
sdf | real(kind=R8P) | inout | ||
lambda | real(kind=R8P) | in | optional | |
iterations | integer(kind=I4P) | in | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
segment_sdf
fortran
subroutine segment_sdf(facet, tree, bmin, bmax, facet_labels, sdf, num_clusters, smoothing_lambda, smoothing_iterations, num_rays, cone_angle_deg, status)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
facet | type(facet_object) | in | ||
tree | type(aabb_tree_object) | in | ||
bmin | type(vector_R8P) | in | ||
bmax | type(vector_R8P) | in | ||
facet_labels | integer(kind=I4P) | out | allocatable | |
sdf | real(kind=R8P) | out | allocatable, optional | |
num_clusters | integer(kind=I4P) | in | optional | |
smoothing_lambda | real(kind=R8P) | in | optional | |
smoothing_iterations | integer(kind=I4P) | in | optional | |
num_rays | integer(kind=I4P) | in | optional | |
cone_angle_deg | real(kind=R8P) | in | optional | |
status | integer(kind=I4P) | out | optional |
Call graph
gmm_fit_1d
fortran
subroutine gmm_fit_1d(x, k, mean, var, weight)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in | ||
k | integer(kind=I4P) | in | ||
mean | real(kind=R8P) | out | allocatable | |
var | real(kind=R8P) | out | allocatable | |
weight | real(kind=R8P) | out | allocatable |
Call graph
kmeanspp_init
fortran
subroutine kmeanspp_init(x, k, centers)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in | ||
k | integer(kind=I4P) | in | ||
centers | real(kind=R8P) | out |
Call graph
gmm_e_step
Attributes: pure
fortran
subroutine gmm_e_step(x, mean, var, weight, resp, ll)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in | ||
mean | real(kind=R8P) | in | ||
var | real(kind=R8P) | in | ||
weight | real(kind=R8P) | in | ||
resp | real(kind=R8P) | out | ||
ll | real(kind=R8P) | out |
Call graph
gmm_m_step
Attributes: pure
fortran
subroutine gmm_m_step(x, resp, mean, var, weight, var_floor)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in | ||
resp | real(kind=R8P) | in | ||
mean | real(kind=R8P) | inout | ||
var | real(kind=R8P) | inout | ||
weight | real(kind=R8P) | inout | ||
var_floor | real(kind=R8P) | in |
Call graph
argsort_ascending
Attributes: pure
fortran
subroutine argsort_ascending(x, order)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in | ||
order | integer(kind=I4P) | out |
Call graph
cone_directions
Attributes: pure
fortran
subroutine cone_directions(axis, cone_deg, n, dirs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
axis | type(vector_R8P) | in | ||
cone_deg | real(kind=R8P) | in | ||
n | integer(kind=I4P) | in | ||
dirs | type(vector_R8P) | out | allocatable |
Call graph
ortho_basis
Attributes: pure
fortran
subroutine ortho_basis(axis, e1, e2)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
axis | type(vector_R8P) | in | ||
e1 | type(vector_R8P) | out | ||
e2 | type(vector_R8P) | out |
Call graph
Functions
gmm_argmax_posterior
Attributes: pure
Returns: integer(kind=I4P)
fortran
function gmm_argmax_posterior(x, mean, var, weight) result(j_star)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in | ||
mean | real(kind=R8P) | in | ||
var | real(kind=R8P) | in | ||
weight | real(kind=R8P) | in |
Call graph
data_variance
Attributes: pure
Returns: real(kind=R8P)
fortran
function data_variance(x) result(v)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in |
Call graph
inv_perm
Attributes: pure
Returns: integer(kind=I4P)
fortran
function inv_perm(order, j) result(rank)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
order | integer(kind=I4P) | in | ||
j | integer(kind=I4P) | in |
Call graph
median
Attributes: pure
Returns: real(kind=R8P)
fortran
function median(x) result(m)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in |
Call graph