Module: Cudd
- Defined in:
- lib/cudd-rb.rb,
lib/cudd-rb/bdd.rb,
lib/cudd-rb/cube.rb,
lib/cudd-rb/errors.rb,
lib/cudd-rb/manager.rb,
lib/cudd-rb/version.rb,
lib/cudd-rb/wrapper.rb,
lib/cudd-rb/interfaces/bdd.rb,
lib/cudd-rb/interfaces/root.rb
Overview
A ruby bridge to the CU Decision Diagram package (CUDD).
Defined Under Namespace
Modules: BDD, Interface, Version, Wrapper Classes: Cube, Error, Manager, NotACubeError
Constant Summary collapse
- UNIQUE_SLOTS =
initial size of subtables
256
- CACHE_SLOTS =
default size of the cache
262144
- VERSION =
Version.to_s
Class Method Summary collapse
-
.manager(opts = {}) ⇒ Object
Creates a manager instance.
Class Method Details
.manager(opts = {}) ⇒ Object
Creates a manager instance.
Recognized options match ‘Cudd_Init` arguments.
-
:numVars (defaults to 0) initial number of BDD variables (subtables)
-
:numVarsZ (defaults to 0) initial number of ZDD variables (subtables)
-
:numSlots (defaults to UNIQUE_SLOTS) initial size of the unique tables
-
:cacheSize (defaults to CACHE_SLOTS) initial size of the cache
-
:maxMemory (defaults to 0) target maximum memory occupation
If a block is given, the manager is yield and automatically closed when the block terminates (its result is returned). Otherwise, the manager is returned and its is the responsibility of the caller to close it.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/cudd-rb.rb', line 26 def self.manager(opts = {}) manager = Manager.root(opts.dup) if block_given? begin yield(manager) ensure manager.close if manager.alive? end else manager end end |