AFLOW
 
Loading...
Searching...
No Matches
xvector< utype > Class Template Reference

#include <aurostd_xvector.h>

Public Member Functions

 xvector (int=3, int=1)
 
 xvector (const std::initializer_list< utype >)
 
 xvector (const xvector< utype > &)
 
 xvector (const xmatrix< utype > &)
 
xvector< utype > & operator= (const xvector< utype > &)
 
xvector< utype > & operator= (const std::initializer_list< utype >)
 
 ~xvector ()
 
utype & operator[] (int) const
 
utype & operator() (int) const
 
utype & operator() (int, bool) const
 
xvector< utype > & operator+= (const xvector< utype > &)
 
xvector< utype > & operator+= (const std::initializer_list< utype >)
 
xvector< utype > & operator+= (utype)
 
xvector< utype > & operator-= (const xvector< utype > &)
 
xvector< utype > & operator-= (utype)
 
xvector< utype > & operator-= (const std::initializer_list< utype >)
 
xvector< utype > & operator*= (utype r)
 
xvector< utype > & operator/= (utype r)
 
void set (const utype &)
 
void reset ()
 
void clear ()
 
void null ()
 
void resize (int=3, int nl=1)
 resize a xvector to the given dimensions
 
void shift (int new_lrows)
 shift the lower row bound of an xmatrix to a new value
 

Public Attributes

int rows
 
int lrows
 
int urows
 
bool isfloat
 
bool iscomplex
 

Private Types

typedef std::initializer_list< utype >::const_iterator ili
 

Private Member Functions

void init ()
 
void free ()
 
void copy (const xvector< utype > &b)
 
void copy (const xmatrix< utype > &b)
 
void copy (const std::initializer_list< utype > l)
 
void refresh ()
 

Private Attributes

utype * corpus
 
char size
 
long int vsize
 

Detailed Description

template<class utype>
class xvector< utype >

Definition at line 40 of file aurostd_xvector.h.

Member Typedef Documentation

◆ ili

template<class utype>
typedef std::initializer_list<utype>::const_iterator aurostd::xvector< utype >::ili
private

Definition at line 85 of file aurostd_xvector.h.

Constructor & Destructor Documentation

◆ xvector() [1/4]

template<class utype>
aurostd::xvector< utype >::xvector ( int nh = 3,
int nl = 1 )

Definition at line 50 of file aurostd_xvector.cpp.

◆ xvector() [2/4]

template<class utype>
aurostd::xvector< utype >::xvector ( const std::initializer_list< utype > l)

Definition at line 56 of file aurostd_xvector.cpp.

◆ xvector() [3/4]

template<class utype>
aurostd::xvector< utype >::xvector ( const xvector< utype > & b)

Definition at line 63 of file aurostd_xvector.cpp.

◆ xvector() [4/4]

template<class utype>
aurostd::xvector< utype >::xvector ( const xmatrix< utype > & b)

Definition at line 69 of file aurostd_xvector.cpp.

◆ ~xvector()

template<class utype>
aurostd::xvector< utype >::~xvector ( )

Definition at line 91 of file aurostd_xvector.cpp.

Member Function Documentation

◆ operator=() [1/2]

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator= ( const xvector< utype > & b)

Definition at line 256 of file aurostd_xvector.cpp.

◆ operator=() [2/2]

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator= ( const std::initializer_list< utype > l)

Definition at line 264 of file aurostd_xvector.cpp.

◆ operator[]()

template<class utype>
utype & aurostd::xvector< utype >::operator[] ( int i) const

Definition at line 277 of file aurostd_xvector.cpp.

◆ operator()() [1/2]

template<class utype>
utype & aurostd::xvector< utype >::operator() ( int i) const

Definition at line 303 of file aurostd_xvector.cpp.

◆ operator()() [2/2]

template<class utype>
utype & aurostd::xvector< utype >::operator() ( int i,
bool bc ) const
inline

Definition at line 326 of file aurostd_xvector.cpp.

◆ operator+=() [1/3]

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator+= ( const xvector< utype > & r)

Definition at line 356 of file aurostd_xvector.cpp.

◆ operator+=() [2/3]

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator+= ( const std::initializer_list< utype > l)

Definition at line 376 of file aurostd_xvector.cpp.

◆ operator+=() [3/3]

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator+= ( utype r)

Definition at line 393 of file aurostd_xvector.cpp.

◆ operator-=() [1/3]

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator-= ( const xvector< utype > & r)

Definition at line 404 of file aurostd_xvector.cpp.

◆ operator-=() [2/3]

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator-= ( utype r)

Definition at line 441 of file aurostd_xvector.cpp.

◆ operator-=() [3/3]

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator-= ( const std::initializer_list< utype > l)

Definition at line 425 of file aurostd_xvector.cpp.

◆ operator*=()

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator*= ( utype r)

Definition at line 452 of file aurostd_xvector.cpp.

◆ operator/=()

template<class utype>
xvector< utype > & aurostd::xvector< utype >::operator/= ( utype r)

Definition at line 469 of file aurostd_xvector.cpp.

◆ set()

template<class utype>
void aurostd::xvector< utype >::set ( const utype & )

◆ reset()

template<class utype>
void aurostd::xvector< utype >::reset ( )

◆ clear()

template<class utype>
void aurostd::xvector< utype >::clear ( )

◆ null()

template<class utype>
void aurostd::xvector< utype >::null ( )

◆ resize()

template<class utype>
void aurostd::xvector< utype >::resize ( int nu = 3,
int nl = 1 )

resize a xvector to the given dimensions

Parameters
nunew upper bound for rows
nlnew lower bound for rows
Authors
20201111 | Corey Oses - created function
20220916 | Hagen Eckert - fixed memory leak and added shift shortcut
Note
The higher value of (nu,nl) is always used as upper bound

Definition at line 194 of file aurostd_xvector.cpp.

◆ shift()

template<class utype>
void aurostd::xvector< utype >::shift ( int new_lrows)

shift the lower row bound of an xmatrix to a new value

Parameters
new_lrowsnew lower bound for rows
Authors
20180409 | Corey Oses - first variant
20220915 | Hagen Eckert - created function
Note
modifies the pointers but not the underlying data field

Definition at line 240 of file aurostd_xvector.cpp.

◆ init()

template<class utype>
void aurostd::xvector< utype >::init ( )
private

Definition at line 74 of file aurostd_xvector.cpp.

◆ free()

template<class utype>
void aurostd::xvector< utype >::free ( )
private

Definition at line 101 of file aurostd_xvector.cpp.

◆ copy() [1/3]

template<class utype>
void aurostd::xvector< utype >::copy ( const xvector< utype > & b)
private

Definition at line 112 of file aurostd_xvector.cpp.

◆ copy() [2/3]

template<class utype>
void aurostd::xvector< utype >::copy ( const xmatrix< utype > & b)
private

Definition at line 149 of file aurostd_xvector.cpp.

◆ copy() [3/3]

template<class utype>
void aurostd::xvector< utype >::copy ( const std::initializer_list< utype > l)
private

Definition at line 158 of file aurostd_xvector.cpp.

◆ refresh()

template<class utype>
void aurostd::xvector< utype >::refresh ( )
private

Definition at line 170 of file aurostd_xvector.cpp.

Member Data Documentation

◆ rows

template<class utype>
int aurostd::xvector< utype >::rows

Definition at line 68 of file aurostd_xvector.h.

◆ lrows

template<class utype>
int aurostd::xvector< utype >::lrows

Definition at line 68 of file aurostd_xvector.h.

◆ urows

template<class utype>
int aurostd::xvector< utype >::urows

Definition at line 68 of file aurostd_xvector.h.

◆ isfloat

template<class utype>
bool aurostd::xvector< utype >::isfloat

Definition at line 69 of file aurostd_xvector.h.

◆ iscomplex

template<class utype>
bool aurostd::xvector< utype >::iscomplex

Definition at line 69 of file aurostd_xvector.h.

◆ corpus

template<class utype>
utype* aurostd::xvector< utype >::corpus
private

Definition at line 81 of file aurostd_xvector.h.

◆ size

template<class utype>
char aurostd::xvector< utype >::size
private

Definition at line 83 of file aurostd_xvector.h.

◆ vsize

template<class utype>
long int aurostd::xvector< utype >::vsize
private

Definition at line 84 of file aurostd_xvector.h.


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