Skip to content

Commit 97a89ab

Browse files
further refine package index
1 parent 4c01a1b commit 97a89ab

7 files changed

Lines changed: 27 additions & 9 deletions

File tree

R/tensor.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ tensor_new_dummy_index_name <- function(x, n = 1) {
7070
#' @param call For internal use only.
7171
#' @export
7272
#' @rdname create-tensor
73-
#' @concept tensor
73+
#' @concept tensor_create
7474
#' @importFrom cli cli_abort
7575
tensor <- function(a, index_names, index_positions, call = NULL) {
7676
rlang::check_required(a)
@@ -420,7 +420,7 @@ print.tensor <- function(x, ...) {
420420
#' @examples
421421
#' array(1:8, dim = c(2, 2, 2)) %_% .(i, +i, k) |> as.array(.(k))
422422
#' @export
423-
#' @concept tensor
423+
#' @concept tensor_dest
424424
as.array.tensor <- function(x, index_order = NULL, ...,
425425
arg = "index_order",
426426
call = rlang::caller_env()) {
@@ -470,7 +470,7 @@ as.array.tensor <- function(x, index_order = NULL, ...,
470470
#' @export
471471
#' @seealso The same functionality is implemented in [as.array.tensor()]
472472
#' but with standard evaluation.
473-
#' @concept tensor
473+
#' @concept tensor_dest
474474
as_a <- function(x, ...) {
475475
as.array(x, .(...), arg = "...")
476476
}

R/tensor_indices.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
#' # one lower and upper index
7474
#' .(i, +j)
7575
#' @export
76-
#' @concept tensor
76+
#' @concept tensor_create
7777
. <- function(...) {
7878
exprs <- rlang::enexprs(...)
7979

_pkgdown.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@ template:
44
math-rendering: katex
55

66
reference:
7-
- title: "Label and unlabel tensors"
7+
- title: "Label and unlabel arrays"
8+
desc: >
9+
Adding index names enables the usage of Ricci calculus rules,
10+
while unlabeling restores the usual R array.
11+
- subtitle: Label arrays
812
contents:
9-
- has_concept("tensor")
13+
- has_concept("tensor_create")
14+
- subtitle: Unlabel arrays
15+
contents:
16+
- has_concept("tensor_dest")
1017
- title: "Tensor operations"
18+
desc: >
19+
Working with labeled arrays allows to consicely specify
20+
various tensor operations who all take given index structures
21+
into account and act accordingly.
1122
- subtitle: "Index manipulation"
1223
contents:
1324
- has_concept("index")
@@ -21,6 +32,9 @@ reference:
2132
contents:
2233
- has_concept("eval")
2334
- title: "Tensor fields"
35+
desc: >
36+
Tensor fields can be modeled by symbolic tensors, i.e. tensors
37+
that contain mathematical expressions instead of numerical values.
2438
- subtitle: "Covariant derivative"
2539
contents:
2640
- covd
@@ -34,5 +48,8 @@ reference:
3448
contents:
3549
- has_concept("tensor_symbols")
3650
- title: "Testthat expectation"
51+
desc: >
52+
A simple testthat helper that allows to check for
53+
tensor equality.
3754
contents:
3855
- expect_tensor_equal

man/as.array.tensor.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/as_a.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/create-tensor.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dot-.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)