KFoundation  v2.1
A Better Foundation Library for C++
 All Classes Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
kfoundation::ProximityIterator Class Reference

Iterates the proximity of a desired point. More...

#include <kfoundation/ProximityIterator.h>

Inheritance diagram for kfoundation::ProximityIterator:
Inheritance graph
[legend]

Public Member Functions

 ProximityIterator (int radius)
 Constructor, sets the rectangular radius around the point to be iterated. More...
 
 ProximityIterator (int radius, const Tuple &center)
 Constructor, sets the point and the rectangular radius around it to be iterated. More...
 
ProximityIteratorcenterAt (const Tuple &center)
 Resets this iterator, centering the iteration region at the given point.
 
ProximityIteratornext ()
 Moves on to the next point. More...
 
bool hasMore ()
 Checks if there are more points to iterate.
 
- Public Member Functions inherited from kfoundation::Tuple
 Tuple ()
 Default constructor, creates a tuple of size 0.
 
 Tuple (kf_int8_t size)
 Constructor, creates a tuple of the given size.
 
 Tuple (const Tuple &other)
 Copy constructor.
 
kf_int8_t getSize () const
 Returns the size of this tuple.
 
kf_int32_tat (const kf_int8_t index)
 Returns the value of the element at the given index.
 
kf_int32_t at (const kf_int8_t index) const
 Returns the value of the element at the given index.
 
void set (const Tuple &other)
 Setter, sets the elements of this tuple to the ones of the given parameter.
 
bool equals (const Tuple &other) const
 Checks if this tuple equals to the given parameter.
 
kf_int32_t sumAll () const
 Returns the sum of all the elements.
 
kf_int64_t productAll () const
 Returns the product of all elements.
 
Tuple max (const Tuple &other) const
 Returns the value of the element with the highest value.
 
Tuple min (const Tuple &other) const
 Returns the value of the element with the lowest value.
 
Tuple negate () const
 Negates all the elements. More...
 
Tuple operator- () const
 Additive inverse operator. More...
 
Tuple operator+ (const Tuple &other) const
 Addition operator. More...
 
Tuple operator- (const Tuple &other) const
 Substraction operator. More...
 
Tuple operator+ (const int n) const
 Adds the given scalar to all elements of this tuple. More...
 
Tuple operator- (const int n) const
 Substracts the given scalar from all elements of this tuple. More...
 
Tuple operator* (const int n) const
 Multiplies all elements of this tuple by the given number. More...
 
Tuple operator* (const Tuple &other) const
 Multiplies all elements of this tuple by the given number. More...
 
Tuple operator/ (const int n) const
 Divides all elements of this tuple by the given number. More...
 
Tuple operator/ (const Tuple &other) const
 Divides each element of this tuple by corresponding element of the given tuple. More...
 
Tuple operator% (const Tuple &other) const
 Calculates remainder of each element of this tuple divided by corresponding element of the given tuple. More...
 
bool operator== (const Tuple &other) const
 Equality operator.
 
void printToStream (Ref< OutputStream > os) const
 Implements compatibility with Streamer interface.
 
- Public Member Functions inherited from kfoundation::Streamer
virtual RefConst< UString > toString () const
 Converts the result of invocation of printToStream(ostream&) to a std::string object.
 

Additional Inherited Members

- Static Public Member Functions inherited from kfoundation::Tuple
static Tuple one (kf_int8_t size)
 Returns a unity tuple of the given size.
 
static Tuple zero (kf_int8_t size)
 Returns a zero tuple of the given size.
 

Detailed Description

Iterates the proximity of a desired point.

Particularly useful for stencil computation.

Constructor & Destructor Documentation

kfoundation::ProximityIterator::ProximityIterator ( int  radius)

Constructor, sets the rectangular radius around the point to be iterated.

The point which its proximity is being iterated can be set later using centerAt() method.

kfoundation::ProximityIterator::ProximityIterator ( int  radius,
const Tuple center 
)

Constructor, sets the point and the rectangular radius around it to be iterated.

The point at center can later be changes using centerAt() method.

Member Function Documentation

ProximityIterator & kfoundation::ProximityIterator::next ( )

Moves on to the next point.

Returns
Reference to self.

The documentation for this class was generated from the following files: