New in Version 0.6.233
Released 05 Jul 2011
Changes to the simple interface
- The compute manager class has been removed;
all its functionality has been moved to
the
MEDDLY
namespace. For example, the old code segmentcompute_manager* CM = getComputeManager(); CM->apply(compute_manager::UNION, x, y, z);
can be replaced by
apply(UNION, x, y, z);
- The types of the operation codes (e.g.,
UNION
) have changed. Most applications should not be affected by this; however, the change is visible to the simple interface. - A call to
MEDDLY::cleanup()
will automatically destroy any remaining domains, forests, or other objects created by MEDDLY. (This known issue listed under version 0.5 seems to be resolved.) - A few operation names have changed:
old
MIN
is nowMINIMUM
and oldMAX
is nowMAXIMUM
.
Changes to the expert interface
- Operation codes are now classes instead of an enumerated type. Each operation knows its own name and how to build an operation for specified forests (more on that, below).
- The old operation and op_info classes have been merged together into a new operation class. Each instance of operation is tied to specific forests.
- There are operation subclasses for unary, binary, and numerical operations. A numerical operation is tied to specific forest edges.
- Numerical operations have moved to the expert interface,
and are accessed as follows.
Old code:
// preprocessing compute_manager* CM = getComputeManager(); // ... // critical CM->vectorMatrixMultiply(y, y_ind, x, x_ind, A);
New code:
// preprocessing numerical_operation* VM = VECT_MATR_MULT->buildOperation(y_ind, A, x_ind); // ... // critical VM->compute(y, x);
- Users may define their own operations in user space,
and initialize them with the same mechanism as the
built-in operations.
To do this:
- Derive a class from
op_initializer
and implement the required virtual functions. - Insert your initializer into the instance of
settings
used to initialize the library. If you want to initialize the builtin operations, you should use something likeMEDDLY::settings s; s.operationBuilder = new my_initializer(s.operationBuilder); MEDDLY::initialize(s);
- Your initializer’s
initChain
method will be called during the call toMEDDLY::initialize(s);
- Your initializer’s
cleanupChain
method will be called during the call toMEDDLY::cleanup();
- Derive a class from
Known Issues
- The current compute table is not as fast as the old one for some operations.