Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Protected Member Functions | Protected Attributes | Related Functions | List of all members
Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType > Class Template Reference

This class creates and provides basic support for banded dense matrices of templated type. More...

#include <Teuchos_SerialBandDenseMatrix.hpp>

Inheritance diagram for Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >:
Inheritance graph
[legend]

Public Types

typedef OrdinalType ordinalType
 Typedef for ordinal type. More...
 
typedef ScalarType scalarType
 Typedef for scalar type. More...
 
- Public Types inherited from Teuchos::DefaultBLASImpl< OrdinalType, ScalarType >
typedef details::GivensRotator
< ScalarType >::c_type 
rotg_c_type
 The type used for c in ROTG. More...
 

Protected Member Functions

void copyMat (ScalarType *inputMatrix, OrdinalType strideInput, OrdinalType numRows, OrdinalType numCols, ScalarType *outputMatrix, OrdinalType strideOutput, OrdinalType startCol, ScalarType alpha=ScalarTraits< ScalarType >::zero())
 
void deleteArrays ()
 
void checkIndex (OrdinalType rowIndex, OrdinalType colIndex=0) const
 

Protected Attributes

OrdinalType numRows_
 
OrdinalType numCols_
 
OrdinalType stride_
 
OrdinalType kl_
 
OrdinalType ku_
 
bool valuesCopied_
 
ScalarType * values_
 
- Protected Attributes inherited from Teuchos::CompObject
FlopsflopCounter_
 

Related Functions

(Note that these are not member functions.)

template<typename OrdinalType , typename ScalarType >
Teuchos::RCP
< SerialBandDenseMatrix
< OrdinalType, ScalarType > > 
generalToBanded (const RCP< SerialDenseMatrix< OrdinalType, ScalarType > > &A, const OrdinalType kl, const OrdinalType ku, const bool factorFormat)
 A templated, non-member, helper function for converting a SerialDenseMatrix to a SerialBandDenseMatrix. More...
 
template<typename OrdinalType , typename ScalarType >
Teuchos::RCP
< SerialDenseMatrix
< OrdinalType, ScalarType > > 
bandedToGeneral (const RCP< SerialBandDenseMatrix< OrdinalType, ScalarType > > &AB)
 A templated, non-member, helper function for converting a SerialBandDenseMatrix to a SerialDenseMatrix. More...
 

Constructor/Destructor methods.

 SerialBandDenseMatrix ()
 Default Constructor. More...
 
 SerialBandDenseMatrix (OrdinalType numRows, OrdinalType numCols, OrdinalType kl, OrdinalType ku, bool zeroOut=true)
 Shaped Constructor. More...
 
 SerialBandDenseMatrix (DataAccess CV, ScalarType *values, OrdinalType stride, OrdinalType numRows, OrdinalType numCols, OrdinalType kl, OrdinalType ku)
 Shaped Constructor with Values. More...
 
 SerialBandDenseMatrix (const SerialBandDenseMatrix< OrdinalType, ScalarType > &Source, ETransp trans=Teuchos::NO_TRANS)
 Copy Constructor. More...
 
 SerialBandDenseMatrix (DataAccess CV, const SerialBandDenseMatrix< OrdinalType, ScalarType > &Source, OrdinalType numRows, OrdinalType numCols, OrdinalType startCol=0)
 Submatrix Copy Constructor. More...
 
virtual ~SerialBandDenseMatrix ()
 Destructor. More...
 

Shaping methods.

int shape (OrdinalType numRows, OrdinalType numCols, OrdinalType kl, OrdinalType ku)
 Shape method for changing the size of a SerialBandDenseMatrix, initializing entries to zero. More...
 
int shapeUninitialized (OrdinalType numRows, OrdinalType numCols, OrdinalType kl, OrdinalType ku)
 Same as shape() except leaves uninitialized. More...
 
int reshape (OrdinalType numRows, OrdinalType numCols, OrdinalType kl, OrdinalType ku)
 Reshaping method for changing the size of a SerialBandDenseMatrix, keeping the entries. More...
 

Set methods.

SerialBandDenseMatrix
< OrdinalType, ScalarType > & 
operator= (const SerialBandDenseMatrix< OrdinalType, ScalarType > &Source)
 Copies values from one matrix to another. More...
 
SerialBandDenseMatrix
< OrdinalType, ScalarType > & 
assign (const SerialBandDenseMatrix< OrdinalType, ScalarType > &Source)
 Copies values from one matrix to another. More...
 
SerialBandDenseMatrix
< OrdinalType, ScalarType > & 
operator= (const ScalarType value)
 Set all values in the matrix to a constant value. More...
 
int putScalar (const ScalarType value=Teuchos::ScalarTraits< ScalarType >::zero())
 Set all values in the matrix to a constant value. More...
 
int random ()
 Set all values in the matrix to be random numbers. More...
 

Accessor methods.

ScalarType & operator() (OrdinalType rowIndex, OrdinalType colIndex)
 Element access method (non-const). More...
 
const ScalarType & operator() (OrdinalType rowIndex, OrdinalType colIndex) const
 Element access method (const). More...
 
ScalarType * operator[] (OrdinalType colIndex)
 Column access method (non-const). More...
 
const ScalarType * operator[] (OrdinalType colIndex) const
 Column access method (const). More...
 
ScalarType * values () const
 Data array access method. More...
 

Mathematical methods.

SerialBandDenseMatrix
< OrdinalType, ScalarType > & 
operator+= (const SerialBandDenseMatrix< OrdinalType, ScalarType > &Source)
 Add another matrix to this matrix. More...
 
SerialBandDenseMatrix
< OrdinalType, ScalarType > & 
operator-= (const SerialBandDenseMatrix< OrdinalType, ScalarType > &Source)
 Subtract another matrix from this matrix. More...
 
SerialBandDenseMatrix
< OrdinalType, ScalarType > & 
operator*= (const ScalarType alpha)
 Scale this matrix by alpha; *this = alpha**this. More...
 
int scale (const ScalarType alpha)
 Scale this matrix by alpha; *this = alpha**this. More...
 
int scale (const SerialBandDenseMatrix< OrdinalType, ScalarType > &A)
 Point-wise scale this matrix by A; i.e. *this(i,j) *= A(i,j) More...
 

Comparison methods.

bool operator== (const SerialBandDenseMatrix< OrdinalType, ScalarType > &Operand) const
 Equality of two matrices. More...
 
bool operator!= (const SerialBandDenseMatrix< OrdinalType, ScalarType > &Operand) const
 Inequality of two matrices. More...
 

Attribute methods.

OrdinalType numRows () const
 Returns the row dimension of this matrix. More...
 
OrdinalType numCols () const
 Returns the column dimension of this matrix. More...
 
OrdinalType lowerBandwidth () const
 Returns the lower bandwidth of this matrix. More...
 
OrdinalType upperBandwidth () const
 Returns the upper bandwidth of this matrix. More...
 
OrdinalType stride () const
 Returns the stride between the columns of this matrix in memory. More...
 
bool empty () const
 Returns whether this matrix is empty. More...
 

Norm methods.

ScalarTraits< ScalarType >
::magnitudeType 
normOne () const
 Returns the 1-norm of the matrix. More...
 
ScalarTraits< ScalarType >
::magnitudeType 
normInf () const
 Returns the Infinity-norm of the matrix. More...
 
ScalarTraits< ScalarType >
::magnitudeType 
normFrobenius () const
 Returns the Frobenius-norm of the matrix. More...
 

I/O methods.

virtual void print (std::ostream &os) const
 Print method. Defines the behavior of the std::ostream << operator. More...
 

Detailed Description

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

This class creates and provides basic support for banded dense matrices of templated type.

The Teuchos_SerialBandDenseMatrix class enables the construction and use of banded dense matrices of templated type.

The Teuchos::SerialBandDenseMatrix class is intended to provide full-featured support for solving
linear and eigen system problems for banded matrices.  It is written on
top of BLAS and LAPACK and thus has excellent performance and numerical capabilities.  Using this
class, one can either perform simple factorizations and solves or apply all the tricks available in
LAPACK to get the best possible solution for very ill-conditioned problems.

<b>Teuchos::SerialBandDenseMatrix vs. Teuchos::LAPACK</b>

The Teuchos::LAPACK class provides access to most of the same functionality as Teuchos::SerialBandDenseMatrix.
The primary difference is that Teuchos::LAPACK is a "thin" layer on top of LAPACK and
Teuchos::SerialBandDenseMatrix attempts to provide easy access to the more sophisticated aspects of
solving dense linear and eigensystems.

Constructing Teuchos::SerialBandDenseMatrix Objects

There are three Teuchos::SerialBandDenseMatrix constructors. The first constructs a zero-sized object which should be made to appropriate length using the Shape() or Reshape() functions and then filled with the [] or () operators. The second is a constructor that accepts user data as a 2D array, the third is a copy constructor. The second constructor has two data access modes (specified by the Teuchos::DataAccess argument):

  1. Copy mode - Allocates memory and makes a copy of the user-provided data. In this case, the user data is not needed after construction.
  2. View mode - Creates a "view" of the user data. In this case, the user data is required to remain intact for the life of the object.
Warning
View mode is extremely dangerous from a data hiding perspective. Therefore, we strongly encourage users to develop code using Copy mode first and only use the View mode in a secondary optimization phase.

Format of the matrix A

The matrix A is stored as a banded matrix AB according to the LAPACK format. Consider using the non-member conversion routines generalToBanded and bandedToGeneral if the full Teuchos::SerialDenseMatrix is already in storage. However, it is more efficient to simply construct the Teuchos::SerialBandDenseMatrix with the desired parameters and use the provided matrix access operators to assign (legal) entries so that the full rectangular matrix does not need to be stored. A full description of the LAPACK banded format can be found at http://www.netlib.org/lapack/lug/node124.html. Briefly, the banded storage format of AB used internally is as follows:

Extracting Data from Teuchos::SerialBandDenseMatrix Objects

Once a Teuchos::SerialBandDenseMatrix is constructed, it is possible to view the data via access functions.

Warning
Use of these access functions cam be extremely dangerous from a data hiding perspective.

Vector and Utility Functions

Once a Teuchos::SerialBandDenseMatrix is constructed, several mathematical functions can be applied to the object. Specifically:

Definition at line 133 of file Teuchos_SerialBandDenseMatrix.hpp.

Member Typedef Documentation

template<typename OrdinalType, typename ScalarType>
typedef OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::ordinalType

Typedef for ordinal type.

Definition at line 138 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
typedef ScalarType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::scalarType

Typedef for scalar type.

Definition at line 140 of file Teuchos_SerialBandDenseMatrix.hpp.

Constructor & Destructor Documentation

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

Default Constructor.

Creates a empty matrix of no dimension. The Shaping methods should be used to size this matrix. Values of this matrix should be set using the [], (), or = operators.

Definition at line 449 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::SerialBandDenseMatrix ( OrdinalType  numRows,
OrdinalType  numCols,
OrdinalType  kl,
OrdinalType  ku,
bool  zeroOut = true 
)

Shaped Constructor.

Parameters
numRows- Number of rows in matrix.
numCols- Number of columns in matrix.
kl- Lower bandwidth of matrix.
ku- Upper bandwidth of matrix.
zeroOut- Initializes values to 0 if true (default)

Creates a shaped matrix with numRows rows and numCols cols. All values are initialized to 0 when zeroOut is true. Values of this matrix should be set using the [] or the () operators.

Definition at line 463 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::SerialBandDenseMatrix ( DataAccess  CV,
ScalarType *  values,
OrdinalType  stride,
OrdinalType  numRows,
OrdinalType  numCols,
OrdinalType  kl,
OrdinalType  ku 
)

Shaped Constructor with Values.

Parameters
CV- Enumerated type set to Teuchos::Copy or Teuchos::View.
values- Pointer to an array of ScalarType. The first column starts at values, the second at values+stride, etc.
stride- The stride between the columns of the matrix in memory.
numRows- Number of rows in matrix.
numCols- Number of columns in matrix.
kl- Lower bandwidth of matrix.
ku- Upper bandwidth of matrix.

Definition at line 486 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::SerialBandDenseMatrix ( const SerialBandDenseMatrix< OrdinalType, ScalarType > &  Source,
ETransp  trans = Teuchos::NO_TRANS 
)

Copy Constructor.

Note
A deep copy of the Source transposed can be obtained if trans=Teuchos::TRANS, else a non-transposed copy of Source is made. There is no storage of the transpose state of the matrix within the SerialBandDenseMatrix class, so this information will not propogate to any operation performed on a matrix that has been copy constructed in transpose.

Definition at line 513 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::SerialBandDenseMatrix ( DataAccess  CV,
const SerialBandDenseMatrix< OrdinalType, ScalarType > &  Source,
OrdinalType  numRows,
OrdinalType  numCols,
OrdinalType  startCol = 0 
)

Submatrix Copy Constructor.

Parameters
CV- Enumerated type set to Teuchos::Copy or Teuchos::View.
Source- Reference to another dense matrix from which values are to be copied.
numRows- The number of rows in this matrix.
numCols- The number of columns in this matrix.
kl- Lower bandwidth of matrix.
ku- Upper bandwidth of matrix.
startRow- The row of Source from which the submatrix copy should start.
startCol- The column of Source from which the submatrix copy should start.

Creates a shaped matrix with numRows rows and numCols columns, which is a submatrix of Source. If startRow and startCol are not given, then the submatrix is the leading submatrix of Source. Otherwise, the (1,1) entry in the copied matrix is the (startRow, startCol) entry of Source.

Definition at line 567 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::~SerialBandDenseMatrix ( )
virtual

Destructor.

Definition at line 593 of file Teuchos_SerialBandDenseMatrix.hpp.

Member Function Documentation

template<typename OrdinalType , typename ScalarType >
int Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::shape ( OrdinalType  numRows,
OrdinalType  numCols,
OrdinalType  kl,
OrdinalType  ku 
)

Shape method for changing the size of a SerialBandDenseMatrix, initializing entries to zero.

Parameters
numRows- The number of rows in this matrix.
numCols- The number of columns in this matrix.
kl- Lower bandwidth of matrix.
ku- Upper bandwidth of matrix.

This method allows the user to define the dimensions of a SerialBandDenseMatrix 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 matrix starts of with all zero values.

Returns
Integer error code, set to 0 if successful.

Definition at line 603 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
int Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::shapeUninitialized ( OrdinalType  numRows,
OrdinalType  numCols,
OrdinalType  kl,
OrdinalType  ku 
)

Same as shape() except leaves uninitialized.

Definition at line 621 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
int Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::reshape ( OrdinalType  numRows,
OrdinalType  numCols,
OrdinalType  kl,
OrdinalType  ku 
)

Reshaping method for changing the size of a SerialBandDenseMatrix, keeping the entries.

Parameters
numRows- The number of rows in this matrix.
numCols- The number of columns in this matrix.
kl- Lower bandwidth of matrix.
ku- Upper bandwidth of matrix.

This method allows the user to redefine the dimensions of a SerialBandDenseMatrix at any point. This method can be called at any point after construction. Any values previously in this object will be copied into the reshaped matrix.

Returns
Integer error code, set 0 if successful.

Definition at line 638 of file Teuchos_SerialBandDenseMatrix.hpp.

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

Copies values from one matrix to another.

The operator= copies the values from one existing SerialBandDenseMatrix 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 object will be resized if it is not large enough to copy Source into.

Definition at line 701 of file Teuchos_SerialBandDenseMatrix.hpp.

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

Copies values from one matrix to another.

The operator= copies the values from one existing SerialBandDenseMatrix to another if the dimension of both matrices are the same. If not, this matrix will be returned unchanged.

Definition at line 793 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
SerialBandDenseMatrix<OrdinalType, ScalarType>& Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::operator= ( const ScalarType  value)
inline

Set all values in the matrix to a constant value.

Parameters
value- Value to use;

Definition at line 268 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
int Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::putScalar ( const ScalarType  value = Teuchos::ScalarTraits<ScalarType>::zero())

Set all values in the matrix to a constant value.

Parameters
value- Value to use; zero if none specified.
Returns
Integer error code, set to 0 if successful.

Definition at line 672 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
int Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::random ( )

Set all values in the matrix to be random numbers.

Definition at line 686 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
ScalarType & Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::operator() ( OrdinalType  rowIndex,
OrdinalType  colIndex 
)
inline

Element access method (non-const).

Returns the element in the ith row and jth column if A(i,j) is specified, the expression A[j][i] will return the same element.

Returns
Element from the specified rowIndex row and colIndex column.
Warning
The validity of rowIndex and colIndex will only be checked if Teuchos is configured with –enable-teuchos-abc.

Definition at line 814 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
const ScalarType & Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::operator() ( OrdinalType  rowIndex,
OrdinalType  colIndex 
) const
inline

Element access method (const).

Returns the element in the ith row and jth column if A(i,j) is specified, the expression A[j][i] will return the same element.

Returns
Element from the specified rowIndex row and colIndex column.
Warning
The validity of rowIndex and colIndex will only be checked if Teuchos is configured with –enable-teuchos-abc.

Definition at line 823 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
ScalarType * Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::operator[] ( OrdinalType  colIndex)
inline

Column access method (non-const).

Returns the pointer to the ScalarType array at the jth column if A[j] is specified, the expression A[j][i] will return the same element as A(i,j).

Returns
Pointer to the ScalarType array at the colIndex column ( values_+colIndex*stride_ ).
Warning
The validity of colIndex will only be checked if Teuchos is configured with –enable-teuchos-abc.

Definition at line 841 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
const ScalarType * Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::operator[] ( OrdinalType  colIndex) const
inline

Column access method (const).

Returns the pointer to the ScalarType array at the jth column if A[j] is specified, the expression A[j][i] will return the same element as A(i,j).

Returns
Pointer to the ScalarType array at the colIndex column ( values_+colIndex*stride_ ).
Warning
The validity of colIndex will only be checked if Teuchos is configured with –enable-teuchos-abc.

Definition at line 832 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
ScalarType* Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::values ( ) const
inline

Data array access method.

Returns
Pointer to the ScalarType data array contained in the object.

Definition at line 327 of file Teuchos_SerialBandDenseMatrix.hpp.

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

Add another matrix to this matrix.

Add Source to this if the dimension of both matrices are the same. If not, this matrix will be returned unchanged.

Definition at line 767 of file Teuchos_SerialBandDenseMatrix.hpp.

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

Subtract another matrix from this matrix.

Subtract Source from this if the dimension of both matrices are the same. If not, this matrix will be returned unchanged.

Definition at line 780 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
SerialBandDenseMatrix< OrdinalType, ScalarType > & Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::operator*= ( const ScalarType  alpha)

Scale this matrix by alpha; *this = alpha**this.

Parameters
alphaScalar to multiply this by.

Definition at line 948 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
int Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::scale ( const ScalarType  alpha)

Scale this matrix by alpha; *this = alpha**this.

Parameters
alphaScalar to multiply this by.
Returns
Integer error code, set to 0 if successful.

Definition at line 955 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
int Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::scale ( const SerialBandDenseMatrix< OrdinalType, ScalarType > &  A)

Point-wise scale this matrix by A; i.e. *this(i,j) *= A(i,j)

The values of *this matrix will be point-wise scaled by the values in A. If A and this matrix are not the same dimension this will be returned unchanged.

Parameters
BTeuchos::SerialBandDenseMatrix used to perform element-wise scaling of this.
Returns
Integer error code, set to 0 if successful.

Definition at line 973 of file Teuchos_SerialBandDenseMatrix.hpp.

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

Equality of two matrices.

Returns
True if this matrix and Operand are of the same shape (rows and columns) and have the same entries, else False will be returned.

Definition at line 917 of file Teuchos_SerialBandDenseMatrix.hpp.

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

Inequality of two matrices.

Returns
True if this matrix and Operand of not of the same shape (rows and columns) or don't have the same entries, else False will be returned.

Definition at line 938 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::numRows ( ) const
inline

Returns the row dimension of this matrix.

Definition at line 391 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::numCols ( ) const
inline

Returns the column dimension of this matrix.

Definition at line 394 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::lowerBandwidth ( ) const
inline

Returns the lower bandwidth of this matrix.

Definition at line 397 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::upperBandwidth ( ) const
inline

Returns the upper bandwidth of this matrix.

Definition at line 400 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::stride ( ) const
inline

Returns the stride between the columns of this matrix in memory.

Definition at line 403 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
bool Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::empty ( ) const
inline

Returns whether this matrix is empty.

Definition at line 406 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
ScalarTraits< ScalarType >::magnitudeType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::normOne ( ) const

Returns the 1-norm of the matrix.

Definition at line 854 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
ScalarTraits< ScalarType >::magnitudeType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::normInf ( ) const

Returns the Infinity-norm of the matrix.

Definition at line 878 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
ScalarTraits< ScalarType >::magnitudeType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::normFrobenius ( ) const

Returns the Frobenius-norm of the matrix.

Definition at line 896 of file Teuchos_SerialBandDenseMatrix.hpp.

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

Print method. Defines the behavior of the std::ostream << operator.

Definition at line 995 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
void Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::copyMat ( ScalarType *  inputMatrix,
OrdinalType  strideInput,
OrdinalType  numRows,
OrdinalType  numCols,
ScalarType *  outputMatrix,
OrdinalType  strideOutput,
OrdinalType  startCol,
ScalarType  alpha = ScalarTraits<ScalarType>::zero() 
)
protected

Definition at line 1049 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
void Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::deleteArrays ( void  )
protected

Definition at line 1039 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType , typename ScalarType >
void Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::checkIndex ( OrdinalType  rowIndex,
OrdinalType  colIndex = 0 
) const
inlineprotected

Definition at line 1025 of file Teuchos_SerialBandDenseMatrix.hpp.

Friends And Related Function Documentation

template<typename OrdinalType , typename ScalarType >
Teuchos::RCP< SerialBandDenseMatrix< OrdinalType, ScalarType > > generalToBanded ( const RCP< SerialDenseMatrix< OrdinalType, ScalarType > > &  A,
const OrdinalType  kl,
const OrdinalType  ku,
const bool  factorFormat 
)
related

A templated, non-member, helper function for converting a SerialDenseMatrix to a SerialBandDenseMatrix.

Parameters
A- [in] SerialDenseMatrix to be converted
kl- [in] Integer indicating desired lower bandwidth of band matrix.
ku- [in] Integer indicating desired upper bandwidth of band matrix.
factorFormat- [in] Bool indicating whether kl extra superdiagonals should be stored to be used by factorization.
Note
The syntax for calling this function is: Teuchos::SerialBandDenseMatrix<int,double> AB = Teuchos::generalToBanded<int,double>( A, kl, ku, true )

Definition at line 228 of file Teuchos_SerialDenseHelpers.hpp.

template<typename OrdinalType , typename ScalarType >
Teuchos::RCP< SerialDenseMatrix< OrdinalType, ScalarType > > bandedToGeneral ( const RCP< SerialBandDenseMatrix< OrdinalType, ScalarType > > &  AB)
related

A templated, non-member, helper function for converting a SerialBandDenseMatrix to a SerialDenseMatrix.

Parameters
A- [in] SerialBandDenseMatrix to be converted
Note
The syntax for calling this function is: Teuchos::SerialDenseMatrix<int,double> A = Teuchos::bandedToGeneral<int,double>( AB )

Definition at line 264 of file Teuchos_SerialDenseHelpers.hpp.

Member Data Documentation

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::numRows_
protected

Definition at line 434 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::numCols_
protected

Definition at line 435 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::stride_
protected

Definition at line 436 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::kl_
protected

Definition at line 437 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
OrdinalType Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::ku_
protected

Definition at line 438 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
bool Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::valuesCopied_
protected

Definition at line 439 of file Teuchos_SerialBandDenseMatrix.hpp.

template<typename OrdinalType, typename ScalarType>
ScalarType* Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType >::values_
protected

Definition at line 440 of file Teuchos_SerialBandDenseMatrix.hpp.


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