SourceXtractorPlusPlus  0.15
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
27 namespace SourceXtractor {
28 
33 class AssocMode : public Property {
34 public:
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 
54  const NdArray<SeFloat>& getAssocValues() const {
55  return m_assoc_data;
56  }
57 
58 private:
59  bool m_has_assoc;
60 
62 };
63 
64 } /* namespace SourceXtractor */
65 
66 #endif /* _SEIMPLEMENTATION_PLUGIN_ASSOCMODE_ASSOCMODE_H_ */
NdArray< SeFloat > m_assoc_data
Definition: AssocMode.h:44
Euclid::NdArray::NdArray< T > NdArray
AssocMode(bool has_assoc, const std::vector< double > &assoc_data)
Definition: AssocMode.h:43
virtual ~AssocMode()=default
Destructor.
Base class for all Properties. (has no actual content)
Definition: Property.h:33
Euclid::NdArray::NdArray< T > NdArray
Definition: AssocMode.h:36
T size(T...args)
T & at(const std::vector< size_t > &coords)