Base class for CSM Wrappers. ie. PCA, OPLS etc.
The base class for the CSM wrappers. These wrappers are the standardised access points to the underlying CSM functions.
In order to create a new wrapper, you must implement the following methods:
assignDefaults( obj );
parseInput( obj );
callBaseTool( obj );
parseOutput( obj );
Your constructor should look similar to this:
function [obj] = csm_example_wrapper( arg1, arg2, arg3 )
% Allows creation of empty objects for cloning
if nargin == 0
return
end
obj = obj @ csm_wrapper( varargin{:} );
assignDefaults( obj, arg1, arg2, arg3 );
parseInput( obj );
callBaseTool( obj );
runAuditInfoMethods( obj );
parseOutput( obj );
end
Have a look at the code for any of the existing wrappers for examples
of building your own, eg csm_opls()
model = csm_wrapper( );
Variable | Type | Default Value | Description |
---|---|---|---|
no_audit | bool | false; | Set to true to not run the audit_info methods |
Variable | Type | Description |
---|---|---|
csm_wrapper.audit_info | csm_audit_info | The audit info for audit trails. |
csm_wrapper.class_name | str | The name of the child class. |
csm_wrapper.input | struct | The inputs of the object. |
csm_wrapper.output | struct | The outputs of the base methods |
csm_wrapper.csm_data_hashes | cell | The csm_data_hash of the data used in the object |
Copyright Imperial College London 2019