Teuchos::SerialDenseVector< OrdinalType, ScalarType > Class Template Reference

This class creates and provides basic support for dense vectors of templated type as a specialization of Teuchos::SerialDenseMatrix. Additional methods for the SerialDenseVector class, like mathematical methods, can be found documented in SerialDenseMatrix. More...

#include <Teuchos_SerialDenseVector.hpp>

Inheritance diagram for Teuchos::SerialDenseVector< OrdinalType, ScalarType >:

Teuchos::SerialDenseMatrix< OrdinalType, ScalarType > Teuchos::CompObject Teuchos::Object Teuchos::BLAS< OrdinalType, ScalarType > List of all members.

Public Member Functions

Constructor/Destructor methods.
 SerialDenseVector ()
 Default Constructor.
 SerialDenseVector (OrdinalType length)
 Shaped Constructor.
 SerialDenseVector (DataAccess CV, ScalarType *values, OrdinalType length)
 Shaped Constructor with Values.
 SerialDenseVector (const SerialDenseVector< OrdinalType, ScalarType > &Source)
 Copy Constructor.
virtual ~SerialDenseVector ()
 Destructor.
Sizing methods.
int size (OrdinalType length)
 Size method for changing the size of a SerialDenseVector, initializing entries to zero.
int resize (OrdinalType length)
 Resizing method for changing the size of a SerialDenseVector, keeping the entries.
Comparison methods.
bool operator== (const SerialDenseVector< OrdinalType, ScalarType > &Operand)
 Equality of two matrices.
bool operator!= (const SerialDenseVector< OrdinalType, ScalarType > &Operand)
 Inequality of two matrices.
Set methods.
SerialDenseVector< OrdinalType,
ScalarType > & 
operator= (const SerialDenseVector< OrdinalType, ScalarType > &Source)
 Copies values from one std::vector to another.
Accessor methods.
ScalarType & operator() (OrdinalType index)
 Element access method (non-const).
const ScalarType & operator() (OrdinalType index) const
 Element access method (const).
ScalarType & operator[] (OrdinalType index)
 Element access method (non-const).
const ScalarType & operator[] (OrdinalType index) const
 Element access method (const).
Attribute methods.
OrdinalType length () const
 Returns the length of this std::vector.
I/O methods.
virtual void print (std::ostream &os) const
 Print method. Define the behavior of the std::ostream << operator inherited from the Object class.

Detailed Description

template<typename OrdinalType, typename ScalarType>
class Teuchos::SerialDenseVector< OrdinalType, ScalarType >

This class creates and provides basic support for dense vectors of templated type as a specialization of Teuchos::SerialDenseMatrix. Additional methods for the SerialDenseVector class, like mathematical methods, can be found documented in SerialDenseMatrix.
Examples:

LAPACK/cxx_main.cpp.

Definition at line 47 of file Teuchos_SerialDenseVector.hpp.


Constructor & Destructor Documentation

template<typename OrdinalType, typename ScalarType>
Teuchos::SerialDenseVector< OrdinalType, ScalarType >::SerialDenseVector (  ) 

Default Constructor.

Creates an empty std::vector of no length. The Sizing methods should be used to size this matrix. Values of this matrix should be set using the [] or the () operators.

Definition at line 176 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
Teuchos::SerialDenseVector< OrdinalType, ScalarType >::SerialDenseVector ( OrdinalType  length  ) 

Shaped Constructor.

Parameters:
length - Number of elements in this std::vector.
Creates a shaped std::vector of length length. All values are initialized to zero. Values of this std::vector should be set using [] or the () operators.

Definition at line 179 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
Teuchos::SerialDenseVector< OrdinalType, ScalarType >::SerialDenseVector ( DataAccess  CV,
ScalarType *  values,
OrdinalType  length 
)

Shaped Constructor with Values.

Parameters:
CV - Enumerated type set to Teuchos::Copy or Teuchos::View.
values - Pointer to an array of ScalarType of the given length.
length - Length of std::vector to be constructed.

Definition at line 182 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
Teuchos::SerialDenseVector< OrdinalType, ScalarType >::SerialDenseVector ( const SerialDenseVector< OrdinalType, ScalarType > &  Source  ) 

Copy Constructor.

Definition at line 186 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
Teuchos::SerialDenseVector< OrdinalType, ScalarType >::~SerialDenseVector (  )  [virtual]

Destructor.

Definition at line 190 of file Teuchos_SerialDenseVector.hpp.


Member Function Documentation

template<typename OrdinalType, typename ScalarType>
int Teuchos::SerialDenseVector< OrdinalType, ScalarType >::size ( OrdinalType  length  )  [inline]

Size method for changing the size of a SerialDenseVector, initializing entries to zero.

Parameters:
length - The length of the new std::vector.
This allows the user to define the length of a SerialDenseVector at any point. This method can be called at any point after construction. Any values previously in this object will be destroyed and the resized std::vector starts with all zero values.

Definition at line 92 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
int Teuchos::SerialDenseVector< OrdinalType, ScalarType >::resize ( OrdinalType  length  )  [inline]

Resizing method for changing the size of a SerialDenseVector, keeping the entries.

Parameters:
length - The length of the new std::vector. This allows the user to redefine the length of a SerialDenseVector at any point. This method can be called at any point after construction. Any values previously in this object will be copied to the resized std::vector.

Definition at line 101 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
bool Teuchos::SerialDenseVector< OrdinalType, ScalarType >::operator== ( const SerialDenseVector< OrdinalType, ScalarType > &  Operand  ) 

Equality of two matrices.

Returns:
True if this std::vector and Operand are of the same length and have the same entries, else False will be returned.

Definition at line 200 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
bool Teuchos::SerialDenseVector< OrdinalType, ScalarType >::operator!= ( const SerialDenseVector< OrdinalType, ScalarType > &  Operand  ) 

Inequality of two matrices.

Returns:
True if this std::vector and Operand are not of the same length or do not have the same entries, else False will be returned.

Definition at line 221 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
SerialDenseVector< OrdinalType, ScalarType > & Teuchos::SerialDenseVector< OrdinalType, ScalarType >::operator= ( const SerialDenseVector< OrdinalType, ScalarType > &  Source  ) 

Copies values from one std::vector to another.

The operator= copies the values from one existing SerialDenseVector to another. If Source is a view (i.e. CV = Teuchos::View), then this method will return a view. Otherwise, it will return a copy of Source. this will be resized if it is not large enough to copy Source into.

Definition at line 193 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
ScalarType & Teuchos::SerialDenseVector< OrdinalType, ScalarType >::operator() ( OrdinalType  index  )  [inline]

Element access method (non-const).

Returns the ith element if x(i) is specified, the expression x[i] will return the same element.

Returns:
(*this)(index)
Warning:
The validity of index will only be checked if Teuchos is configured with --enable-teuchos-abc.

Definition at line 250 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
const ScalarType & Teuchos::SerialDenseVector< OrdinalType, ScalarType >::operator() ( OrdinalType  index  )  const [inline]

Element access method (const).

Returns the ith element if x(i) is specified, the expression x[i] will return the same element.

Returns:
(*this)(index)
Warning:
The validity of index will only be checked if Teuchos is configured with --enable-teuchos-abc.

Definition at line 259 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
ScalarType & Teuchos::SerialDenseVector< OrdinalType, ScalarType >::operator[] ( OrdinalType  index  )  [inline]

Element access method (non-const).

Returns the ith element if x[i] is specified, the expression x(i) will return the same element.

Returns:
(*this)[index]
Warning:
The validity of index will only be checked if Teuchos is configured with --enable-teuchos-abc.

Reimplemented from Teuchos::SerialDenseMatrix< OrdinalType, ScalarType >.

Definition at line 277 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
const ScalarType & Teuchos::SerialDenseVector< OrdinalType, ScalarType >::operator[] ( OrdinalType  index  )  const [inline]

Element access method (const).

Returns the ith element if x[i] is specified, the expression x(i) will return the same element.

Returns:
(*this)[index]
Warning:
The validity of index will only be checked if Teuchos is configured with --enable-teuchos-abc.

Reimplemented from Teuchos::SerialDenseMatrix< OrdinalType, ScalarType >.

Definition at line 268 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialDenseVector< OrdinalType, ScalarType >::length (  )  const [inline]

Returns the length of this std::vector.

Definition at line 165 of file Teuchos_SerialDenseVector.hpp.

template<typename OrdinalType, typename ScalarType>
void Teuchos::SerialDenseVector< OrdinalType, ScalarType >::print ( std::ostream &  os  )  const [virtual]

Print method. Define the behavior of the std::ostream << operator inherited from the Object class.

Reimplemented from Teuchos::SerialDenseMatrix< OrdinalType, ScalarType >.

Definition at line 227 of file Teuchos_SerialDenseVector.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Oct 20 12:45:27 2009 for Teuchos - Trilinos Tools Package by doxygen 1.4.7