bbotk_assertions {bbotk} | R Documentation |
Assertion for bbotk objects
Description
Most assertion functions ensure the right class attribute, and optionally additional properties. Additionally, the following compound assertions are implemented:
-
assert_terminable(terminator, instance)
(Terminator, OptimInstance) ->NULL
Checks if the terminator is applicable to the optimization. -
assert_instance_properties(optimizer, instance)
(Optimizer, OptimInstance) ->NULL
Checks if the instance is applicable to the optimizer.
If an assertion fails, an exception is raised. Otherwise, the input object is returned invisibly.
Usage
assert_terminator(terminator, instance = NULL, null_ok = FALSE)
assert_terminators(terminators)
assert_terminable(terminator, instance)
assert_set(x, empty = TRUE, .var.name = vname(x))
assert_optimizer(optimizer, null_ok = FALSE)
assert_optimizer_async(optimizer, null_ok = FALSE)
assert_optimizer_batch(optimizer, null_ok = FALSE)
assert_instance(inst, null_ok = FALSE)
assert_instance_batch(inst, null_ok = FALSE)
assert_instance_async(inst, null_ok = FALSE)
assert_instance_properties(optimizer, inst)
assert_archive(archive, null_ok = FALSE)
assert_archive_async(archive, null_ok = FALSE)
assert_archive_batch(archive, null_ok = FALSE)
Arguments
terminator |
(Terminator). |
instance |
|
null_ok |
( |
terminators |
(list of Terminator). |
x |
(any) |
empty |
( |
.var.name |
( |
optimizer |
(Optimizer). |
inst |
|
archive |
(ArchiveBatch). |
[Package bbotk version 1.5.0 Index]