-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Janik Zikovsky
committed
Nov 8, 2011
1 parent
1f8a1cf
commit 026651b
Showing
25 changed files
with
1,462 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/AndMD.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#ifndef MANTID_MDALGORITHMS_ANDMD_H_ | ||
#define MANTID_MDALGORITHMS_ANDMD_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/Algorithm.h" | ||
#include "MantidMDAlgorithms/BinaryOperationMD.h" | ||
#include "MantidMDAlgorithms/BooleanBinaryOperationMD.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace MDAlgorithms | ||
{ | ||
|
||
/** AndMD : Perform the And boolean operation on two MDHistoWorkspaces | ||
@date 2011-11-08 | ||
Copyright © 2011 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class DLLExport AndMD : public BooleanBinaryOperationMD | ||
{ | ||
public: | ||
AndMD(); | ||
virtual ~AndMD(); | ||
|
||
virtual const std::string name() const; | ||
virtual int version() const; | ||
|
||
private: | ||
void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); | ||
}; | ||
|
||
|
||
} // namespace MDAlgorithms | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_MDALGORITHMS_ANDMD_H_ */ |
67 changes: 67 additions & 0 deletions
67
Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/BooleanBinaryOperationMD.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#ifndef MANTID_MDALGORITHMS_BOOLEANBINARYOPERATIONMD_H_ | ||
#define MANTID_MDALGORITHMS_BOOLEANBINARYOPERATIONMD_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/Algorithm.h" | ||
#include "MantidMDAlgorithms/BinaryOperationMD.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace MDAlgorithms | ||
{ | ||
|
||
/** BooleanBinaryOperationMD : base class for boolean-type operations on MDHistoWorkspaces | ||
@date 2011-11-08 | ||
Copyright © 2011 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class DLLExport BooleanBinaryOperationMD : public BinaryOperationMD | ||
{ | ||
public: | ||
BooleanBinaryOperationMD(); | ||
virtual ~BooleanBinaryOperationMD(); | ||
|
||
virtual const std::string name() const; | ||
virtual int version() const; | ||
|
||
protected: | ||
/// Return true if the algorithm can operate on a scalar. | ||
virtual bool acceptScalar() | ||
{ return true; } | ||
|
||
virtual void initDocs(); | ||
bool commutative() const; | ||
void checkInputs(); | ||
void execEvent(); | ||
virtual void execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); | ||
|
||
/// Run the algorithm with a MDHisotWorkspace as output and operand | ||
virtual void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::MDEvents::MDHistoWorkspace_const_sptr operand) = 0; | ||
|
||
|
||
}; | ||
|
||
|
||
} // namespace MDAlgorithms | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_MDALGORITHMS_BOOLEANBINARYOPERATIONMD_H_ */ |
57 changes: 57 additions & 0 deletions
57
Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/EqualToMD.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#ifndef MANTID_MDALGORITHMS_EQUALTOMD_H_ | ||
#define MANTID_MDALGORITHMS_EQUALTOMD_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/Algorithm.h" | ||
#include "MantidMDAlgorithms/BooleanBinaryOperationMD.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace MDAlgorithms | ||
{ | ||
|
||
/** EqualToMD : boolean operation on MDHistoWorkspaces | ||
@date 2011-11-08 | ||
Copyright © 2011 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class DLLExport EqualToMD : public BooleanBinaryOperationMD | ||
{ | ||
public: | ||
EqualToMD(); | ||
virtual ~EqualToMD(); | ||
|
||
virtual const std::string name() const; | ||
virtual int version() const; | ||
|
||
private: | ||
bool acceptScalar() { return true; } | ||
void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); | ||
void execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); | ||
|
||
}; | ||
|
||
|
||
} // namespace MDAlgorithms | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_MDALGORITHMS_EQUALTOMD_H_ */ |
59 changes: 59 additions & 0 deletions
59
Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/GreaterThanMD.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#ifndef MANTID_MDALGORITHMS_GREATERTHANMD_H_ | ||
#define MANTID_MDALGORITHMS_GREATERTHANMD_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/Algorithm.h" | ||
#include "MantidMDAlgorithms/BooleanBinaryOperationMD.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace MDAlgorithms | ||
{ | ||
|
||
/** GreaterThanMD : boolean operation on MDHistoWorkspaces | ||
@date 2011-11-08 | ||
Copyright © 2011 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory | ||
This file is part of Mantid. | ||
Mantid is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
Mantid is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
File change history is stored at: <https://svn.mantidproject.org/mantid/trunk/Code/Mantid> | ||
Code Documentation is available at: <http://doxygen.mantidproject.org> | ||
*/ | ||
class DLLExport GreaterThanMD : public BooleanBinaryOperationMD | ||
{ | ||
public: | ||
GreaterThanMD(); | ||
virtual ~GreaterThanMD(); | ||
|
||
virtual const std::string name() const; | ||
virtual int version() const; | ||
|
||
private: | ||
bool acceptScalar() { return true; } | ||
bool commutative() { return false; } | ||
|
||
void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); | ||
void execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); | ||
|
||
}; | ||
|
||
|
||
} // namespace MDAlgorithms | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_MDALGORITHMS_GREATERTHANMD_H_ */ |
Oops, something went wrong.