Skip to content

Commit f904644

Browse files
authored
Merge pull request #14 from corybrunson/analysis_description
Expanding on details of analysis.R
2 parents b7f84a1 + 3d156f6 commit f904644

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

R/analysis.R

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22
#' @description Calculate distances and perform infinitesimal calculus on
33
#' persistence landscapes. See Section 3 of Bubenik (2015).
44
#'
5+
#' @details `pl_integrate()` computes the \eqn{L^p} integral of a persistence
6+
#' landscape. The `p` parameter denotes the integral's power;
7+
#' `p = 1` computes the area under the curves, while `p = 2` corresponds to the
8+
#' \eqn{L^2} norm. Letting `p = Inf` returns the maximum landscape height.
9+
#'
10+
#' `pl_distance()` calculates the \eqn{L^p} distance between two persistence
11+
#' landscapes.
12+
#'
13+
#' `pl_dist()` utilizes `pl_distance()` to compute all pairwise distances
14+
#' between a list of landscapes. It returns a symmetric matrix of distances.
15+
#'
16+
#' `pl_norm()` returns the \eqn{L^p} norm of a single landscape, used as a
17+
#' scalar summary of its magnitude. Similar to `pl_integrate()`, it supports
18+
#' all finite powers `p >= 1`, as well as `p = Inf` for the supremum norm.
19+
#'
20+
#' `pl_indicator()` computes the linear form defined by a sum of indicator
21+
#' functions over user-specified support intervals, weighted by \eqn{1/k^r}
22+
#' where \eqn{k} indexes the landscape levels.
23+
#'
24+
#' `pl_indicator_form()` evaluates the integral of the indicator function form
25+
#' described above with respect to the \eqn{L^p} norm. It returns a real number
26+
#' representing the landscape's integral onto the chosen intervals.
27+
#'
528
#' @name analysis
629
#' @include arithmetic.R
730
#' @inheritParams pl_new

inst/examples/ex-analysis.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ plot(pl_df, xlim = c(0, 5))
1919
par(mfrow = c(1L, 1L), mar = c(5.1, 4.1, 4.1, 2.1))
2020

2121
# integrate PL multiplied by an indicator function
22-
pl_integrate(pl_d, p = 5)
22+
pl_indicator_form(pl_d, supports = f, p = 5)
2323
pl_integrate(pl_df, p = 5)
24-
pl_integrate(pl_e, p = 5)
24+
pl_indicator_form(pl_e, supports = f, p = 5)
2525
pl_integrate(pl_ef, p = 5)

man/analysis.Rd

Lines changed: 26 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)