Xor.globalSeg {GeneR}R Documentation

Xor for global segments

Description

computes the eXclusive OR of two objects of class globalSeg a and b, i.e. returns segments which correspond to at least one part of a segment in one set but to nothing in the other set.

When used with only one parameter, Xor(a) returns segments belonging to only one input segment.

see the example for a more comprehensive visualisation. .

Usage

Xor.globalSeg(a, b = NULL,...)

Arguments

a,b

elements of class globalSeg

...

Unused

Value

An element of class globalSeg

Author(s)

Odile Rogier

See Also

globalSeg,and.globalSeg,Xor.segSet

Examples


a = list(
    matrix( c( 1, 15, 17,  5, 45, 38),ncol=2),
    matrix( c( 100 , 120),ncol=2),
    matrix( c( 130, 135, 140, 145),ncol=2),
    matrix( c( 142 , 160),ncol=2))


b = list(
    matrix( c(15, 28, 18, 45),ncol=2),
    matrix( c(1, 15, 25, 10, 20, 40),ncol=2),
    matrix( c(17, 35, 23, 38),ncol=2),
    matrix( c(100, 110, 105, 120),ncol=2))

a = as.globalSeg(a)
b = as.globalSeg(b)

c = Xor(a,b)
par(mfrow=c(4,1))
plot(a,xlim=c(1,160),main="A")
plot(b,xlim=c(1,160),main="B")
plot(c,xlim=c(1,160),main="Xor(A,B)")
plot(Xor(b),xlim=c(1,160),main="Xor(B)")

## show all
c
Xor(b)


[Package GeneR version 2.24.0 Index]