getGlobalAlignMaskCpp: Outputs a mask for constraining similarity matrix

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

This function takes in timeVectors from both runs, global-fit mapped values of end-points of first time vector and sample-length of window of no constraining. Outside of window, all elements of matrix are either equally weighted or weighted proportional to distance from window-boundry.

Usage

1
getGlobalAlignMaskCpp(tA, tB, B1p, B2p, noBeef = 50L, hardConstrain = FALSE)

Arguments

tA

(numeric) A numeric vector. This vector has equally spaced timepoints of XIC A.

tB

(numeric) A numeric vector. This vector has equally spaced timepoints of XIC B.

B1p

(numeric) Timepoint mapped by global fit for tA[1].

B2p

(numeric) Timepoint mapped by global fit for tA[length(tA)].

noBeef

(integer) It defines the distance from the global fit, upto which no penalization is performed.
The window length = 2*noBeef.

hardConstrain

(logical) if false; indices farther from noBeef distance are filled with distance from linear fit line.

Value

mask (matrix) A numeric matrix.

Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca ORCID: 0000-0003-3500-8152 License: (c) Author (2019) + MIT Date: 2019-03-08

Examples

1
2
3
4
5
6
7
8
tA <- c(3353.2, 3356.6, 3360.0, 3363.5)
tB <- c(3325.9, 3329.3, 3332.7, 3336.1)
B1p <- 3325.751; B2p <- 3336.119
noBeef <- 1
mask <- getGlobalAlignMaskCpp(tA, tB, B1p, B2p, noBeef, FALSE)
round(mask, 3)
matrix(c(0.000, 0.000, 0.707, 1.414, 0.000, 0.000, 0.000, 0.707, 0.707, 0.000,
0.000, 0.000, 1.414, 0.707, 0.000, 0.000), 4, 4, byrow = FALSE)

DIAlignR documentation built on Nov. 8, 2020, 8:22 p.m.