Skip to content

Commit

Permalink
Refs #4036 wiki docs
Browse files Browse the repository at this point in the history
and windows fix maybe
  • Loading branch information
Janik Zikovsky committed Nov 7, 2011
1 parent 678ddee commit f52f008
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Build/class_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class DLLExport %s %s
{
public:
%s();
~%s();
virtual ~%s();
%s
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace MDAlgorithms
{
public:
BinaryOperationMD();
~BinaryOperationMD();
virtual ~BinaryOperationMD();

virtual const std::string name() const;
virtual int version() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace MDAlgorithms
{
public:
DivideMD();
~DivideMD();
virtual ~DivideMD();

virtual const std::string name() const;
virtual int version() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace MDAlgorithms
{
public:
MinusMD();
~MinusMD();
virtual ~MinusMD();

virtual const std::string name() const;
virtual int version() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace MDAlgorithms
{
public:
MultiplyMD();
~MultiplyMD();
virtual ~MultiplyMD();

virtual const std::string name() const;
virtual int version() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace MDAlgorithms
{
public:
PlusMD();
~PlusMD();
virtual ~PlusMD();

/// Algorithm's name for identification
virtual const std::string name() const { return "PlusMD";};
Expand Down
15 changes: 13 additions & 2 deletions Code/Mantid/Framework/MDAlgorithms/src/DivideMD.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/*WIKI*
TODO: Enter a full wiki-markup description of your algorithm here. You can then use the Build/wiki_maker.py script to generate your full wiki page.
Divide two [[MDHistoWorkspace]]'s or a MDHistoWorkspace and a scalar.
The error of <math> f = a / b </math> is propagated with <math> df^2 = f^2 * (da^2 / a^2 + db^2 / b^2) </math>
* '''MDHistoWorkspace / MDHistoWorkspace'''
** The operation is performed element-by-element.
* '''MDHistoWorkspace / Scalar'''
** Every element of the MDHistoWorkspace is divided by the scalar.
* '''Scalar / MDHistoWorkspace'''
** This is not allowed.
* '''[[MDEventWorkspace]]'s'''
** This operation is not supported, as it is not clear what its meaning would be.
*WIKI*/

#include "MantidMDAlgorithms/DivideMD.h"
Expand All @@ -17,7 +29,6 @@ namespace MDAlgorithms
DECLARE_ALGORITHM(DivideMD)



//----------------------------------------------------------------------------------------------
/** Constructor
*/
Expand Down
25 changes: 11 additions & 14 deletions Code/Mantid/Framework/MDAlgorithms/src/MinusMD.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
/*WIKI*
Subtract two [[MDHistoWorkspace]]'s or [[MDEventWorkspace]]'s.
Subtract two [[MDHistoWorkspace]]'s or a MDHistoWorkspace and a scalar.
=== MDHistoWorkspace - MDHistoWorkspace ===
The operation is performed element-by-element.
=== MDHistoWorkspace - Scalar ===
The scalar (and its error) is subtracted from every element of the MDHistoWorkspace.
=== Scalar - MDHistoWorkspace ===
This is not allowed.
* '''MDHistoWorkspace - MDHistoWorkspace'''
** The operation is performed element-by-element.
* '''MDHistoWorkspace - Scalar '''
** The scalar is subtracted from every element of the MDHistoWorkspace. The squares of errors are summed.
* '''Scalar - MDHistoWorkspace'''
** This is not allowed.
* '''[[MDEventWorkspace]]'s'''
** This is not currently supported, but it could be in the future.
*WIKI*/

Expand Down Expand Up @@ -52,8 +49,8 @@ namespace MDAlgorithms
/// Sets documentation strings for this algorithm
void MinusMD::initDocs()
{
this->setWikiSummary("Subtract two [[MDHistoWorkspace]]'s or [[MDEventWorkspace]]'s.");
this->setOptionalMessage("Subtract two MDHistoWorkspace's or MDEventWorkspace's.");
this->setWikiSummary("Subtract two [[MDHistoWorkspace]]s");
this->setOptionalMessage("Subtract two MDHistoWorkspaces.");
}


Expand Down
12 changes: 11 additions & 1 deletion Code/Mantid/Framework/MDAlgorithms/src/MultiplyMD.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
/*WIKI*
TODO: Enter a full wiki-markup description of your algorithm here. You can then use the Build/wiki_maker.py script to generate your full wiki page.
Multiply two [[MDHistoWorkspace]]'s or a MDHistoWorkspace and a scalar.
The error of <math> f = a * b </math> is propagated with <math>df^2 = f^2 * (da^2 / a^2 + db^2 / b^2)</math>
* '''MDHistoWorkspace * MDHistoWorkspace'''
** The operation is performed element-by-element.
* '''MDHistoWorkspace * Scalar''' or '''Scalar * MDHistoWorkspace'''
** Every element of the MDHistoWorkspace is multiplied by the scalar.
* '''[[MDEventWorkspace]]'s'''
** This operation is not supported, as it is not clear what its meaning would be.
*WIKI*/

#include "MantidMDAlgorithms/MultiplyMD.h"
Expand Down
26 changes: 24 additions & 2 deletions Code/Mantid/Framework/MDAlgorithms/src/PlusMD.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
/*WIKI*
This algorithm sums two [[MDHistoWorkspace]]s or merges two [[MDEventWorkspace]]s together.
=== MDHistoWorkspaces ===
* '''MDHistoWorkspace + MDHistoWorkspace'''
** The operation is performed element-by-element.
* '''MDHistoWorkspace + Scalar''' or '''Scalar + MDHistoWorkspace'''
** The scalar is subtracted from every element of the MDHistoWorkspace. The squares of errors are summed.
=== MDEventWorkspaces ===
This algorithm operates similary to calling Plus on two [[EventWorkspace]]s: it combines the events from the two workspaces together to form one large workspace.
==== Note for file-backed workspaces ====
The algorithm uses [[CloneMDWorkspace]] to create the output workspace, except when adding in place (e.g. <math> A = A + B </math> ).
See [[CloneMDWorkspace]] for details, but note that a file-backed [[MDEventWorkspace]] will have its file copied.
* If A is in memory and B is file-backed, the operation <math> C = A + B </math> will clone the B file-backed workspace and add A to it.
* However, the operation <math> A = A + B </math> will clone the A workspace and add B into memory (which might be too big!)
Also, be aware that events added to a MDEventWorkspace are currently added '''in memory''' and are not cached to file until [[SaveMD]]
or another algorithm requiring it is called. The workspace is marked as 'requiring file update'.
*WIKI*/

#include "MantidAPI/IMDEventWorkspace.h"
Expand Down Expand Up @@ -42,8 +64,8 @@ namespace MDAlgorithms
/// Sets documentation strings for this algorithm
void PlusMD::initDocs()
{
this->setWikiSummary("Sum two [[MDHistoWorkspace]]s or merge two [[MDEventWorkspace]]s together by combining their events together in one workspace.");
this->setOptionalMessage("Sum two MDHistoWorkspaces or merge two MDEventWorkspaces together by combining their events together in one workspace.");
this->setWikiSummary("Sum two [[MDHistoWorkspace]]s or merges two [[MDEventWorkspace]]s together by combining their events together in one workspace.");
this->setOptionalMessage("Sum two MDHistoWorkspaces or merges two MDEventWorkspaces together by combining their events together in one workspace.");
}


Expand Down

0 comments on commit f52f008

Please sign in to comment.