Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/straight_intersect.R
This function calculates the intersection of two straights and gives the paramters of this value in parametric form. Further it indicates, if the straigths intersect within the range of the four defining edges.
1 | straight_intersect(v1, v2, v3, v4, plots)
|
v1 |
Startingpoint |
v2 |
Endpoint |
v3 |
Startingpoint |
v4 |
Endpoint |
plots |
Switch (TRUE or FALSE) to choose, if the results should be plotted. Needs an active plot window. |
This function is mainly used in the change point detection algorithms of this package. Details on the usage can be found in Kustosz (2016).
res |
Resulting decision TRUE/FALSE which indicates, if the straghts from v1 to v2 and from v3 to v4 intercept between v1 and v2 as well as v3 and v4. |
lambda |
Parameter for the first straight, which coincides with the intersection. |
mu |
Parameter for the second straight, which coincides with the intersection. |
Kustosz, Christoph
Kustosz, C. (2016). Depth based estimators and tests for
autoregressive processes with application. Ph. D. thesis. TU Dortmund.
1 2 3 4 5 6 7 8 9 10 11 12 | par(mfrow = c(1, 2))
a <- straight_intersect(c(1, 1), c(4, 4), c(4, 3), c(-1, 1))
plot(0, 0, xlim = c(-1, 5), ylim =c (0, 5), type = "n")
segments(1, 1, 4, 4)
segments(4, 3, -1, 1)
a
a <- straight_intersect(c(1, 1), c(2, 1), c(1, 2), c(2, 2))
plot(0, 0, xlim = c(-1, 5), ylim =c (0, 5), type = "n")
segments(1, 1, 2, 1)
segments(1, 2, 2, 2)
a
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.