Teuchos - Trilinos Tools Package
Version of the Day
|
This class creates and provides basic support for TriDi matrix of templated type. More...
#include <Teuchos_SerialTriDiMatrix.hpp>
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... | |
Public Member Functions | |||||||||||||||||||||||
Constructor/Destructor methods. | |||||||||||||||||||||||
SerialTriDiMatrix () | |||||||||||||||||||||||
Default Constructor. More... | |||||||||||||||||||||||
SerialTriDiMatrix (OrdinalType numRows, OrdinalType numCols, bool zeroOut=true) | |||||||||||||||||||||||
Shaped Constructor. More... | |||||||||||||||||||||||
SerialTriDiMatrix (DataAccess CV, ScalarType *values, OrdinalType numRowsCols) | |||||||||||||||||||||||
Shaped Constructor with Values. More... | |||||||||||||||||||||||
SerialTriDiMatrix (const SerialTriDiMatrix< OrdinalType, ScalarType > &Source, ETransp trans=Teuchos::NO_TRANS) | |||||||||||||||||||||||
Copy Constructor. More... | |||||||||||||||||||||||
SerialTriDiMatrix (DataAccess CV, const SerialTriDiMatrix< OrdinalType, ScalarType > &Source, OrdinalType numRowsCols, OrdinalType startRowCols=0) | |||||||||||||||||||||||
Submatrix Copy Constructor. More... | |||||||||||||||||||||||
virtual | ~SerialTriDiMatrix () | ||||||||||||||||||||||
Destructor. More... | |||||||||||||||||||||||
Shaping methods. | |||||||||||||||||||||||
int | shape (OrdinalType numRows) | ||||||||||||||||||||||
Shape method for changing the size of a SerialTriDiMatrix, initializing entries to zero. More... | |||||||||||||||||||||||
int | shapeUninitialized (OrdinalType numRows) | ||||||||||||||||||||||
Same as shape() except leaves uninitialized. More... | |||||||||||||||||||||||
int | reshape (OrdinalType numRowsCols) | ||||||||||||||||||||||
Reshaping method for changing the size of a SerialTriDiMatrix, keeping the entries. More... | |||||||||||||||||||||||
Set methods. | |||||||||||||||||||||||
SerialTriDiMatrix< OrdinalType, ScalarType > & | operator= (const SerialTriDiMatrix< OrdinalType, ScalarType > &Source) | ||||||||||||||||||||||
Copies values from one matrix to another. More... | |||||||||||||||||||||||
SerialTriDiMatrix< OrdinalType, ScalarType > & | assign (const SerialTriDiMatrix< OrdinalType, ScalarType > &Source) | ||||||||||||||||||||||
Copies values from one matrix to another. More... | |||||||||||||||||||||||
SerialTriDiMatrix< 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... | |||||||||||||||||||||||
Accessor methods. | |||||||||||||||||||||||
Set all values in the matrix to be random numbers. | |||||||||||||||||||||||
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 * | values () const | ||||||||||||||||||||||
Column access method (non-const). More... | |||||||||||||||||||||||
ScalarType * | D () const | ||||||||||||||||||||||
ScalarType * | DL () const | ||||||||||||||||||||||
ScalarType * | DU () const | ||||||||||||||||||||||
ScalarType * | DU2 () const | ||||||||||||||||||||||
Mathematical methods. | |||||||||||||||||||||||
SerialTriDiMatrix< OrdinalType, ScalarType > & | operator+= (const SerialTriDiMatrix< OrdinalType, ScalarType > &Source) | ||||||||||||||||||||||
Add another matrix to this matrix. More... | |||||||||||||||||||||||
SerialTriDiMatrix< OrdinalType, ScalarType > & | operator-= (const SerialTriDiMatrix< OrdinalType, ScalarType > &Source) | ||||||||||||||||||||||
Subtract another matrix from this matrix. More... | |||||||||||||||||||||||
SerialTriDiMatrix< OrdinalType, ScalarType > & | operator*= (const ScalarType alpha) | ||||||||||||||||||||||
Scale this matrix by alpha ; *this = alpha* More... | |||||||||||||||||||||||
int | scale (const ScalarType alpha) | ||||||||||||||||||||||
Scale this matrix by alpha ; *this = alpha* More... | |||||||||||||||||||||||
int | scale (const SerialTriDiMatrix< OrdinalType, ScalarType > &A) | ||||||||||||||||||||||
Point-wise scale this matrix by A ; i.e. *this(i,j) *= A(i,j) More... | |||||||||||||||||||||||
Comparison methods. | |||||||||||||||||||||||
Multiply
If the matrices
If the matrices
| |||||||||||||||||||||||
bool | operator== (const SerialTriDiMatrix< OrdinalType, ScalarType > &Operand) const | ||||||||||||||||||||||
Equality of two matrices. More... | |||||||||||||||||||||||
bool | operator!= (const SerialTriDiMatrix< OrdinalType, ScalarType > &Operand) const | ||||||||||||||||||||||
Inequality of two matrices. More... | |||||||||||||||||||||||
Attribute methods. | |||||||||||||||||||||||
OrdinalType | numRowsCols () const | ||||||||||||||||||||||
Returns the row dimension of this matrix. More... | |||||||||||||||||||||||
bool | empty () const | ||||||||||||||||||||||
Returns the column dimension of this matrix. 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 inherited from the Object class. More... | |||||||||||||||||||||||
Public Member Functions inherited from Teuchos::CompObject | |||||||||||||||||||||||
CompObject () | |||||||||||||||||||||||
Default constructor. More... | |||||||||||||||||||||||
CompObject (const CompObject &source) | |||||||||||||||||||||||
Copy Constructor. More... | |||||||||||||||||||||||
virtual | ~CompObject () | ||||||||||||||||||||||
Destructor. More... | |||||||||||||||||||||||
void | setFlopCounter (const Flops &FlopCounter) | ||||||||||||||||||||||
Set the internal Teuchos::Flops() pointer. More... | |||||||||||||||||||||||
void | setFlopCounter (const CompObject &compObject) | ||||||||||||||||||||||
Set the internal Teuchos::Flops() pointer to the flop counter of another Teuchos::CompObject. More... | |||||||||||||||||||||||
void | unsetFlopCounter () | ||||||||||||||||||||||
Set the internal Teuchos::Flops() pointer to 0 (no flops counted). More... | |||||||||||||||||||||||
Flops * | getFlopCounter () const | ||||||||||||||||||||||
Get the pointer to the Teuchos::Flops() object associated with this object, returns 0 if none. More... | |||||||||||||||||||||||
void | resetFlops () const | ||||||||||||||||||||||
Resets the number of floating point operations to zero for this multi-std::vector. More... | |||||||||||||||||||||||
double | getFlops () const | ||||||||||||||||||||||
Returns the number of floating point operations with this multi-std::vector. More... | |||||||||||||||||||||||
void | updateFlops (int addflops) const | ||||||||||||||||||||||
Increment Flop count for this object. More... | |||||||||||||||||||||||
void | updateFlops (long int addflops) const | ||||||||||||||||||||||
Increment Flop count for this object. More... | |||||||||||||||||||||||
void | updateFlops (double addflops) const | ||||||||||||||||||||||
Increment Flop count for this object. More... | |||||||||||||||||||||||
void | updateFlops (float addflops) const | ||||||||||||||||||||||
Increment Flop count for this object. More... | |||||||||||||||||||||||
Public Member Functions inherited from Teuchos::Object | |||||||||||||||||||||||
Object (int tracebackModeIn=-1) | |||||||||||||||||||||||
Default Constructor. More... | |||||||||||||||||||||||
Object (const char *label, int tracebackModeIn=-1) | |||||||||||||||||||||||
Labeling Constructor. More... | |||||||||||||||||||||||
Object (const std::string &label, int tracebackModeIn=-1) | |||||||||||||||||||||||
Create an Object with the given label, and optionally, with the given traceback mode. More... | |||||||||||||||||||||||
virtual | ~Object () | ||||||||||||||||||||||
Destructor (virtual, for safety of derived classes). More... | |||||||||||||||||||||||
virtual int | reportError (const std::string message, int errorCode) const | ||||||||||||||||||||||
Report an error with this Object. More... | |||||||||||||||||||||||
virtual void | setLabel (const char *theLabel) | ||||||||||||||||||||||
virtual const char * | label () const | ||||||||||||||||||||||
Access the object's label (LEGACY; return std::string instead). More... | |||||||||||||||||||||||
Public Member Functions inherited from Teuchos::BLAS< OrdinalType, ScalarType > | |||||||||||||||||||||||
BLAS (void) | |||||||||||||||||||||||
Default constructor. More... | |||||||||||||||||||||||
BLAS (const BLAS< OrdinalType, ScalarType > &) | |||||||||||||||||||||||
Copy constructor. More... | |||||||||||||||||||||||
virtual | ~BLAS (void) | ||||||||||||||||||||||
Destructor. More... | |||||||||||||||||||||||
Public Member Functions inherited from Teuchos::DefaultBLASImpl< OrdinalType, ScalarType > | |||||||||||||||||||||||
DefaultBLASImpl (void) | |||||||||||||||||||||||
Default constructor. More... | |||||||||||||||||||||||
DefaultBLASImpl (const DefaultBLASImpl< OrdinalType, ScalarType > &) | |||||||||||||||||||||||
Copy constructor. More... | |||||||||||||||||||||||
virtual | ~DefaultBLASImpl (void) | ||||||||||||||||||||||
Destructor. More... | |||||||||||||||||||||||
template<typename alpha_type , typename A_type , typename x_type , typename beta_type > | |||||||||||||||||||||||
void | GEMV (ETransp trans, const OrdinalType &m, const OrdinalType &n, const alpha_type alpha, const A_type *A, const OrdinalType &lda, const x_type *x, const OrdinalType &incx, const beta_type beta, ScalarType *y, const OrdinalType &incy) const | ||||||||||||||||||||||
Performs the matrix-vector operation: y <- alpha*A*x+beta*y or y <- alpha*A'*x+beta*y where A is a general m by n matrix. More... | |||||||||||||||||||||||
template<typename A_type > | |||||||||||||||||||||||
void | TRMV (EUplo uplo, ETransp trans, EDiag diag, const OrdinalType &n, const A_type *A, const OrdinalType &lda, ScalarType *x, const OrdinalType &incx) const | ||||||||||||||||||||||
Performs the matrix-vector operation: x <- A*x or x <- A'*x where A is a unit/non-unit n by n upper/lower triangular matrix. More... | |||||||||||||||||||||||
template<typename alpha_type , typename x_type , typename y_type > | |||||||||||||||||||||||
void | GER (const OrdinalType &m, const OrdinalType &n, const alpha_type alpha, const x_type *x, const OrdinalType &incx, const y_type *y, const OrdinalType &incy, ScalarType *A, const OrdinalType &lda) const | ||||||||||||||||||||||
Performs the rank 1 operation: A <- alpha*x*y'+A . More... | |||||||||||||||||||||||
template<typename alpha_type , typename A_type , typename B_type , typename beta_type > | |||||||||||||||||||||||
void | GEMM (ETransp transa, ETransp transb, const OrdinalType &m, const OrdinalType &n, const OrdinalType &k, const alpha_type alpha, const A_type *A, const OrdinalType &lda, const B_type *B, const OrdinalType &ldb, const beta_type beta, ScalarType *C, const OrdinalType &ldc) const | ||||||||||||||||||||||
General matrix-matrix multiply. More... | |||||||||||||||||||||||
void | SWAP (const OrdinalType &n, ScalarType *const x, const OrdinalType &incx, ScalarType *const y, const OrdinalType &incy) const | ||||||||||||||||||||||
Swap the entries of x and y. More... | |||||||||||||||||||||||
template<typename alpha_type , typename A_type , typename B_type , typename beta_type > | |||||||||||||||||||||||
void | SYMM (ESide side, EUplo uplo, const OrdinalType &m, const OrdinalType &n, const alpha_type alpha, const A_type *A, const OrdinalType &lda, const B_type *B, const OrdinalType &ldb, const beta_type beta, ScalarType *C, const OrdinalType &ldc) const | ||||||||||||||||||||||
Performs the matrix-matrix operation: C <- alpha*A*B+beta*C or C <- alpha*B*A+beta*C where A is an m by m or n by n symmetric matrix and B is a general matrix. More... | |||||||||||||||||||||||
template<typename alpha_type , typename A_type , typename beta_type > | |||||||||||||||||||||||
void | SYRK (EUplo uplo, ETransp trans, const OrdinalType &n, const OrdinalType &k, const alpha_type alpha, const A_type *A, const OrdinalType &lda, const beta_type beta, ScalarType *C, const OrdinalType &ldc) const | ||||||||||||||||||||||
Performs the symmetric rank k operation: C <- alpha*A*A'+beta*C or C <- alpha*A'*A+beta*C , where alpha and beta are scalars, C is an n by n symmetric matrix and A is an n by k matrix in the first case or k by n matrix in the second case. More... | |||||||||||||||||||||||
template<typename alpha_type , typename A_type > | |||||||||||||||||||||||
void | TRMM (ESide side, EUplo uplo, ETransp transa, EDiag diag, const OrdinalType &m, const OrdinalType &n, const alpha_type alpha, const A_type *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb) const | ||||||||||||||||||||||
Performs the matrix-matrix operation: B <- alpha*op (A)*B or B <- alpha*B*op (A) where op(A) is an unit/non-unit, upper/lower triangular matrix and B is a general matrix. More... | |||||||||||||||||||||||
template<typename alpha_type , typename A_type > | |||||||||||||||||||||||
void | TRSM (ESide side, EUplo uplo, ETransp transa, EDiag diag, const OrdinalType &m, const OrdinalType &n, const alpha_type alpha, const A_type *A, const OrdinalType &lda, ScalarType *B, const OrdinalType &ldb) const | ||||||||||||||||||||||
Solves the matrix equations: op(A)*X=alpha*B or X*op (A)=alpha*B where X and B are m by n matrices, A is a unit/non-unit, upper/lower triangular matrix and op(A) is A or A' . The matrix X is overwritten on B . More... | |||||||||||||||||||||||
void | ROTG (ScalarType *da, ScalarType *db, rotg_c_type *c, ScalarType *s) const | ||||||||||||||||||||||
Computes a Givens plane rotation. More... | |||||||||||||||||||||||
void | ROT (const OrdinalType &n, ScalarType *dx, const OrdinalType &incx, ScalarType *dy, const OrdinalType &incy, MagnitudeType *c, ScalarType *s) const | ||||||||||||||||||||||
Applies a Givens plane rotation. More... | |||||||||||||||||||||||
void | SCAL (const OrdinalType &n, const ScalarType &alpha, ScalarType *x, const OrdinalType &incx) const | ||||||||||||||||||||||
Scale the vector x by the constant alpha . More... | |||||||||||||||||||||||
void | COPY (const OrdinalType &n, const ScalarType *x, const OrdinalType &incx, ScalarType *y, const OrdinalType &incy) const | ||||||||||||||||||||||
Copy the vector x to the vector y . More... | |||||||||||||||||||||||
template<typename alpha_type , typename x_type > | |||||||||||||||||||||||
void | AXPY (const OrdinalType &n, const alpha_type alpha, const x_type *x, const OrdinalType &incx, ScalarType *y, const OrdinalType &incy) const | ||||||||||||||||||||||
Perform the operation: y <- y+alpha*x . More... | |||||||||||||||||||||||
ScalarTraits< ScalarType > ::magnitudeType | ASUM (const OrdinalType &n, const ScalarType *x, const OrdinalType &incx) const | ||||||||||||||||||||||
Sum the absolute values of the entries of x . More... | |||||||||||||||||||||||
template<typename x_type , typename y_type > | |||||||||||||||||||||||
ScalarType | DOT (const OrdinalType &n, const x_type *x, const OrdinalType &incx, const y_type *y, const OrdinalType &incy) const | ||||||||||||||||||||||
Form the dot product of the vectors x and y . More... | |||||||||||||||||||||||
ScalarTraits< ScalarType > ::magnitudeType | NRM2 (const OrdinalType &n, const ScalarType *x, const OrdinalType &incx) const | ||||||||||||||||||||||
Compute the 2-norm of the vector x . More... | |||||||||||||||||||||||
OrdinalType | IAMAX (const OrdinalType &n, const ScalarType *x, const OrdinalType &incx) const | ||||||||||||||||||||||
Return the index of the element of x with the maximum magnitude. More... | |||||||||||||||||||||||
Additional Inherited Members | |
Static Public Member Functions inherited from Teuchos::Object | |
static void | setTracebackMode (int tracebackModeValue) |
Set the value of the Object error traceback report mode. More... | |
static int | getTracebackMode () |
Get the value of the Object error traceback report mode. More... | |
Related Functions inherited from Teuchos::Object | |
std::ostream & | operator<< (std::ostream &os, const Teuchos::Object &obj) |
Print the given Object to the given output stream. More... | |
This class creates and provides basic support for TriDi matrix of templated type.
Definition at line 34 of file Teuchos_SerialTriDiMatrix.hpp.
typedef OrdinalType Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::ordinalType |
Typedef for ordinal type.
Definition at line 38 of file Teuchos_SerialTriDiMatrix.hpp.
typedef ScalarType Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::scalarType |
Typedef for scalar type.
Definition at line 40 of file Teuchos_SerialTriDiMatrix.hpp.
Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::SerialTriDiMatrix | ( | ) |
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 363 of file Teuchos_SerialTriDiMatrix.hpp.
Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::SerialTriDiMatrix | ( | OrdinalType | numRows, |
OrdinalType | numCols, | ||
bool | zeroOut = true |
||
) |
Shaped Constructor.
numRows | - Number of rows in matrix. |
numCols | - Number of columns in 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 376 of file Teuchos_SerialTriDiMatrix.hpp.
Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::SerialTriDiMatrix | ( | DataAccess | CV, |
ScalarType * | values, | ||
OrdinalType | numRowsCols | ||
) |
Shaped Constructor with Values.
CV | - Enumerated type set to Teuchos::Copy or Teuchos::View. |
values | - Pointer to an array of ScalarType. |
numRowsCols | - Number of rows and columns in matrix. |
Definition at line 392 of file Teuchos_SerialTriDiMatrix.hpp.
Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::SerialTriDiMatrix | ( | const SerialTriDiMatrix< OrdinalType, ScalarType > & | Source, |
ETransp | trans = Teuchos::NO_TRANS |
||
) |
Copy Constructor.
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 SerialTriDiMatrix class, so this information will not propogate to any operation performed on a matrix that has been copy constructed in transpose. Definition at line 417 of file Teuchos_SerialTriDiMatrix.hpp.
Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::SerialTriDiMatrix | ( | DataAccess | CV, |
const SerialTriDiMatrix< OrdinalType, ScalarType > & | Source, | ||
OrdinalType | numRowsCols, | ||
OrdinalType | startRowCols = 0 |
||
) |
Submatrix Copy Constructor.
CV | - Enumerated type set to Teuchos::Copy or Teuchos::View. |
Source | - Reference to another TriDi matrix from which values are to be copied. |
numRowsCols | - The number of rows and columns in this matrix. |
startRowCols | - The row and col of Source from which the submatrix copy should start. |
Creates a shaped matrix with numRowsCols
rows and columns, which is a submatrix of Source
. If startRowCols
, 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 476 of file Teuchos_SerialTriDiMatrix.hpp.
|
virtual |
Destructor.
Definition at line 496 of file Teuchos_SerialTriDiMatrix.hpp.
int Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::shape | ( | OrdinalType | numRows | ) |
Shape method for changing the size of a SerialTriDiMatrix, initializing entries to zero.
numRowsCols | - The number of rows in this matrix. |
This method allows the user to define the dimensions of a SerialTriDiMatrix 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.
Definition at line 506 of file Teuchos_SerialTriDiMatrix.hpp.
int Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::shapeUninitialized | ( | OrdinalType | numRows | ) |
Same as shape()
except leaves uninitialized.
Definition at line 519 of file Teuchos_SerialTriDiMatrix.hpp.
int Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::reshape | ( | OrdinalType | numRowsCols | ) |
Reshaping method for changing the size of a SerialTriDiMatrix, keeping the entries.
numRowsCols | - The number of rows in this matrix. |
This method allows the user to redefine the dimensions of a SerialTriDiMatrix 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.
Definition at line 530 of file Teuchos_SerialTriDiMatrix.hpp.
SerialTriDiMatrix< OrdinalType, ScalarType > & Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::operator= | ( | const SerialTriDiMatrix< OrdinalType, ScalarType > & | Source | ) |
Copies values from one matrix to another.
The operator= copies the values from one existing SerialTriDiMatrix 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 603 of file Teuchos_SerialTriDiMatrix.hpp.
SerialTriDiMatrix< OrdinalType, ScalarType > & Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::assign | ( | const SerialTriDiMatrix< OrdinalType, ScalarType > & | Source | ) |
Copies values from one matrix to another.
The operator= copies the values from one existing SerialTriDiMatrix to another if the dimension of both matrices are the same. If not, this matrix will be returned unchanged.
Definition at line 694 of file Teuchos_SerialTriDiMatrix.hpp.
|
inline |
Set all values in the matrix to a constant value.
value | - Value to use; |
Definition at line 151 of file Teuchos_SerialTriDiMatrix.hpp.
int Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::putScalar | ( | const ScalarType | value = Teuchos::ScalarTraits<ScalarType>::zero() | ) |
Set all values in the matrix to a constant value.
value | - Value to use; zero if none specified. |
Definition at line 576 of file Teuchos_SerialTriDiMatrix.hpp.
|
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.
rowIndex
row and colIndex
column. rowIndex
and colIndex
will only be checked if Teuchos is configured with –enable-teuchos-abc. Definition at line 739 of file Teuchos_SerialTriDiMatrix.hpp.
|
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.
rowIndex
row and colIndex
column. rowIndex
and colIndex
will only be checked if Teuchos is configured with –enable-teuchos-abc. Definition at line 715 of file Teuchos_SerialTriDiMatrix.hpp.
|
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).
colIndex
column ( values_+colIndex*stride_
). colIndex
will only be checked if Teuchos is configured with –enable-teuchos-abc.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).
colIndex
column ( values_+colIndex*stride_
). colIndex
will only be checked if Teuchos is configured with –enable-teuchos-abc.Data array access method.Definition at line 210 of file Teuchos_SerialTriDiMatrix.hpp.
SerialTriDiMatrix< OrdinalType, ScalarType > & Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::operator+= | ( | const SerialTriDiMatrix< 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 670 of file Teuchos_SerialTriDiMatrix.hpp.
SerialTriDiMatrix< OrdinalType, ScalarType > & Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::operator-= | ( | const SerialTriDiMatrix< 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 682 of file Teuchos_SerialTriDiMatrix.hpp.
SerialTriDiMatrix< OrdinalType, ScalarType > & Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::operator*= | ( | const ScalarType | alpha | ) |
Scale this
matrix by alpha
; *this
= alpha*
*this
.
alpha | Scalar to multiply this by. |
Definition at line 856 of file Teuchos_SerialTriDiMatrix.hpp.
int Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::scale | ( | const ScalarType | alpha | ) |
Scale this
matrix by alpha
; *this
= alpha*
*this
.
alpha | Scalar to multiply this by. |
Definition at line 863 of file Teuchos_SerialTriDiMatrix.hpp.
int Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::scale | ( | const SerialTriDiMatrix< 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.
B | Teuchos::SerialTriDiMatrix used to perform element-wise scaling of this. |
Definition at line 874 of file Teuchos_SerialTriDiMatrix.hpp.
bool Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::operator== | ( | const SerialTriDiMatrix< OrdinalType, ScalarType > & | Operand | ) | const |
Equality of two matrices.
Operand
are of the same shape (rows and columns) and have the same entries, else False will be returned. Definition at line 828 of file Teuchos_SerialTriDiMatrix.hpp.
bool Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::operator!= | ( | const SerialTriDiMatrix< OrdinalType, ScalarType > & | Operand | ) | const |
Inequality of two matrices.
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 847 of file Teuchos_SerialTriDiMatrix.hpp.
|
inline |
Returns the row dimension of this matrix.
Definition at line 310 of file Teuchos_SerialTriDiMatrix.hpp.
|
inline |
Returns the column dimension of this matrix.
Returns the stride between the columns of this matrix in memory. Returns whether this matrix is empty.
Definition at line 319 of file Teuchos_SerialTriDiMatrix.hpp.
ScalarTraits< ScalarType >::magnitudeType Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::normOne | ( | ) | const |
Returns the 1-norm of the matrix.
Definition at line 766 of file Teuchos_SerialTriDiMatrix.hpp.
ScalarTraits< ScalarType >::magnitudeType Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::normInf | ( | ) | const |
Returns the Infinity-norm of the matrix.
Definition at line 791 of file Teuchos_SerialTriDiMatrix.hpp.
ScalarTraits< ScalarType >::magnitudeType Teuchos::SerialTriDiMatrix< OrdinalType, ScalarType >::normFrobenius | ( | ) | const |
Returns the Frobenius-norm of the matrix.
Definition at line 808 of file Teuchos_SerialTriDiMatrix.hpp.
|
virtual |
Print method. Defines the behavior of the std::ostream << operator inherited from the Object class.
Reimplemented from Teuchos::Object.
Definition at line 892 of file Teuchos_SerialTriDiMatrix.hpp.