-
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.
Refs #4036: All binary operations MD
No MDEvent - MDEvent operation for now, will add if needed.
- Loading branch information
Janik Zikovsky
committed
Nov 7, 2011
1 parent
dfcf3f8
commit 678ddee
Showing
19 changed files
with
885 additions
and
93 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
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
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
72 changes: 72 additions & 0 deletions
72
Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/DivideMD.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,72 @@ | ||
#ifndef MANTID_MDALGORITHMS_DIVIDEMD_H_ | ||
#define MANTID_MDALGORITHMS_DIVIDEMD_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/Algorithm.h" | ||
#include "MantidMDAlgorithms/BinaryOperationMD.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace MDAlgorithms | ||
{ | ||
|
||
/** DivideMD : divide operation for MDWorkspaces | ||
@date 2011-11-07 | ||
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 DivideMD : public BinaryOperationMD | ||
{ | ||
public: | ||
DivideMD(); | ||
~DivideMD(); | ||
|
||
virtual const std::string name() const; | ||
virtual int version() const; | ||
|
||
private: | ||
virtual void initDocs(); | ||
|
||
/// Is the operation commutative? | ||
bool commutative() const; | ||
|
||
/// Check the inputs and throw if the algorithm cannot be run | ||
void checkInputs(); | ||
|
||
/// Run the algorithm with an MDEventWorkspace as output | ||
void execEvent(); | ||
|
||
/// Run the algorithm with a MDHisotWorkspace as output and operand | ||
void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); | ||
|
||
/// Run the algorithm with a MDHisotWorkspace as output, scalar and operand | ||
void execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); | ||
|
||
|
||
|
||
}; | ||
|
||
|
||
} // namespace MDAlgorithms | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_MDALGORITHMS_DIVIDEMD_H_ */ |
70 changes: 70 additions & 0 deletions
70
Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MinusMD.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,70 @@ | ||
#ifndef MANTID_MDALGORITHMS_MINUSMD_H_ | ||
#define MANTID_MDALGORITHMS_MINUSMD_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/Algorithm.h" | ||
#include "MantidMDAlgorithms/BinaryOperationMD.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace MDAlgorithms | ||
{ | ||
|
||
/** MinusMD : minus operation for MDWorkspaces | ||
@date 2011-11-07 | ||
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 MinusMD : public BinaryOperationMD | ||
{ | ||
public: | ||
MinusMD(); | ||
~MinusMD(); | ||
|
||
virtual const std::string name() const; | ||
virtual int version() const; | ||
|
||
private: | ||
virtual void initDocs(); | ||
|
||
/// Is the operation commutative? | ||
bool commutative() const; | ||
|
||
/// Check the inputs and throw if the algorithm cannot be run | ||
void checkInputs(); | ||
|
||
/// Run the algorithm with an MDEventWorkspace as output | ||
void execEvent(); | ||
|
||
/// Run the algorithm with a MDHisotWorkspace as output and operand | ||
void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); | ||
|
||
/// Run the algorithm with a MDHisotWorkspace as output, scalar and operand | ||
void execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); | ||
|
||
}; | ||
|
||
|
||
} // namespace MDAlgorithms | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_MDALGORITHMS_MINUSMD_H_ */ |
71 changes: 71 additions & 0 deletions
71
Code/Mantid/Framework/MDAlgorithms/inc/MantidMDAlgorithms/MultiplyMD.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,71 @@ | ||
#ifndef MANTID_MDALGORITHMS_MULTIPLYMD_H_ | ||
#define MANTID_MDALGORITHMS_MULTIPLYMD_H_ | ||
|
||
#include "MantidKernel/System.h" | ||
#include "MantidAPI/Algorithm.h" | ||
#include "MantidMDAlgorithms/BinaryOperationMD.h" | ||
|
||
namespace Mantid | ||
{ | ||
namespace MDAlgorithms | ||
{ | ||
|
||
/** MultiplyMD : multiplication operation for MDWorkspaces | ||
@date 2011-11-07 | ||
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 MultiplyMD : public BinaryOperationMD | ||
{ | ||
public: | ||
MultiplyMD(); | ||
~MultiplyMD(); | ||
|
||
virtual const std::string name() const; | ||
virtual int version() const; | ||
|
||
private: | ||
virtual void initDocs(); | ||
|
||
/// Is the operation commutative? | ||
bool commutative() const; | ||
|
||
/// Check the inputs and throw if the algorithm cannot be run | ||
void checkInputs(); | ||
|
||
/// Run the algorithm with an MDEventWorkspace as output | ||
void execEvent(); | ||
|
||
/// Run the algorithm with a MDHisotWorkspace as output and operand | ||
void execHistoHisto(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::MDEvents::MDHistoWorkspace_const_sptr operand); | ||
|
||
/// Run the algorithm with a MDHisotWorkspace as output, scalar and operand | ||
void execHistoScalar(Mantid::MDEvents::MDHistoWorkspace_sptr out, Mantid::DataObjects::WorkspaceSingleValue_const_sptr scalar); | ||
|
||
|
||
}; | ||
|
||
|
||
} // namespace MDAlgorithms | ||
} // namespace Mantid | ||
|
||
#endif /* MANTID_MDALGORITHMS_MULTIPLYMD_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
Oops, something went wrong.