CnfSymbol: Symbols for CNF Formulas

View source: R/CnfSymbol.R

CnfSymbolR Documentation

Symbols for CNF Formulas

Description

Representation of Symbols used in CNF formulas. Symbols have a name and a domain (a set of possible values), and are stored in a CnfUniverse.

Once created, it is currently not intended to modify or delete symbols.

Symbols can be used in CNF formulas by creating CnfAtom objects, either by using the ⁠%among%⁠ operator or by using the CnfAtom() constructor explicitly.

This is part of the CNF representation tooling, which is currently considered experimental; it is for internal use.

Usage

CnfSymbol(universe, name, domain)

Arguments

universe

(CnfUniverse)
The universe in which the symbol is defined.

name

(character(1))
The name of the symbol.

domain

(character)
The domain, i.e. the set of possible values for the symbol. Must not be empty.

Value

A new CnfSymbol object.

See Also

Other CNF representation objects: CnfAtom(), CnfClause(), CnfFormula(), CnfUniverse()

Examples

u = CnfUniverse()
X = CnfSymbol(u, "X", c("a", "b", "c"))

# Use symbols to create CnfAtom objects
X %among% c("a", "b")
X %among% "a"
X %among% character(0)
X %among% c("a", "b", "c")


mlr3pipelines documentation built on Sept. 30, 2024, 9:37 a.m.