Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
uvector_const_view_tlate< data_t > Class Template Reference

A const vector view with unit stride. More...

#include <uvector_tlate.h>

Inheritance diagram for uvector_const_view_tlate< data_t >:
umatrix_const_row_tlate< data_t > uvector_base_tlate< data_t > uvector_const_array_tlate< data_t > uvector_const_subvector_tlate< data_t > uvector_tlate< data_t > uvector_view_tlate< data_t > ufvector< N > umatrix_row_tlate< data_t > uvector_array_tlate< data_t > uvector_subvector_tlate< data_t >

Detailed Description

template<class data_t>
class uvector_const_view_tlate< data_t >

Idea for Future:
Could allow user-defined specification of restrict keyword

Definition at line 64 of file uvector_tlate.h.

Public Member Functions

data_t norm () const
 Norm.
Copy constructors
 uvector_const_view_tlate (const uvector_const_view_tlate &v)
 Copy constructor - create a new view of the same vector.
uvector_const_view_tlateoperator= (const uvector_const_view_tlate &v)
 Copy constructor - create a new view of the same vector.
Get and set methods
const data_t & operator[] (size_t i) const
 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)
const data_t * get_const_ptr (size_t i) const
 Get pointer (with optional range-checking)
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.
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.

Protected Member Functions

 uvector_const_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.

Friends

class uvector_base_tlate< data_t >
class uvector_view_tlate< data_t >
class uvector_tlate< data_t >
class uvector_subvector_tlate< data_t >
class uvector_const_subvector_tlate< data_t >

Member Function Documentation

template<class data_t>
size_t uvector_const_view_tlate< data_t >::size ( ) const [inline]

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

Definition at line 176 of file uvector_tlate.h.

template<class data_t>
size_t uvector_const_view_tlate< data_t >::lookup ( const data_t  x0) const [inline]

This can only fail if all of the entries in the array are not finite, in which case it calls O2SCL_ERR() and returns 0.

If more than one entry is the same distance from x0, this function returns the entry with smallest index.

Definition at line 200 of file uvector_tlate.h.

template<class data_t>
data_t uvector_const_view_tlate< data_t >::norm ( ) const [inline]
Todo:
Fix this so that norm() is computed as in ovector and so that integer norms are performed separately.

Definition at line 259 of file uvector_tlate.h.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.