uvector_cx_view_tlate Class Template Reference

A vector view of complex numbers with unit stride. More...

#include <uvector_cx_tlate.h>

Inheritance diagram for uvector_cx_view_tlate:

umatrix_cx_const_row_tlate umatrix_cx_row_tlate uvector_cx_array_tlate uvector_cx_const_array_tlate uvector_cx_const_subvector_tlate uvector_cx_subvector_tlate uvector_cx_tlate

Detailed Description

template<class data_t, class complex_t>
class uvector_cx_view_tlate< data_t, complex_t >

A vector view of complex numbers with unit stride.

Idea for future:
Write lookup() method, and possibly an erase() method.

Definition at line 48 of file uvector_cx_tlate.h.


Public Member Functions

Copy constructors
 uvector_cx_view_tlate (const uvector_cx_view_tlate &v)
 Copy constructor - create a new view of the same vector.
uvector_cx_view_tlateoperator= (const uvector_cx_view_tlate &v)
 Copy constructor - create a new view of the same vector.
Get and set methods
complex_t & operator[] (size_t i)
 Array-like indexing.
const complex_t & operator[] (size_t i) const
 Array-like indexing.
complex_t & operator() (size_t i)
 Array-like indexing.
const complex_t & operator() (size_t i) const
 Array-like indexing.
complex_t get (size_t i) const
 Get (with optional range-checking).
complex_t * get_ptr (size_t i)
 Get pointer (with optional range-checking).
const complex_t * get_const_ptr (size_t i) const
 Get pointer (with optional range-checking).
int set (size_t i, const complex_t &val)
 Set (with optional range-checking).
int set_all (const complex_t &val)
 Set all of the value to be the value val.
size_t size () const
 Method to return vector size.
Other methods
bool is_owner () const
 Return true if this object owns the data it refers to.
Arithmetic
uvector_cx_view_tlate< data_t,
complex_t > & 
operator+= (const uvector_cx_view_tlate< data_t, complex_t > &x)
 operator+=
uvector_cx_view_tlate< data_t,
complex_t > & 
operator-= (const uvector_cx_view_tlate< data_t, complex_t > &x)
 operator-=
uvector_cx_view_tlate< data_t,
complex_t > & 
operator+= (const data_t &y)
 operator+=
uvector_cx_view_tlate< data_t,
complex_t > & 
operator-= (const data_t &y)
 operator-=
uvector_cx_view_tlate< data_t,
complex_t > & 
operator*= (const data_t &y)
 operator*=
data_t norm () const
 Norm.

Protected Member Functions

 uvector_cx_view_tlate ()
 Empty constructor provided for use by uvector_cx_tlate(const uvector_cx_tlate &v).

Protected Attributes

data_t * data
 The data.
size_t sz
 The vector sz.
int owner
 Zero if memory is owned elsewhere, 1 otherwise.

Member Function Documentation

size_t size (  )  const [inline]

Method to return vector size.

If no memory has been allocated, this will quietly return zero.

Definition at line 234 of file uvector_cx_tlate.h.


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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page