Learn R Programming

set6 (version 0.1.6)

Complex: Set of Complex Numbers

Description

The mathematical set of complex numbers, defined as the the set of reals with possibly imaginary components. i.e. $$\\{a + bi \\ : \\ a,b \in R\\}$$ where \(R\) is the set of reals.

Arguments

Super classes

set6::Set -> set6::Interval -> set6::SpecialSet -> Complex

Methods

Public methods

Method new()

Create a new Complex object.

Usage

Complex$new(lower = -Inf + (0+0i), upper = Inf + (0+0i))

Arguments

lower

complex. Where to start the set.

upper

complex. Where to end the set.

Returns

A new Complex object.

Method contains()

Tests to see if x is contained in the Set.

Usage

Complex$contains(x, all = FALSE, bound = NULL)

Arguments

x

any. Object or vector of objects to test.

all

logical. If FALSE tests each x separately. Otherwise returns TRUE only if all x pass test.

bound

logical.

Details

x can be of any type, including a Set itself. x should be a tuple if checking to see if it lies within a set of dimension greater than one. To test for multiple x at the same time, then provide these as a list.

If all = TRUE then returns TRUE if all x are contained in the Set, otherwise returns a vector of logicals. For Intervals, bound is used to specify if elements lying on the (possibly open) boundary of the interval are considered contained (bound = TRUE) or not (bound = FALSE).

Returns

If all is TRUE then returns TRUE if all elements of x are contained in the Set, otherwise FALSE. If all is FALSE then returns a vector of logicals corresponding to each individual element of x.

The infix operator %inset% is available to test if x is an element in the Set, see examples.

Method clone()

The objects of this class are cloneable with this method.

Usage

Complex$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Details

Unlike the other SpecialSets, Complex can be used to define an Interval. In this case where values can be complex, as opposed to reals or integers in Interval.

See Also

Other special sets: ExtendedReals, Integers, Naturals, NegIntegers, NegRationals, NegReals, PosIntegers, PosNaturals, PosRationals, PosReals, Rationals, Reals