uvector_view_tlate Class Template Reference

#include <uvector_tlate.h>

Inheritance diagram for uvector_view_tlate:

umatrix_const_row_tlate umatrix_row_tlate uvector_array_tlate uvector_const_array_tlate uvector_const_subvector_tlate uvector_subvector_tlate uvector_tlate ufvector

Detailed Description

template<class data_t>
class uvector_view_tlate< data_t >

A vector view with unit stride.

Definition at line 47 of file uvector_tlate.h.


Public Member Functions

 ~uvector_view_tlate ()
Copy constructors
 uvector_view_tlate (const uvector_view_tlate &v)
 Copy constructor - create a new view of the same vector.
uvector_view_tlateoperator= (const uvector_view_tlate &v)
 Copy constructor - create a new view of the same vector.
Get and set methods
data_t & operator[] (size_t i)
 Array-like indexing.
const data_t & operator[] (size_t i) const
 Array-like indexing.
data_t & operator() (size_t i)
 Array-like indexing.
const data_t & operator() (size_t i) const
 Array-like indexing.
data_t get (size_t i) const
 Get (with optional range-checking).
data_t * get_ptr (size_t i)
 Get pointer (with optional range-checking).
const data_t * get_const_ptr (size_t i) const
 Get pointer (with optional range-checking).
int set (size_t i, data_t val)
 Set (with optional range-checking).
int set_all (data_t val)
 Set all of the value to be the value val.
size_t size () const
 Method to return vector size.
Other methods
int swap (uvector_view_tlate< data_t > &x)
 Swap vectors.
bool is_owner () const
 Return true if this object owns the data it refers to.
size_t lookup (const data_t x0) const
 Exhaustively look through the array for a particular value.
data_t max () const
 Find the maximum element.
data_t min () const
 Find the minimum element.
Arithmetic
uvector_view_tlate
< data_t > & 
operator+= (const uvector_view_tlate< data_t > &x)
 operator+=
uvector_view_tlate
< data_t > & 
operator-= (const uvector_view_tlate< data_t > &x)
 operator-=
uvector_view_tlate
< data_t > & 
operator+= (const data_t &y)
 operator+=
uvector_view_tlate
< data_t > & 
operator-= (const data_t &y)
 operator-=
uvector_view_tlate
< data_t > & 
operator *= (const data_t &y)
 operator*=
data_t norm () const
 Norm.

Protected Member Functions

 uvector_view_tlate ()
 Empty constructor provided for use by uvector_tlate(const uvector_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 218 of file uvector_tlate.h.

size_t lookup ( const data_t  x0  )  const [inline]

Exhaustively look through the array for a particular value.

This can only fail if all of the entries in the array are not finite, in which case it calls set_err() and returns 0. The error handler is reset at the beginning of lookup().

Definition at line 260 of file uvector_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