Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/cran/dtw
28 September 2022, 07:50:27 UTC
  • Code
  • Branches (54)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/tags/0.1-2
    • refs/tags/0.3-1
    • refs/tags/0.4-2
    • refs/tags/1.0-2
    • refs/tags/1.12-3
    • refs/tags/1.12-5
    • refs/tags/1.13-1
    • refs/tags/1.14-1
    • refs/tags/1.14-3
    • refs/tags/1.15
    • refs/tags/1.16
    • refs/tags/1.17-1
    • refs/tags/1.18-1
    • refs/tags/1.2-1
    • refs/tags/1.20-1
    • refs/tags/1.21-1
    • refs/tags/1.21-3
    • refs/tags/1.22-3
    • refs/tags/1.23-1
    • refs/tags/1.4-3
    • refs/tags/1.5-3
    • refs/tags/1.6-2
    • refs/tags/1.9-1
    • refs/tags/R-2.10.0
    • refs/tags/R-2.10.1
    • refs/tags/R-2.11.0
    • refs/tags/R-2.11.1
    • refs/tags/R-2.12.0
    • refs/tags/R-2.12.1
    • refs/tags/R-2.12.2
    • refs/tags/R-2.13.0
    • refs/tags/R-2.13.1
    • refs/tags/R-2.13.2
    • refs/tags/R-2.14.0
    • refs/tags/R-2.14.1
    • refs/tags/R-2.14.2
    • refs/tags/R-2.15.0
    • refs/tags/R-2.15.1
    • refs/tags/R-2.15.2
    • refs/tags/R-2.15.3
    • refs/tags/R-2.6.2
    • refs/tags/R-2.7.0
    • refs/tags/R-2.7.1
    • refs/tags/R-2.7.2
    • refs/tags/R-2.8.0
    • refs/tags/R-2.8.1
    • refs/tags/R-2.9.0
    • refs/tags/R-2.9.1
    • refs/tags/R-2.9.2
    • refs/tags/R-3.0.0
    • refs/tags/R-3.0.1
    • refs/tags/R-3.0.2
    • refs/tags/R-3.0.3
    No releases to show
  • 5f7f2f7
  • /
  • man
  • /
  • warp.Rd
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:c15d00b93e24d854a183f4bff4853e5b8e75f0d8
origin badgedirectory badge Iframe embedding
swh:1:dir:ae2b92708697bf791cf6ce0bd1259829c7247b2d
origin badgerevision badge
swh:1:rev:7e56ce3aad7a130f3145baa08991cdcea6ce717b
origin badgesnapshot badge
swh:1:snp:e75a8a2617c9395688cff068aec5b1e7448d2a41
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 7e56ce3aad7a130f3145baa08991cdcea6ce717b authored by Toni Giorgino on 01 June 2008, 00:00:00 UTC
version 1.6-2
Tip revision: 7e56ce3
warp.Rd
\name{warp}
\alias{warp}
\title{Apply a warping to a given timeseries}
\description{

  Returns the indexing required to apply the optimal warping curve to a
  given timeseries (warps either into a query or into a template).


}
\usage{
warp(d,index.template=FALSE)
}
\arguments{
  \item{d}{\code{dtw} object specifying the warping curve to apply}

  \item{index.template}{\code{TRUE} to warp a template, \code{FALSE}
to warp a query}
}
\details{

  The warping is returned as a set of indices, which can be used to
  subscript the timeseries to be warped (or rows in a matrix, if one
  wants to warp a multivariate time series).  In other words,
  \code{warp} converts the warping curve, or its inverse, into a
  function in the explicit form.

  Multiple indices that would be mapped to a single point are averaged,
  with a warning. Gaps in the index sequence are filled by linear
  interpolation.

}

\value{
  A list of indices to subscript the timeseries. 
  }

  
\seealso{Examples in \code{\link{dtw}} show how to \emph{graphically}
  apply the warping via parametric   plots.
}

\examples{
idx<-seq(0,6.28,len=100);
query<-sin(idx)+runif(100)/10;
template<-cos(idx)

alignment<-dtw(query,template);


wq<-warp(alignment,index.template=FALSE);
wt<-warp(alignment,index.template=TRUE);

old.par <- par(no.readonly = TRUE);
par(mfrow=c(2,1));

plot(template,main="Warping query");
  lines(query[wq],col="blue");

plot(query,type="l",col="blue",
  main="Warping template");
  points(template[wt]);

par(old.par);


##############
##
## Asymmetric step makes it "natural" to warp
## the template, because every query index has
## exactly one image (q->t is a function)
##

alignment<-dtw(query,template,step="a")
wt<-warp(alignment,index.template=TRUE);

plot(query,type="l",col="blue",
  main="Warping template, asymmetric step");
  points(template[wt]);



}
\author{Toni Giorgino}
\keyword{ts}

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API