You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This involves extending the iterator class to loop over the smaller workspace repeatedly. You will need to consider and implement sensible rules to control if the operation is valid.
Also consider adding workspace operator overloads as unowned methods in the API namespace that will allow workspaces to be added using code such as
W1= W2 + W3;
- Using the algorithmManager to get the correct algorithm as a child algorithm
- Set the input workspaces of the algorithm and execute it
- Extract and return the output workspace.
The text was updated successfully, but these errors were encountered:
This involves extending the iterator class to loop over the smaller workspace repeatedly. You will need to consider and implement sensible rules to control if the operation is valid.
Also consider adding workspace operator overloads as unowned methods in the API namespace that will allow workspaces to be added using code such as
W1= W2 + W3;
eg. (note this is not correct but gives an idea)
```
#include “MantidKernel/System.h”
#include “MantidAPI/IAlgorithm.h”
#include “MantidAPI/Workspace.h”
#include “MantidKernel/Logger.h”
#include “boost/shared_ptr.hpp”
wsp_ptr DLLExport operator+(const Workspace& lhs,const Workspace& rhs); wsp_ptr DLLExport operator-(const Workspace& lhs,const Workspace& rhs); wsp_ptr DLLExport operator*(const Workspace& lhs,const Workspace& rhs); wsp_ptr DLLExport operator/(const Workspace& lhs,const Workspace& rhs); }namespace Mantid
{
namespace API
{
// Workspace operator overloads
typedef boost::shared_ptr`` wsp_ptr;
}
The operator overloads would```
- Using the algorithmManager to get the correct algorithm as a child algorithm
- Set the input workspaces of the algorithm and execute it
- Extract and return the output workspace.
The text was updated successfully, but these errors were encountered: