LaRowVectorDouble Class Reference

Row vector. More...

#include <larvd.h>

Inheritance diagram for LaRowVectorDouble:

LaGenMatDouble List of all members.

Public Member Functions

 LaRowVectorDouble ()
 LaRowVectorDouble (int)
 LaRowVectorDouble (double *, int)
 LaRowVectorDouble (const LaGenMatDouble &)
int size () const
int inc () const
LaIndex index () const
int start () const
int end () const
double & operator() (int i)
const double & operator() (int i) const
LaRowVectorDouble operator() (const LaIndex &)
LaRowVectorDoubleoperator= (const LaGenMatDouble &A)
LaRowVectorDoubleoperator= (double d)

Detailed Description

Row vector.

A row vector is simply an nx1 matrix, only that it can be constructed and accessed by a single dimension. (FIXME: It is unclear whether this class is actually well supported inside Lapack++; probably you should only use LaVectorDouble instead.)


Constructor & Destructor Documentation

LaRowVectorDouble::LaRowVectorDouble (  )  [inline]

LaRowVectorDouble::LaRowVectorDouble ( int   )  [inline]

LaRowVectorDouble::LaRowVectorDouble ( double *  ,
int   
) [inline]

LaRowVectorDouble::LaRowVectorDouble ( const LaGenMatDouble  )  [inline]


Member Function Documentation

int LaRowVectorDouble::size (  )  const [inline]

int LaRowVectorDouble::inc (  )  const [inline]

LaIndex LaRowVectorDouble::index (  )  const [inline]

int LaRowVectorDouble::start (  )  const [inline]

int LaRowVectorDouble::end (  )  const [inline]

double & LaRowVectorDouble::operator() ( int  i  )  [inline]

const double & LaRowVectorDouble::operator() ( int  i  )  const [inline]

LaRowVectorDouble LaRowVectorDouble::operator() ( const LaIndex  )  [inline]

LaRowVectorDouble & LaRowVectorDouble::operator= ( const LaGenMatDouble A  )  [inline]

Release left-hand side (reclaiming memory space if possible) and copy elements of elements of s. Unline inject(), it does not require conformity, and previous references of left-hand side are unaffected.

This is an alias for copy().

Watch out! Due to the C++ "named return value optimization" you cannot use this as an alias for copy() when declaring a variable if the right-side is a return value of operator(). More precisely, you cannot write the following:

       LaGenMatDouble x = y(LaIndex(),LaIndex()); // erroneous reference copy!
       

Instead, if the initialization should create a new copy of the right-side matrix, you have to write it this way:

       LaGenMatDouble x = y(LaIndex(),LaIndex()).copy(); // correct deep-copy
       

Or this way:

       LaGenMatDouble x;
       x = y(LaIndex(),LaIndex()); // correct deep-copy
       

Note: The manual for lapack++-1.1 claimed that this operator would be an alias for ref(), not for copy(), i.e. this operator creates a reference instead of a deep copy. However, since that confused many people, the behaviour was changed so that B=A will now create B as a deep copy instead of a reference. If you want a reference, please write B.ref(A) explicitly.

Reimplemented from LaGenMatDouble.

LaRowVectorDouble & LaRowVectorDouble::operator= ( double  d  )  [inline]

Set elements of left-hand side to the scalar value s. No new matrix is created, so that if there are other matrices that reference this memory space, they will also be affected.

Reimplemented from LaGenMatDouble.


Generated on Sat Jul 14 11:40:37 2007 for Lapack++ by  doxygen 1.5.0