fp.and, fp.or, fp.not {fingerprint}R Documentation

Logical operators for fingerprints

Description

These functions perform logical operatiosn (AND, OR, NOT) on the supplied binary fingerprints. Thus for two fingerprints A and B we have

fp.and
Logical AND
fp.or
Logical OR
fp.not
Logical NOT (negation)
fp.xor
Exclusive OR

Usage

fp.and(fp1, fp2, size=1024)
fp.or(fp1, fp2, size=1024)
fp.not(fp1, size=1024)
fp.xor(fp1, fp2, size=1024)

Arguments

fp1 A fingerprint vector
fp2 A fingerprint vector
size The length of the fingerprints being considered

Value

A fingerprint vector

Author(s)

Rajarshi Guha rguha@indiana.edu

Examples

# make 2 fingerprints
fp1 <- fp.from.bstring("11001011")
fp2 <- fp.from.bstring("10011010")
and <- fp.and(fp1,fp2, size=8)
or <- fp.or(fp1,fp2, size=8)
not <- fp.not(fp1, size=8)

fp.to.string(and,size=8)
fp.to.string(or,size=8)
fp.to.string(not,size=8)

[Package fingerprint version 1.6 Index]