All Classes Namespaces Files Functions Variables Typedefs Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PEXSI::NumVec< F > Class Template Reference

Numerical vector. More...

#include <NumVec.hpp>

Public Member Functions

 NumVec (Int m)
 NumVec (Int m, bool owndata, F *data)
 NumVec (const NumVec &C)
NumVecoperator= (const NumVec &C)
void Resize (Int m)
void Clear ()
const F & operator() (Int i) const
F & operator() (Int i)
const F & operator[] (Int i) const
F & operator[] (Int i)
bool IsOwnData () const
F * Data () const
Int m () const
Int ByteSize () const

Protected Member Functions

void allocate (F *data=NULL)
 Helper function allocating the memory pointed by the data_ attribute.
void deallocate ()
 Helper function freeing memory pointed by the data_ attribute.

Protected Attributes

Int m_
 The size of the vector.
bool owndata_
 Whether it owns the data.
F * data_
 The pointer for the actual data.
Int bufsize_
 The actual storage space allocated.

Detailed Description

template<class F>
class PEXSI::NumVec< F >

Numerical vector.

NumVec is a portable encapsulation of a pointer to represent a 1D vector. The main difference between NumVec<F> and std::vector<F> is that NumVec<F> allows the vector to not owning the data, by specifying (owndata_ == false).

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