Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*WIKI*
Perform the Xor (exclusive-or) boolean operation on two MDHistoWorkspaces.
The xor operation is performed element-by-element.
A signal of 0.0 means "false" and any non-zero signal is "true".
*WIKI*/
#include "MantidMDAlgorithms/XorMD.h"
#include "MantidKernel/System.h"
using namespace Mantid::Kernel;
using namespace Mantid::API;
namespace Mantid
{
namespace MDAlgorithms
{
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(XorMD)
//----------------------------------------------------------------------------------------------
/** Constructor
*/
XorMD::XorMD()
{ }
//----------------------------------------------------------------------------------------------
/** Destructor
*/
XorMD::~XorMD()
{ }
//----------------------------------------------------------------------------------------------
/// Algorithm's name for identification. @see Algorithm::name
const std::string XorMD::name() const { return "XorMD";};
/// Algorithm's version for identification. @see Algorithm::version
int XorMD::version() const { return 1;};
//----------------------------------------------------------------------------------------------
/// Run the algorithm with a MDHisotWorkspace as output and operand
void XorMD::execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::MDEvents::MDHistoWorkspace_const_sptr operand)
{
out->operator ^=(*operand);
}
} // namespace Mantid
} // namespace MDAlgorithms