11 #ifndef GAUDIUTILS_H1_H
12 #define GAUDIUTILS_H1_H 1
30 void setHighEdge(
double value ) { high = value; }
31 void setLowEdge(
double value ) { low = value; }
32 void setNBins(
unsigned int value ) { nbins = value; }
35 Edges& operator-=(
double value ) {
39 Edges& operator+=(
double value ) {
47 Edges& operator/=(
unsigned int value ) {
52 bool ok()
const {
return edges.empty() ? low < high && 0 < nbins : 2 < edges.size(); }
53 unsigned int nBins()
const {
return edges.empty() ? nbins : edges.size() - 1; }
71 void setEdges( Edges value ) { m_edges =
std::move( value ); }
72 void setHighEdge(
const double value ) { m_edges.setHighEdge( value ); }
73 void setLowEdge(
const double value ) { m_edges.setLowEdge( value ); }
74 void setNBins(
const unsigned int value ) { m_edges.setNBins( value ); }
76 void setBins( Bins value ) { m_bins =
std::move( value ); }
86 H1& operator^=(
const double value ) {
90 H1& operator-=(
const double value ) {
94 H1& operator|=(
const unsigned int value ) {
99 H1& operator&=( Edges value ) {
103 H1& operator+=( Bins value ) {
109 if ( m_bins.empty() ) {
return false; }
110 if ( !m_edges.ok() ) {
return false; }
111 if ( m_bins.size() != m_edges.nBins() + 2 ) {
return false; }
130 void setXEdges( Edges value ) { m_xedges =
std::move( value ); }
131 void setYEdges( Edges value ) { m_yedges =
std::move( value ); }
132 void setBins( Bins value ) { m_bins =
std::move( value ); }
142 H2& operator&=( Edges value ) {
146 H2& operator|=( Edges value ) {
150 H2& operator+=( Bins value ) {
156 if ( m_bins.empty() ) {
return false; }
157 if ( !m_xedges.ok() ) {
return false; }
158 if ( !m_yedges.ok() ) {
return false; }
159 if ( m_bins.size() != ( m_xedges.nBins() + 2 ) * ( m_yedges.nBins() + 2 ) ) {
return false; }
180 void setXEdges( Edges value ) { m_xedges =
std::move( value ); }
181 void setYEdges( Edges value ) { m_yedges =
std::move( value ); }
182 void setZEdges( Edges value ) { m_zedges =
std::move( value ); }
183 void setBins( Bins value ) { m_bins =
std::move( value ); }
193 H3& operator&=( Edges value ) {
197 H3& operator|=( Edges value ) {
201 H3& operator-=( Edges value ) {
205 H3& operator+=( Bins value ) {
211 if ( m_bins.empty() ) {
return false; }
212 if ( !m_xedges.ok() ) {
return false; }
213 if ( !m_yedges.ok() ) {
return false; }
214 if ( !m_zedges.ok() ) {
return false; }
215 if ( m_bins.size() != ( m_xedges.nBins() + 2 ) * ( m_yedges.nBins() + 2 ) * ( m_zedges.nBins() + 2 ) ) {
235 #endif // GAUDIUTILS_H1_H