Three dimensional array class designed to be defined as instance member in recursive_configurable class. More...
#include <array3.h>
Classes | |
class | const_iterator |
Read-only iterator. More... | |
class | iterator |
Writable iterator. More... | |
struct | type3 |
Collection of properties of this grid. More... | |
Public Types | |
enum | { ACTIVES = true, ALL = false } |
![]() | |
using | environment_map = std::map< std::string, const void * > |
Type for environment_map. | |
Public Member Functions | |
array3 (recursive_configurable *parent, const shape3 &shape, T value=T(), std::string core_name="") | |
Constructor for array3. More... | |
array3 (recursive_configurable *parent, std::string core_name="") | |
Constructor for array3. More... | |
array3 (std::string core_name="") | |
Constructor for array3. More... | |
array3 (const shape3 &shape, T value=T(), std::string core_name="") | |
Constructor for array3. More... | |
virtual bool | send_message (std::string message, void *ptr) override |
Send a message to the core module. More... | |
virtual bool | const_send_message (std::string message, void *ptr) const override |
Send a message to the core module. More... | |
array3 (const array3 &array) | |
Copy constructor for array3. More... | |
void | set_touch_only_actives (bool touch_only_actives) |
Set whether to force grid manipulation only on active cells. If true, operatios such operator+=() only acts on active cells. More... | |
array3 & | operator= (const array3 &array) |
Deep copy operation for array3. More... | |
void | copy (const array3 &array) |
Deep copy function for array3. More... | |
std::vector< T > | linearize () const |
Flatten this grid to a fully linearized one dimendional array, of which can be accessed like array[i+j*w+k*(w*h)] . More... | |
shape3 | shape () const |
Get the shape of the array. More... | |
void | initialize (const shape3 &shape, T value=T()) |
Allocate grid memory with value. More... | |
void | set_as_levelset (double bandwidth_half) |
Set the grid as level set. More... | |
void | set_as_fillable (const T &fill_value) |
Set the grid as a grid that is fillable by flood fill. More... | |
void | set_as_fillable_as (const array3 &array) |
Set the grid as fillable as same as an input array. More... | |
void | set_as_levelset_as (const array3 &array) |
Set the grid as level set as same as an input array. More... | |
bool | is_fillable () const |
Return if the grid is set fillable. More... | |
bool | is_levelset () const |
Return if the grid is set level set. More... | |
void | flood_fill () |
Perform flood fill. Grid should be set either level set of fillable beforehand. | |
std::vector< vec3i > | fills () const |
Function to return the list of filled cells. More... | |
bool | filled (int i, int j, int k) const |
Function to get if a cell is filled. More... | |
bool | filled (const vec3i &pi) const |
Function to get if a cell is filled. More... | |
size_t | count () const |
Function to count the number of active cells. More... | |
std::vector< vec3i > | actives () const |
Function to return the list of active cells positions. More... | |
void | activate (const std::vector< vec3i > &active_entries, const vec3i &offset=vec3i()) |
Activate cells at the positons of active_entries with an offset. More... | |
template<class Y > | |
void | activate_as (const array3< Y > &array, const vec3i &offset=vec3i()) |
Activate cells at the same positons where an input array is active with an offset. More... | |
template<class Y > | |
void | activate_as_bit (const Y &array, const vec3i &offset=vec3i()) |
Activate cells at the same positons where an input array is active with an offset. More... | |
template<class Y > | |
void | activate_inside_as (const array3< Y > &array, const vec3i &offset=vec3i()) |
Activate cells at the same positons where an input array is filled with an offset. More... | |
void | activate_all () |
Activate all the cells. | |
void | activate_inside () |
Activate all the filled cells. | |
template<class Y > | |
void | copy_active_as (const array3< Y > &array, const vec3i &offset=vec3i()) |
Copy the states of active and inactive cells as same as input array with an offset. More... | |
T | get_background_value () const |
Get the background value (alternatively, initial value) of the grid. | |
void | set_background_value (const T &value) |
Set the background value (alternatively, initial value) of the grid. More... | |
void | clear () |
Clear out the grid. More... | |
void | clear (const T &v) |
Clear out the grid with the new backgroud value. More... | |
void | set (int i, int j, int k, const T &value) |
Set value on grid. More... | |
void | set (const vec3i &pi, const T &value) |
Set value on grid. More... | |
bool | active (int i, int j, int k) const |
Get if a position on grid is active. More... | |
bool | active (const vec3i &pi) const |
Get if a position on grid is active. More... | |
bool | safe_active (int i, int j, int k) const |
Get if a position on grid is active. (i,j,k) can be safely out of the domain. More... | |
bool | safe_active (const vec3i &pi) const |
Get if a position on grid is active. pi can be safely out of the domain. More... | |
void | set_off (int i, int j, int k) |
Set a position on grid inactive. More... | |
void | set_off (const vec3i &pi) |
Set a position on grid inactive. More... | |
void | increment (int i, int j, int k, const T &value) |
Increment value on grid. More... | |
void | increment (const vec3i &pi, const T &value) |
Increment value on grid. More... | |
void | subtract (int i, int j, int k, const T &value) |
Subtract value on grid. More... | |
void | subtract (const vec3i &pi, const T &value) |
Subtract value on grid. More... | |
void | multiply (int i, int j, int k, const T &value) |
Multiply value on grid. More... | |
void | multiply (const vec3i &pi, const T &value) |
Multiply value on grid. More... | |
void | devide (int i, int j, int k, const T &value) |
Divide by value on grid. More... | |
void | devide (const vec3i &pi, const T &value) |
Divide by value on grid. More... | |
T * | ptr (unsigned i, unsigned j, unsigned k) |
Get the pointer to the value at a position on grid. More... | |
const T * | ptr (unsigned i, unsigned j, unsigned k) const |
Get the const pointer to the value at a position on grid. More... | |
T * | ptr (const vec3i &pi) |
Get the pointer to the value at a position on grid. More... | |
const T * | ptr (const vec3i &pi) const |
Get the const pointer to the value at a position on grid. More... | |
const T & | operator() (int i, int j, int k) const |
Get the the value at a position on grid. More... | |
const T & | operator() (const vec3i &pi) const |
Get the the value at a position on grid. More... | |
bool | operator!= (const array3< T > &array) const |
Return if the grid is different from an input array. More... | |
bool | operator== (const array3< T > &v) const |
Return if the grid is same to an input array. More... | |
void | operator= (const T &v) |
Set all the grid values with an input value. More... | |
void | operator+= (const array3< T > &v) |
Increment all the values with the values of an input array. More... | |
void | operator-= (const array3< T > &v) |
Subtract all the values with the values of an input array. More... | |
void | operator+= (const T &v) |
Increment all the grid values with an input value. More... | |
void | operator-= (const T &v) |
Subtract all the grid values with an input value. More... | |
void | operator*= (const T &v) |
Multiply all the grid values with an input value. More... | |
void | operator/= (const T &v) |
Divide all the grid values with an input value. More... | |
void | set_thread_num (int number) |
Set the number of threads for parallel processing on this grid. More... | |
int | get_thread_num () const |
Get the current number of threads for parallel processing on this grid. More... | |
void | parallel_actives (std::function< void(iterator &it)> func) |
Loop over all the active cells in parallel. More... | |
void | parallel_all (std::function< void(iterator &it)> func) |
Loop over all the cells in parallel. More... | |
void | parallel_op (std::function< void(iterator &it)> func, bool type=ALL) |
Loop over cells in parallel. More... | |
void | parallel_actives (std::function< void(int i, int j, int k, iterator &it)> func) |
Loop over all the active cells in parallel. More... | |
void | parallel_all (std::function< void(int i, int j, int k, iterator &it)> func) |
Loop over all the cells in parallel. More... | |
void | parallel_op (std::function< void(int i, int j, int k, iterator &it)> func, bool type=ALL) |
Loop over cells in parallel. More... | |
void | parallel_actives (std::function< void(int i, int j, int k, iterator &it, int thread_index)> func) |
Loop over all the active cells in parallel. More... | |
void | parallel_all (std::function< void(int i, int j, int k, iterator &it, int thread_index)> func) |
Loop over all the cells in parallel. More... | |
void | parallel_op (std::function< void(int i, int j, int k, iterator &it, int thread_index)> func, bool type=ALL) |
Loop over cells in parallel. More... | |
void | const_parallel_actives (std::function< void(const const_iterator &it)> func) const |
Loop over all the active cells in parallel by read-only fashion. More... | |
void | const_parallel_all (std::function< void(const const_iterator &it)> func) const |
Loop over all the cells in parallel by read-only fashion. More... | |
void | const_parallel_op (std::function< void(const const_iterator &it)> func, bool type=ALL) const |
Loop over cells in parallel by read-only fashion. More... | |
void | const_parallel_inside (std::function< void(const const_iterator &it)> func) const |
Loop over all the filled cells in parallel by read-only fashion. More... | |
void | const_parallel_actives (std::function< void(int i, int j, int k, const const_iterator &it)> func) const |
Loop over all the active cells in parallel by read-only fashion. More... | |
void | const_parallel_all (std::function< void(int i, int j, int k, const const_iterator &it)> func) const |
Loop over all the cells in parallel by read-only fashion. More... | |
void | const_parallel_op (std::function< void(int i, int j, int k, const const_iterator &it)> func, bool type=ALL) const |
Loop over cells in parallel by read-only fashion. More... | |
void | const_parallel_inside (std::function< void(int i, int j, int k, const const_iterator &it)> func) const |
Loop over all the filled cells in parallel by read-only fashion. More... | |
void | const_parallel_actives (std::function< void(int i, int j, int k, const const_iterator &it, int thread_index)> func) const |
Loop over all the active cells in parallel by read-only fashion. More... | |
void | const_parallel_all (std::function< void(int i, int j, int k, const const_iterator &it, int thread_index)> func) const |
Loop over all the cells in parallel by read-only fashion. More... | |
void | const_parallel_op (std::function< void(int i, int j, int k, const const_iterator &it, int thread_index)> func, bool type=ALL) const |
Loop over cells in parallel by read-only fashion. More... | |
void | const_parallel_inside (std::function< void(int i, int j, int k, const const_iterator &it, int thread_index)> func) const |
Loop over all the filled cells in parallel. More... | |
void | serial_actives (std::function< void(iterator &it)> func) |
Loop over all the active cells in serial order. More... | |
void | serial_all (std::function< void(iterator &it)> func) |
Loop over all the cells in serial order. More... | |
void | serial_op (std::function< void(iterator &it)> func, bool type=ALL) |
Loop over cells in serial order. More... | |
void | serial_actives (std::function< void(int i, int j, int k, iterator &it)> func) |
Loop over all the active cells in serial order. More... | |
void | serial_all (std::function< void(int i, int j, int k, iterator &it)> func) |
Loop over all the cells in serial order. More... | |
void | serial_op (std::function< void(int i, int j, int k, iterator &it)> func, bool type=ALL) |
Loop over cells in serial order. More... | |
void | const_serial_actives (std::function< void(const const_iterator &it)> func) const |
Loop over all the active cells in serial order by read-only fashion. More... | |
void | const_serial_all (std::function< void(const const_iterator &it)> func) const |
Loop over all the cells in serial order by read-only fashion. More... | |
void | const_serial_op (std::function< void(const const_iterator &it)> func, bool type=ALL) const |
Loop over the cells in serial order by read-only fashion. More... | |
void | const_serial_inside (std::function< void(const const_iterator &it)> func) const |
Loop over filled the cells in serial order by read-only fashion. More... | |
void | const_serial_actives (std::function< void(int i, int j, int k, const const_iterator &it)> func) const |
Loop over all the active cells in serial order by read-only fashion. More... | |
void | const_serial_all (std::function< void(int i, int j, int k, const const_iterator &it)> func) const |
Loop over all the cells in serial order by read-only fashion. More... | |
void | const_serial_op (std::function< void(int i, int j, int k, const const_iterator &it)> func, bool type=ALL) const |
Loop over cells in serial order by read-only fashion. More... | |
void | const_serial_inside (std::function< void(int i, int j, int k, const const_iterator &it)> func) const |
Loop over filled the cells in serial order by read-only fashion. More... | |
void | interruptible_serial_actives (std::function< bool(iterator &it)> func) |
Loop over all the active cells in serial order. More... | |
void | interruptible_serial_all (std::function< bool(iterator &it)> func) |
Loop over all the cells in serial order. More... | |
void | interruptible_serial_op (std::function< bool(iterator &it)> func, bool type=ALL) |
Loop over cells in serial order. More... | |
void | interruptible_serial_actives (std::function< bool(int i, int j, int k, iterator &it)> func) |
Loop over all the active cells in serial order. More... | |
void | interruptible_serial_all (std::function< bool(int i, int j, int k, iterator &it)> func) |
Loop over all the cells in serial order. More... | |
void | interruptible_serial_op (std::function< bool(int i, int j, int k, iterator &it)> func, bool type=ALL) |
Loop over cells in serial order. More... | |
void | interruptible_const_serial_actives (std::function< bool(const const_iterator &it)> func) const |
Loop over all the active cells in serial order by read-only fashion. More... | |
void | interruptible_const_serial_all (std::function< bool(const const_iterator &it)> func) const |
Loop over all the cells in serial order by read-only fashion. More... | |
void | interruptible_const_serial_op (std::function< bool(const const_iterator &it)> func, bool type=ALL) const |
Loop over cells in serial order by read-only fashion. More... | |
void | interruptible_const_serial_inside (std::function< bool(const const_iterator &it)> func, bool type=ALL) const |
Loop over all the filled cells in serial order by read-only fashion. More... | |
void | interruptible_const_serial_actives (std::function< bool(int i, int j, int k, const const_iterator &it)> func) const |
Loop over all the active cells in serial order by read-only fashion. More... | |
void | interruptible_const_serial_all (std::function< bool(int i, int j, int k, const const_iterator &it)> func) const |
Loop over all the cells in serial order by read-only fashion. More... | |
void | interruptible_const_serial_op (std::function< bool(int i, int j, int k, const const_iterator &it)> func, bool type=ALL) const |
Loop over cells in serial order by read-only fashion. More... | |
void | interruptible_const_serial_inside (std::function< bool(int i, int j, int k, const const_iterator &it)> func) const |
Loop over all the filled cells in serial order by read-only fashion. More... | |
void | dilate (std::function< void(int i, int j, int k, iterator &it, int thread_index)> func, int count=1) |
Dilate cells. More... | |
void | dilate (std::function< void(int i, int j, int k, iterator &it)> func, int count=1) |
Dilate cells. More... | |
void | dilate (int count=1) |
Dilate cells. More... | |
void | erode (std::function< bool(int i, int j, int k, const const_iterator &it, int thread_index)> func, int count=1) |
Erode cells. More... | |
void | erode (std::function< bool(int i, int j, int k, const const_iterator &it)> func, int count=1) |
Erode cells. More... | |
void | erode (int count=1) |
Erode cells. More... | |
void | swap (array3 &rhs) |
Swap array. More... | |
parallel_driver & | get_parallel_driver () |
Get the instance of parallel_driver of this grid. More... | |
const parallel_driver & | get_parallel_driver () const |
Get the const instance of parallel_driver of this grid. More... | |
void | set_core_name (std::string core_name) |
Set the core name of module of this grid. More... | |
std::string | get_core_name () const |
Get the core name of module of this grid. More... | |
const array_core3 * | get_core () const |
Get pointer to the core module. More... | |
array_core3 * | get_core () |
Get pointer to the core module. More... | |
type3 | type () const |
Get the type of this grid. More... | |
void | set_type (const type3 &type) |
Set the type of this grid. More... | |
![]() | |
recursive_configurable ()=default | |
Default constructor. | |
virtual void | recursive_load (configuration &config) |
Load the program itself and relay the same to its children. Used to load files and libraries into memory. More... | |
virtual void | recursive_configure (configuration &config) |
Configure the program itself and relay the same to its children. Used to load and set parameters. More... | |
virtual void | recursive_initialize (const configurable::environment_map &environment=configurable::environment_map()) |
Initialize the program itself and relay the same to its children. Used to get things ready for actual use. More... | |
virtual bool | is_ready () const |
Get if the instance is initialized. More... | |
virtual void | add_child (configurable *child) |
Add a child instance. More... | |
virtual void | add_child (recursive_configurable *child) |
Add a child instance. More... | |
virtual void | remove_child (configurable *child) |
Remove a child instance. More... | |
virtual void | remove_child (recursive_configurable *child) |
Remove a child instance. More... | |
virtual void | setup_now (configuration &config=get_global_configuration()) override |
Run recursive_load - recursive_configure - recursive_initialize processes. | |
virtual bool | not_recursive () override |
Check if this instance is not derived from recursive_configurable. More... | |
void | set_environment (std::string name, const void *value) |
Set the pointer to an environmental value associated with an input name. More... | |
Additional Inherited Members | |
![]() | |
static configuration & | set_global_configuration (const configuration &config) |
Assign the global settings of the program. More... | |
static configuration & | get_global_configuration () |
Get the global settings of the program. More... | |
template<class T > | |
static const T & | get_env (const environment_map &environment, std::string key) |
Extract an specified type of pointer from the input environment. More... | |
![]() | |
bool | check_set (const environment_map &environment, std::vector< std::string > names) |
Check if the values for a variable keys exist. More... | |
Three dimensional array class designed to be defined as instance member in recursive_configurable class.
|
inline |
Constructor for array3.
[in] | parent | Pointer to a parent recursive_configurable instance. Can be nullptr. |
[in] | shape | Shape of the grid |
[in] | value | Background value (initial value). |
[in] | core_name | Core module name. Default value is "tiledarray_core3". |
|
inline |
Constructor for array3.
[in] | parent | Pointer to a parent recursive_configurable instance. Can be nullptr. |
[in] | core_name | Core module name. Default value is "tiledarray_core3". |
Constructor for array3.
[in] | core_name | Core module name. Default value is "tiledarray_core3". |
|
inline |
Constructor for array3.
[in] | shape | Shape of the grid |
[in] | value | Background value (initial value). |
[in] | core_name | Core module name. Default value is "tiledarray_core3". |
Copy constructor for array3.
[in] | array | Reference to an instance of array to copy from. |
|
inline |
Activate cells at the positons of active_entries with an offset.
[in] | active_entries | The list of target positions to activate. |
[in] | offset | Offset applied to the active_entries. |
|
inline |
Activate cells at the same positons where an input array is active with an offset.
[in] | array | Target array. |
[in] | offset | Offset applied to the target array. |
|
inline |
Activate cells at the same positons where an input array is active with an offset.
[in] | array | Target array. |
[in] | offset | Offset applied to the target array. |
|
inline |
Activate cells at the same positons where an input array is filled with an offset.
[in] | array | Target array. |
[in] | offset | Offset applied to the target array. |
Get if a position on grid is active.
[in] | pi | position on grid. |
true
if active flase
if inactive.
|
inline |
Get if a position on grid is active.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
true
if active flase
if inactive. Function to return the list of active cells positions.
|
inline |
Clear out the grid.
Note that size, the memory allocation, background values and the information regarding level set or fillable left intact.
|
inline |
Clear out the grid with the new backgroud value.
Background values regarding level set and the fillable will be dicarded. Size and the memory allocation left intact.
|
inline |
Loop over all the active cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the active cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the active cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the filled cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the filled cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the filled cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
|
inline |
Loop over cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
|
inline |
Loop over cells in parallel by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
|
inlineoverridevirtual |
Send a message to the core module.
[in] | message | Message |
[in] | ptr | Pointer to some value. |
true
if handled false
otherwise. Reimplemented from messageable.
|
inline |
Loop over all the active cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the active cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over filled the cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over filled the cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over the cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
|
inline |
Loop over cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
Deep copy function for array3.
[in] | array | Reference to an instance of array to copy from. |
|
inline |
Copy the states of active and inactive cells as same as input array with an offset.
[in] | array | Target input array from which the states to be copied. |
[in] | offset | Offset |
|
inline |
Function to count the number of active cells.
Divide by value on grid.
[in] | pi | position on grid. |
[in] | value | Value to divide at the position. |
|
inline |
Divide by value on grid.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
[in] | value | Value to divide at the position. |
|
inline |
Dilate cells.
[in] | count | Number of dilation count. |
|
inline |
Dilate cells.
[in] | func | Function that specifies what value to assign on dilated cells. |
[in] | count | Number of dilation count. |
|
inline |
Dilate cells.
[in] | func | Function that specifies what value to assign on dilated cells. |
[in] | count | Number of dilation count. |
|
inline |
Erode cells.
[in] | count | Number of erode count. |
|
inline |
Erode cells.
[in] | func | Function that specifies whether to inactivate the cell. |
[in] | count | Number of erode count. |
|
inline |
Erode cells.
[in] | func | Function that specifies whether to inactivate the cell. |
[in] | count | Number of erode count. |
Function to get if a cell is filled.
[in] | pi | position. |
true
if the cell is filled false
if not.
|
inline |
Function to get if a cell is filled.
[in] | i | x coordinate position. |
[in] | j | y coordinate position. |
[in] | k | z coordinate position. |
true
if the cell is filled false
if not. Function to return the list of filled cells.
|
inline |
Get pointer to the core module.
|
inline |
Get pointer to the core module.
|
inline |
Get the core name of module of this grid.
|
inline |
Get the instance of parallel_driver
of this grid.
parallel_driver
of this grid.
|
inline |
Get the const instance of parallel_driver
of this grid.
parallel_driver
of this grid.
|
inline |
Get the current number of threads for parallel processing on this grid.
Increment value on grid.
[in] | pi | position on grid |
[in] | value | Value to increment at the position. |
|
inline |
Increment value on grid.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
[in] | value | Value to increment at the position. |
Allocate grid memory with value.
[in] | shape | Shape or the grid. |
[in] | value | Initial value |
|
inline |
Loop over all the active cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
|
inline |
Loop over all the active cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
|
inline |
Loop over all the cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
|
inline |
Loop over all the cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
|
inline |
Loop over all the filled cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
[in] | type | Type of target cells. ACTIVE or ALL. Stop the loop if return true. |
|
inline |
Loop over all the filled cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
|
inline |
Loop over cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
[in] | type | Type of target cells. ACTIVE or ALL. Stop the loop if return true. |
|
inline |
Loop over cells in serial order by read-only fashion.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
[in] | type | Type of target cells. ACTIVE or ALL. Stop the loop if return true. |
|
inline |
Loop over all the active cells in serial order.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
|
inline |
Loop over all the active cells in serial order.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
|
inline |
Loop over all the cells in serial order.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
|
inline |
Loop over all the cells in serial order.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
|
inline |
Loop over cells in serial order.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. Stop the loop if return true. |
|
inline |
Loop over cells in serial order.
[in] | func | Function that defines how each grid cell is processed. Stop the loop if return true. |
[in] | type | Type of target cells. ACTIVE or ALL. |
|
inline |
Return if the grid is set fillable.
|
inline |
Return if the grid is set level set.
|
inline |
Flatten this grid to a fully linearized one dimendional array, of which can be accessed like array[i+j*w+k*(w*h)]
.
Multiply value on grid.
[in] | pi | position on grid. |
[in] | value | Value to multiply at the position. |
|
inline |
Multiply value on grid.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
[in] | value | Value to multiply at the position. |
Return if the grid is different from an input array.
[in] | array | Target array to compare. |
true
if the array is different from the input array and false
otherwise. Get the the value at a position on grid.
[in] | pi | position on grid. |
|
inline |
Get the the value at a position on grid.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
|
inline |
Multiply all the grid values with an input value.
[in] | v | Value to multiply. |
Increment all the values with the values of an input array.
[in] | v | Input array. |
|
inline |
Increment all the grid values with an input value.
[in] | v | Value to increment. |
Subtract all the values with the values of an input array.
[in] | v | Input array. |
|
inline |
Subtract all the grid values with an input value.
[in] | v | Value to subtract. |
|
inline |
Divide all the grid values with an input value.
[in] | v | Value to divide. |
Deep copy operation for array3.
[in] | array | Reference to an instance of array to copy from. |
|
inline |
Set all the grid values with an input value.
[in] | v | Input value to set. |
Return if the grid is same to an input array.
[in] | v | Target array to compare. |
true
if the array is the same to the input and false
otherwise.
|
inline |
Loop over all the active cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the active cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the active cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
Loop over all the cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
|
inline |
Loop over cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
|
inline |
Loop over cells in parallel.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
Get the pointer to the value at a position on grid.
[in] | pi | position on grid. |
Get the const pointer to the value at a position on grid.
[in] | pi | position on grid. |
|
inline |
Get the pointer to the value at a position on grid.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
|
inline |
Get the const pointer to the value at a position on grid.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
Get if a position on grid is active. pi can be safely out of the domain.
[in] | pi | position on grid. |
true
if active flase
if inactive.
|
inline |
Get if a position on grid is active. (i,j,k) can be safely out of the domain.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
true
if active flase
if inactive.
|
inlineoverridevirtual |
Send a message to the core module.
[in] | message | Message |
[in] | ptr | Pointer to some value. |
true
if handled false
otherwise. Reimplemented from messageable.
|
inline |
Loop over all the active cells in serial order.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the active cells in serial order.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over all the cells in serial order.
[in] | func | Function that defines how each grid cell is processed. |
Loop over all the cells in serial order.
[in] | func | Function that defines how each grid cell is processed. |
|
inline |
Loop over cells in serial order.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
|
inline |
Loop over cells in serial order.
[in] | func | Function that defines how each grid cell is processed. |
[in] | type | Type of target cells. ACTIVE or ALL. |
Set value on grid.
[in] | pi | position on grid |
[in] | value | Value to set at the position. |
|
inline |
Set value on grid.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
[in] | value | Value to set at the position. |
|
inline |
Set the grid as a grid that is fillable by flood fill.
[in] | fill_value | fill_value |
Set the grid as fillable as same as an input array.
[in] | array | Input array to mimic the fillable properties. |
|
inline |
Set the grid as level set.
[in] | bandwidth_half | half bandwidth size of the level set. |
Set the grid as level set as same as an input array.
[in] | array | Input array to mimic the level set properties. |
|
inline |
Set the background value (alternatively, initial value) of the grid.
[in] | value | New background value |
|
inline |
Set the core name of module of this grid.
[in] | Name | of the core name. |
Set a position on grid inactive.
[in] | pi | position on grid |
|
inline |
Set a position on grid inactive.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
|
inline |
Set the number of threads for parallel processing on this grid.
[in] | number | Number of threads. |
|
inline |
Set whether to force grid manipulation only on active cells. If true, operatios such operator+=()
only acts on active cells.
[in] | touch_only_actives | Whether to turn this on or off. |
Set the type of this grid.
[in] | type | An instance of type to set. |
Get the shape of the array.
Subtract value on grid.
[in] | pi | position on grid. |
[in] | value | Value to subtract at the position. |
|
inline |
Subtract value on grid.
[in] | i | position on x coordiante. |
[in] | j | position on y coordinate. |
[in] | k | position on z coordinate |
[in] | value | Value to subtract at the position. |
Swap array.
[in] | rhs | Array to swap. |
Get the type of this grid.