Learn R Programming

algebraic.dist (version 0.9.1)

has.finite_set: Determine if a value is contained in the finite set.

Description

Determine if a value is contained in the finite set.

Usage

# S3 method for finite_set
has(object, x)

Value

Logical indicating membership.

Arguments

object

A finite set.

x

A vector of values.

Examples

Run this code
fs <- finite_set$new(c(1, 3, 5, 7))
has(fs, 3) # TRUE
has(fs, 4) # FALSE

Run the code above in your browser using DataLab