This repository was 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
xlies within the setInterval, i.e. if within bounds and same class. IfallreturnsTRUEiff allxTRUE. If!allreturns a vector of logicals corresponding to eachx - isEmpty() - Is the setInterval empty?
- equals(x) - Tests if
xis 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 returnsInfotherwise length of vector after coercion - range() -
sup - inf - equals(x) -
x == selfiff both have samesup, inf, class
- length() - Length of set (count of elements)
- elements() - Getter
.elements - isEmpty() -
TRUEifflength == 0 - liesInSetInterval(x, all = FALSE, bound = NULL) - Tests if
xis an element inself - equals(x) - Tests if sets
selfandxmathematically equal (==.Set) - strprint(n = 2) - String representation of elements in set,
ndetermines when to truncate - powerSet() - Returns the power set of
self - isSubset(x, proper = FALSE) - Tests if
xis a subset (<=.Set) ofx, tests if proper set ifproper == TRUE(<.Set). - intersection(x) - Returns intersection of
xandself
- .class - "integer"
- .type - "{}"
- .elements - Elements in the set
- as.Set -
as.Set.list,as.Set.matrix
- equals(x) -
x == selfif 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 == selfiff 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 moreSetIntervals - complement.SetInterval(x, y = NULL) (
-.SetInterval) - Ify = NULLthen complement ofxin a given universe, otherwise elements ofxnot found iny - complement.Set(x, y = NULL) (
-.Set) - power.SetInterval(x, power) (
^.SetInterval) - Raise dimension ofSetInterval - product.SetInterval(...) (
*.SetInterval) - Cartesian product of two or moreSetIntervals
- assert/check/testSetInterval
- assert/check/testSet
- assert/check/testTuple
- assert/check/testFuzzySet
- assert/check/testInterval
- assert/check/testBoundedAbove
- assert/check/testBoundedBelow