41 evAddress(
const unsigned int num_dimensions);
51 void Set(
const int value,
52 const unsigned int dimension);
55 int Get(
const unsigned int dimension)
const;
57 const int &
operator [] (
const unsigned int index)
const;
79 void Increment(
const unsigned int dimension);
82 const unsigned int fixed_dimension);
90 virtual void PrintSelf(
const int tabbing)
const;
118 const unsigned int dimension)
120 this->
Address[dimension] = value;
126 return(&(this->
Address.front()));
132 return(this->
Address[dimension]);
163 std::fill(this->
Address.begin(),
179 return(!((*
this) == address));
185 unsigned int dimension;
188 if (this->
Get(dimension) > address.
Get(dimension))
191 if (this->
Get(dimension) < address.
Get(dimension))
218 unsigned int dimension;
220 for (dimension = 0; dimension < this->
Address.size(); dimension++)
223 if (this->
Address[dimension] < max_address.
Get(dimension))
233 const unsigned int fixed_dimension)
235 unsigned int dimension;
237 for (dimension = 0; dimension < this->
Address.size(); dimension++)
238 if (dimension != fixed_dimension)
241 if (this->
Address[dimension] < max_address.
Get(dimension))
252 return(std::accumulate(this->
Address.begin(), this->
Address.end(), 0));
258 return(std::accumulate(this->
Address.begin(), this->
Address.end(), 1,
259 std::multiplies<int>()));
266 for (
unsigned int dimension = 0;
267 dimension < this->
Address.size(); dimension++)
269 int value = this->
Get(dimension);
271 value = QccMathMax(value,
272 lower_bound->
Get(dimension));
275 value = QccMathMin(value,
276 upper_bound->
Get(dimension));
278 this->
Set(value, dimension);
285 unsigned int dimension;
295 for (dimension = 0; dimension < this->
Address.size(); dimension++)
304 unsigned int dimension;
308 for (dimension = 0; dimension < this->
Address.size(); dimension++)
309 result.
Address[dimension] += value;
317 unsigned int dimension;
327 for (dimension = 0; dimension < this->
Address.size(); dimension++)
336 unsigned int dimension;
340 for (dimension = 0; dimension < this->
Address.size(); dimension++)
341 result.
Address[dimension] -= value;
349 unsigned int dimension;
352 this->
Address = std::vector<int>();
354 for (dimension = 0; dimension < this->
Address.size(); dimension++)
363 unsigned int dimension;
367 this->
Address = std::vector<int>();
369 for (dimension = 0; dimension < this->
Address.size(); dimension++)
380 for (
unsigned int dimension = 0;
381 dimension < this->
Address.size(); dimension++)
382 result.
Address[dimension] = this->Address[dimension] % value;
void Increment(const unsigned int dimension)
Definition: evAddress.h:210
evAddress operator=(const evAddress &address)
Definition: evAddress.h:154
evAddress operator%(const int value) const
Definition: evAddress.h:376
bool operator!=(const evAddress &address) const
Definition: evAddress.h:177
int GetIncrementStep(void) const
Definition: evAddress.h:204
void Set(const int value, const unsigned int dimension)
Definition: evAddress.h:117
Definition: evAddress.h:37
evAddress(void)
Definition: evAddress.h:100
void SetIncrementStep(const int increment_step)
Definition: evAddress.h:198
bool operator<(const evAddress &address) const
Definition: evAddress.h:183
Definition: evDataObject.h:31
int * Get(void)
Definition: evAddress.h:124
bool operator==(const evAddress &address) const
Definition: evAddress.h:171
virtual void PrintSelf(const int tabbing) const
evAddress & operator-=(const evAddress &address)
Definition: evAddress.h:361
virtual ~evAddress(void)
Definition: evAddress.h:43
evAddress operator+(const evAddress &address) const
Definition: evAddress.h:283
evAddress operator-(const evAddress &address) const
Definition: evAddress.h:315
virtual const evString GetClassName(void) const
Definition: evAddress.h:46
void Clip(const evAddress *lower_bound, const evAddress *upper_bound)
Definition: evAddress.h:263
unsigned int GetNumDimensions(void) const
Definition: evAddress.h:148
std::vector< int > Address
Definition: evAddress.h:95
int IncrementStep
Definition: evAddress.h:96
int Sum(void) const
Definition: evAddress.h:250
int & operator[](const unsigned int index)
Definition: evAddress.h:136
int Product(void) const
Definition: evAddress.h:256
evAddress & operator+=(const evAddress &address)
Definition: evAddress.h:347
Definition: evString.h:30