Description Usage Arguments Details Value Author(s) Examples
Compute triangular norms (tnorms), triangular conorms (tconorms), residua, biresidua, and negations.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43  algebra(name, stdneg = FALSE, ...)
is.algebra(a)
goedel.tnorm(...)
lukas.tnorm(...)
goguen.tnorm(...)
pgoedel.tnorm(...)
plukas.tnorm(...)
pgoguen.tnorm(...)
goedel.tconorm(...)
lukas.tconorm(...)
goguen.tconorm(...)
pgoedel.tconorm(...)
plukas.tconorm(...)
pgoguen.tconorm(...)
goedel.residuum(x, y)
lukas.residuum(x, y)
goguen.residuum(x, y)
goedel.biresiduum(x, y)
lukas.biresiduum(x, y)
goguen.biresiduum(x, y)
invol.neg(x)
strict.neg(x)

name 
The name of the algebra to be created. Must be one of: "goedel", "lukasiewicz", "goguen" (or an unambiguous abbreviation). 
stdneg 
(Deprecated.) 
... 
For tnorms and tconorms, these arguments are numeric vectors of values to compute tnorms or tconorms from. Values outside the [0,1] interval cause an error. NA values are also permitted. For the 
a 
An object to be checked if it is a valid algebra (i.e. a list
returned by the 
x 
Numeric vector of values to compute a residuum or biresiduum from. Values outside the [0,1] interval cause an error. NA values are also permitted. 
y 
Numeric vector of values to compute a residuum or biresiduum from. Values outside the [0,1] interval cause an error. NA values are also permitted. 
goedel.tnorm
, lukas.tnorm
, and goguen.tnorm
compute the
Goedel, Lukasiewicz, and Goguen triangular norm (tnorm) from all values in
the arguments. If the arguments are vectors they are combined together
firstly so that a numeric vector of length 1 is returned.
pgoedel.tnorm
, plukas.tnorm
, and pgoguen.tnorm
compute
the same tnorms, but in an elementwise manner. I.e. the values
with indices 1 of all arguments are used to compute the tnorm, then the
second values (while recycling the vectors if they do not have the same
size) so that the result is a vector of values.
goedel.tconorm
, lukas.tconorm
, goguen.tconorm
, are
similar to the previously mentioned functions, except that they compute
triangular conorms (tconorms). pgoedel.tconorm
,
plukas.tconorm
, and pgoguen.tconorm
are their elementwise alternatives.
goedel.residuum
, lukas.residuum
, and goguen.residuum
compute residua (i.e. implications) and goedel.biresiduum
,
lukas.biresiduum
, and goguen.biresiduum
compute biresidua. Residua and
biresidua are computed in an elementwise manner, for each corresponding
pair of values in x
and y
arguments.
invol.neg
and strict.neg
compute the involutive and strict
negation, respectively.
Let a, b be values from the interval [0, 1]. The realized functions can be defined as follows:
Goedel tnorm: min{a, b};
Goguen tnorm: ab;
Lukasiewicz tnorm: max{0, a+b1};
Goedel tconorm: max{a, b};
Goguen tconorm: a+bab;
Lukasiewicz tconorm: min{1, a+b};
Goedel residuum (standard Goedel implication): 1 if a ≤ b and b otherwise;
Goguen residuum (implication): 1 if a ≤ b and b/a otherwise;
Lukasiewicz residuum (standard Lukasiewicz implication): 1 if a ≤ b and 1a+b otherwise;
Involutive negation: 1x;
Strict negation: 1 if x=0 and 0 otherwise.
Biresiduum B is derived from residuum R as follows:
B(a, b) = inf(R(a, b), R(b, a)),
where inf is the operation of infimum, which for all three algebras corresponds to the min operation.
The arguments have to be numbers from the interval [0, 1]. Values outside that range cause an error. NaN values are treated as NAs.
If some argument is NA or NaN, the result is NA. For other handling of missing values, see algebraNA.
Selection of a tnorm may serve as a basis for definition of other operations.
From the tnorm, the operation of a residual implication may be defined, which
in turn allows the definition of a residual negation. If the residual negation
is not involutive, the involutive negation is often added as a new operation
and together with the tnorm can be used to define the tconorm. Therefore,
the algebra
function returns a named list of operations derived from the selected
Goedel, Goguen, or Lukasiewicz tnorm. Concretely:
algebra("goedel")
: returns the strict negation as the residual negation,
the involutive negation, and also the Goedel tnorm, tconorm, residuum, and biresiduum;
algebra("goguen")
: returns the strict negation as the residual negation,
the involutive negation, and also the Goguen tnorm, tconorm, residuum, and biresiduum;
algebra("lukasiewicz")
: returns involutive negation as both residual and involutive
negation, and also the Lukasiewicz tnorm, tconorm, residuum, and biresiduum.
Moreover, algebra
returns the supremum and infimum functions computed as maximum and minimum,
respectively.
is.algebra
tests whether the given a
argument is a valid
algebra, i.e. a list returned by the algebra
function.
Functions for tnorms and tconorms (such as goedel.tnorm
)
return a numeric vector of size 1 that is the result of the appropriate
tnorm or tconorm applied on all values of all arguments.
Elementwise versions of tnorms and tconorms (such as pgoedel.tnorm
)
return a vector of results after applying the appropriate tnorm or tconorm
on argument in an elementwise (i.e. by indices) way. The
resulting vector is of length of the longest argument (shorter arguments are
recycled).
Residua and biresidua functions return a numeric vector of length of the longest argument (shorter argument is recycled).
strict.neg
and invol.neg
compute negations and return a
numeric vector of the same size as the argument x
.
algebra
returns a list of functions of the requested algebra:
"n"
(residual negation), "ni"
(involutive negation), "t"
(tnorm),
"pt"
(elementwise tnorm),
"c"
(tconorm), "pc"
(elementwise tconorm), "r"
(residuum),
"b"
(biresiduum), "s"
(supremum),
"ps"
(elementwise supremum), "i"
(infimum), and
"pi"
(elementwise infimum).
For Lukasiewicz algebra, the elements "n"
and "ni"
are the same, i.e.
the invol.neg
function. For Goedel and Goguen algebra, "n"
(the residual
negation) equals strict.neg
and "ni"
(the involutive negation) equals
invol.neg
.
"s"
, "ps"
, "i"
, "pi"
are the same for each type of algebra:
goedel.conorm
, pgoedel.conorm
, goedel.tnorm
, and pgoedel.tnorm
.
Michal Burda
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  # direct and elementwise version of functions
goedel.tnorm(c(0.3, 0.2, 0.5), c(0.8, 0.1, 0.5)) # 0.1
pgoedel.tnorm(c(0.3, 0.2, 0.5), c(0.8, 0.1, 0.5)) # c(0.3, 0.1, 0.5)
# algebras
x < runif(10)
y < runif(10)
a < algebra('goedel')
a$n(x) # residual negation
a$ni(x) # involutive negation
a$t(x, y) # tnorm
a$pt(x, y) # elementwise tnorm
a$c(x, y) # tconorm
a$pc(x, y) # elementwise tconorm
a$r(x, y) # residuum
a$b(x, y) # biresiduum
a$s(x, y) # supremum
a$ps(x, y) # elementwise supremum
a$i(x, y) # infimum
a$pi(x, y) # elementwise infimum
is.algebra(a) # TRUE

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.