18namespace MantidWidgets {
19namespace WorkspaceUtils {
33 std::pair<double, double> &res);
37 std::size_t wsIndex = 0);
39 double precision = 0.000001);
47template <
typename T = Mant
id::API::MatrixWorkspace>
49 return Mantid::API::AnalysisDataService::Instance().retrieveWS<T>(workspaceName);
61template <
typename Iterator,
typename Functor>
62std::vector<std::string>
transformElements(Iterator
const fromIter, Iterator
const toIter, Functor
const &functor) {
63 std::vector<std::string> newVector;
64 newVector.reserve(toIter - fromIter);
65 std::transform(fromIter, toIter, std::back_inserter(newVector), functor);
69template <
typename T,
typename Predicate>
void removeElementsIf(std::vector<T> &vector, Predicate
const &filter) {
70 auto const iter = std::remove_if(vector.begin(), vector.end(), filter);
71 if (iter != vector.end())
72 vector.erase(iter, vector.end());
76 std::string
const &prefix);
#define EXPORT_OPT_MANTIDQT_COMMON
IPeaksWorkspace_sptr workspace
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...
std::shared_ptr< const MatrixWorkspace > MatrixWorkspace_const_sptr
shared pointer to the matrix workspace base class (const version)
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class