9#include "MantidAPI/DllConfig.h"
15#define BOOST_ALLOW_DEPRECATED_HEADERS
16#include <boost/graph/adjacency_list.hpp>
17#undef BOOST_ALLOW_DEPRECATED_HEADERS
18#include <unordered_map>
53 bool ignoreMaskedDetectors =
false);
56 std::map<specnum_t, Mantid::Kernel::V3D> neighboursInRadius(
specnum_t spectrum,
double radius = 0.0)
const;
59 std::map<specnum_t, Mantid::Kernel::V3D> neighbours(
specnum_t spectrum)
const;
62 std::vector<size_t> getSpectraDetectors();
72 boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::property<boost::vertex_name_t, int64_t>,
73 boost::property<boost::edge_name_t, Mantid::Kernel::V3D>>;
75 using Vertex = boost::graph_traits<Graph>::vertex_descriptor;
77 using MapIV = std::unordered_map<specnum_t, Vertex>;
81 void build(
const int noNeighbours);
84 std::map<specnum_t, Mantid::Kernel::V3D> defaultNeighbours(
const specnum_t spectrum)
const;
94 boost::property_map<Graph, boost::vertex_name_t>::type
m_vertexID;
API::SpectrumInfo is an intermediate step towards a SpectrumInfo that is part of Instrument-2....
This class is not intended for direct use.
bool m_bIgnoreMaskedDetectors
Flag indicating that masked detectors should be ignored.
boost::property_map< Graph, boost::edge_name_t >::type m_edgeLength
property map holding the edge's related Distance value.
int m_noNeighbours
The current number of nearest neighbours.
double m_cutoff
The largest value of the distance to a nearest neighbour.
boost::property_map< Graph, boost::vertex_name_t >::type m_vertexID
property map holding the node's related DetectorID's
boost::graph_traits< Graph >::vertex_descriptor Vertex
Vertex descriptor object for Graph.
Graph m_graph
boost::graph object
double m_radius
Cached radius value. used to avoid uncessary recalculations.
std::unordered_map< specnum_t, Vertex > MapIV
map object of int to Graph Vertex descriptor
boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, boost::property< boost::vertex_name_t, int64_t >, boost::property< boost::edge_name_t, Mantid::Kernel::V3D > > Graph
typedef for Graph object used to hold the calculated information
MapIV m_specToVertex
map between the DetectorID and the Graph node descriptor
Kernel::V3D m_scale
V3D for scaling.
const SpectrumInfo & m_spectrumInfo
A reference to the SpectrumInfo.
const std::vector< specnum_t > m_spectrumNumbers
Vector of spectrum numbers.
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.