13#include <boost/tuple/tuple.hpp>
18namespace DataObjects {
24using MDExtentPair = boost::tuple<Mantid::coord_t, Mantid::coord_t>;
40 size_t endPos =
size_t(-1));
43 size_t endPos =
size_t(-1));
46 size_t endPos =
size_t(-1));
48 size_t beginPos = 0,
size_t endPos =
size_t(-1));
52 size_t endPos =
size_t(-1));
54 size_t getDataSize()
const override;
56 bool valid()
const override;
60 bool next(
size_t skip)
override;
62 void jumpTo(
size_t index)
override;
66 signal_t getNormalizedSignal()
const override;
68 signal_t getNormalizedError()
const override;
74 std::unique_ptr<coord_t[]> getVertexesArray(
size_t &numVertices)
const override;
76 std::unique_ptr<coord_t[]> getVertexesArray(
size_t &numVertices,
const size_t outDimensions,
77 const bool *maskDim)
const override;
81 size_t getNumEvents()
const override;
83 virtual signal_t getNumEventsFraction()
const;
85 uint16_t getInnerExpInfoIndex(
size_t index)
const override;
87 uint16_t getInnerGoniometerIndex(
size_t index)
const override;
89 int32_t getInnerDetectorID(
size_t index)
const override;
91 coord_t getInnerPosition(
size_t index,
size_t dimension)
const override;
97 bool getIsMasked()
const override;
99 size_t getLinearIndex()
const override;
101 std::vector<size_t> findNeighbourIndexes()
const override;
103 std::vector<size_t> findNeighbourIndexesFaceTouching()
const override;
105 std::vector<size_t> findNeighbourIndexesByWidth(
const int &width)
const;
107 std::pair<std::vector<size_t>, std::vector<bool>> findNeighbourIndexesByWidth1D(
const int &width,
108 const int &width_dimension)
const;
110 std::vector<size_t> findNeighbourIndexesByWidth(
const std::vector<int> &widths)
const;
112 bool isWithinBounds(
size_t index)
const override;
114 size_t permutationCacheSize()
const;
132 std::unique_ptr<Mantid::Geometry::MDImplicitFunction>
m_function;
166 std::vector<int64_t> createPermutations(
const std::vector<int> &widths)
const;
IPeaksWorkspace_sptr workspace
std::map< DeltaEMode::Type, std::string > index
This is an interface to an iterator of an IMDWorkspace.
An implementation of IMDIterator that iterates through a MDHistoWorkspace.
coord_t * m_binWidth
Width of each bin in each dimension.
uint64_t m_pos
The linear position/index into the MDHistoWorkspace.
std::vector< int64_t > m_permutationsFaceTouching
Neigbour finding permutations for face touching neighbours (3 by 3 width).
uint64_t m_max
The maximum linear index in the workspace.
size_t m_nd
Number of dimensions.
size_t * m_index
Index into each dimension.
std::unique_ptr< Mantid::Geometry::MDImplicitFunction > m_function
Implicit function to limit volume searched.
PermutationsMap m_permutationsVertexTouchingMap
Neighbour finding permutations map for vertex touching.
coord_t * m_origin
Origin (index 0,0,0) in the space = the minimum of each dimension.
size_t * m_indexMaker
Array to find indices from linear indices.
coord_t * m_center
Center of the current box. Not set until getCenter() is called.
size_t * m_indexMax
Index into each dimension.
SkippingPolicy_scptr m_skippingPolicy
Skipping policy.
const MDHistoWorkspace * m_ws
The MDHistoWorkspace being iterated.
uint64_t m_begin
The beginning linear index in the workspace.
SkippingPolicy : Policy types for skipping in MDiterators.
An "ImplicitFunction" defining a hyper-cuboid-shaped region in N dimensions.
boost::scoped_ptr< SkippingPolicy > SkippingPolicy_scptr
boost::tuple< Mantid::coord_t, Mantid::coord_t > MDExtentPair
std::map< std::vector< int >, std::vector< int64_t > > PermutationsMap
std::shared_ptr< const MDHistoWorkspace > MDHistoWorkspace_const_sptr
A shared pointer to a const MDHistoWorkspace.
std::vector< MDExtentPair > VecMDExtents
Helper class which provides the Collimation Length for SANS instruments.
float coord_t
Typedef for the data type to use for coordinate axes in MD objects such as MDBox, MDEventWorkspace,...
double signal_t
Typedef for the signal recorded in a MDBox, etc.