Skip to content

Commit

Permalink
Document usage of DismtatLowerTriangular
Browse files Browse the repository at this point in the history
  • Loading branch information
asardaes committed Jul 1, 2024
1 parent 6d47400 commit a72e187
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Version 5.6.0
* Update Makevars for ARM version of Windows.
* Sanitize internal usage of `do.call` to avoid huge backtraces.
* Support lower triangular `distmat` objects for symmetric distances.
* Support lower triangular `distmat` objects for symmetric distances (#77).

## Version 5.5.12
* Remove explicit C++ requirements.
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Description: Time series clustering along with optimized techniques related
All included distance functions have custom loops optimized for the
calculation of cross-distance matrices, including parallelization support.
Several cluster validity indices are included.
Version: 5.5.12
Version: 5.5.12.9000
Depends:
R (>= 3.3.0),
methods,
Expand Down Expand Up @@ -47,7 +47,7 @@ Suggests:
knitr,
rmarkdown,
testthat
Date: 2024-06-22
Date: 2024-07-01
Author: Alexis Sarda-Espinosa
Maintainer: Alexis Sarda <[email protected]>
BugReports: https://github.com/asardaes/dtwclust/issues
Expand Down
13 changes: 12 additions & 1 deletion R/S4-DistmatLowerTriangular.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@ lower_triangular_index <- function(i, j, n, diagonal) {
#'
#' @field distmat The lower triangular.
#'
#' @keywords internal
#' @details
#'
#' If you wish to, you can use this class to access `dist` elements with `[` as if it were a normal
#' matrix. You can use [methods::new] passing the `dist` object in a `distmat` argument.
#'
#' @examples
#'
#' dm <- new("DistmatLowerTriangular",
#' distmat = proxy::dist(CharTraj[1:5], method = "gak", sigma = 5.5, window.size = 10L,
#' lower_triangular_only = TRUE, diag = TRUE))
#'
#' dm[2:3, 4:5]
#'
DistmatLowerTriangular <- methods::setRefClass(
"DistmatLowerTriangular",
Expand Down
2 changes: 1 addition & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
\itemize{
\item Update Makevars for ARM version of Windows.
\item Sanitize internal usage of \code{do.call} to avoid huge backtraces.
\item Support lower triangular \code{distmat} objects for symmetric distances.
\item Support lower triangular \code{distmat} objects for symmetric distances. See PR #77 on GitHub.
}
}
14 changes: 13 additions & 1 deletion man/DistmatLowerTriangular-class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a72e187

Please sign in to comment.