Gradient Augmented Levelset Implementation in CPU & GPU
VecN< T, SIZE > Class Template Reference

#include <vec_n.h>

Public Types

using value_type = T
 

Public Member Functions

 VecN ()
 
 ~VecN ()
 
const int size () const
 
const T operator[] (const int idx) const
 
T & operator[] (const int idx)
 

Friends

std::ostream & operator<< (std::ostream &out, const VecN< T, SIZE > &vec)
 

Detailed Description

template<typename T, int SIZE = 3>
class GALS::CPU::VecN< T, SIZE >

Class to create varying size elements at a computational cell. For e.x. gradients, etc.

Definition at line 46 of file vec_n.h.

Member Typedef Documentation

using value_type = T

Definition at line 49 of file vec_n.h.

Constructor & Destructor Documentation

VecN ( )

Default constructor

Definition at line 35 of file vec_n.cc.

~VecN ( )

Destructor

Definition at line 43 of file vec_n.cc.

Member Function Documentation

const T operator[] ( const int  idx) const

Overloaded subscript operator.

Parameters
idxzero based index of element.
Returns
element at index (idx).

Definition at line 56 of file vec_n.cc.

T & operator[] ( const int  idx)

Overloaded subscript operator that returns a reference.

Parameters
idxzero based index of element.
Returns
element at index (idx).

Definition at line 62 of file vec_n.cc.

const int size ( ) const

Returns number of elements.

Returns
number of elements.

Definition at line 50 of file vec_n.cc.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const VecN< T, SIZE > &  vec 
)
friend

Output operator overload.

Parameters
outoutput stream.
vecVecN object to output stream.
Returns
reference to output stream.

Definition at line 88 of file vec_n.h.


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