SourceXtractorPlusPlus 0.18
SourceXtractor++, the next generation SExtractor
AssocMode.h
Go to the documentation of this file.
1
18#ifndef _SEIMPLEMENTATION_PLUGIN_ASSOCMODE_ASSOCMODE_H_
19#define _SEIMPLEMENTATION_PLUGIN_ASSOCMODE_ASSOCMODE_H_
20
21#include "NdArray/NdArray.h"
22
23#include "SEUtils/Types.h"
26
27namespace SourceXtractor {
28
33class AssocMode : public Property {
34public:
35 template<typename T>
37
41 virtual ~AssocMode() = default;
42
43 AssocMode(bool has_assoc, const std::vector<double>& assoc_data) :
44 m_has_assoc(has_assoc), m_assoc_data(std::vector<size_t>({assoc_data.size()})) {
45 for (size_t i=0; i<assoc_data.size(); i++) {
46 m_assoc_data.at(i) = assoc_data[i];
47 }
48 }
49
50 bool getMatch() const {
51 return m_has_assoc;
52 }
53
55 return m_assoc_data;
56 }
57
58private:
60
62};
63
64} /* namespace SourceXtractor */
65
66#endif /* _SEIMPLEMENTATION_PLUGIN_ASSOCMODE_ASSOCMODE_H_ */
T & at(const std::vector< size_t > &coords)
const NdArray< SeFloat > & getAssocValues() const
Definition: AssocMode.h:54
bool getMatch() const
Definition: AssocMode.h:50
virtual ~AssocMode()=default
Destructor.
NdArray< SeFloat > m_assoc_data
Definition: AssocMode.h:61
Euclid::NdArray::NdArray< T > NdArray
Definition: AssocMode.h:36
AssocMode(bool has_assoc, const std::vector< double > &assoc_data)
Definition: AssocMode.h:43
Base class for all Properties. (has no actual content)
Definition: Property.h:33
STL namespace.
T size(T... args)