This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
API Reference
Raphael Sonabend edited this page Aug 8, 2019
·
8 revisions
We use X -> Y
to denote that class X
inherits from class Y
, we therefore only include methods and variables from the parent-class (super) unless the child-class (sub) overloads this.
NOTE: This package is very much in development. The entire API is considered experimental. The list below reflects the current state of the package not the future desired state.
- type() - Getter .type
- dimension() - Getter .dimension
- max() - Returns .upper if type
(]
or[]
. Otherwise .upper - 1.1e-15 - min() - Returns .lower if type
[)
or[]
. Otherwise .lower + 1.1e-15 - sup() - Getter .lower
- inf() - Getter .upper
- print() - Prints strprint
- strprint() - String representation of set (usually getter .setSymbol)
- class() - Getter .class
- liesInSetInterval(x, all = FALSE, bound = FALSE) - Tests if
x
lies within the setInterval, i.e. if within bounds and same class. Ifall
returnsTRUE
iff allx
TRUE. If!all
returns a vector of logicals corresponding to eachx
- isEmpty() - Is the setInterval empty?
- equals(x) - Tests if
x
is mathematically equal toself
- .lower - Lower bound
- .upper - Upper bound
- .type - One of
[], [), (), (]
- .class - One of
numeric, integer
- .dimension - Dimension
- .setSymbol - ASCII representation
- as.numeric() - If interval is of
class
'integer' then converts to a numeric vector (error if infinite) - length() - If
class
'numeric' or bounds are non-finite returnsInf
otherwise length of vector after coercion - range() -
sup - inf
- equals(x) -
x == self
iff both have samesup, inf, class
- length() - Length of set (count of elements)
- elements() - Getter
.elements
- isEmpty() -
TRUE
ifflength == 0
- liesInSetInterval(x, all = FALSE, bound = NULL) - Tests if
x
is an element inself
- equals(x) - Tests if sets
self
andx
mathematically equal (==.Set
) - strprint(n = 2) - String representation of elements in set,
n
determines when to truncate - powerSet() - Returns the power set of
self
- isSubset(x, proper = FALSE) - Tests if
x
is a subset (<=.Set
) ofx
, tests if proper set ifproper == TRUE
(<.Set
). - intersection(x) - Returns intersection of
x
andself
- .class - "integer"
- .type - "{}"
- .elements - Elements in the set
- as.Set -
as.Set.list
,as.Set.matrix
- equals(x) -
x == self
if elements of both are identical and in same order
- .type - "()"
- members() - Getter
.members
- isEmpty() - True iff
length(members())==0
- alphaCut(alpha, strong = FALSE) - Returns all elements with membership degree greater than
alpha
, greater than or equal to iff!strong
- support() - Returns elements with a positive membership
- core() - Returns elements with unit membership
- inclusion(x) - Returns the inclusion degree (Not, Partially, Fully Included) of a given element
x
- equals(x) -
x == self
iff the same element-membership pairs are in both - complement(x) - Sets
.members <- 1 - .members
- .type - "{}"
- .members - Ordered membership degree for each element
Abstract class. All methods and variables inherited without overloading from set.
Classes inheriting from SpecialSet
: Empty, Naturals, PosNaturals, Integers, PosIntegers, NegIntegers, Rationals, PosRationals, NegRationals, Reals, PosReals, NegReals, ExtendedReals, Complex
- union.SetInterval(..., dim = 1) (
+.SetInterval
) - Union of two or moreSetInterval
s - complement.SetInterval(x, y = NULL) (
-.SetInterval
) - Ify = NULL
then complement ofx
in a given universe, otherwise elements ofx
not found iny
- complement.Set(x, y = NULL) (
-.Set
) - power.SetInterval(x, power) (
^.SetInterval
) - Raise dimension ofSetInterval
- product.SetInterval(...) (
*.SetInterval
) - Cartesian product of two or moreSetInterval
s
- assert/check/testSetInterval
- assert/check/testSet
- assert/check/testTuple
- assert/check/testFuzzySet
- assert/check/testInterval
- assert/check/testBoundedAbove
- assert/check/testBoundedBelow