<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
tlapack::MatrixMarket Struct Reference

MatrixMarket class. More...

#include <MatrixMarket.hpp>

Collaboration diagram for tlapack::MatrixMarket:

Public Member Functions

template<TLAPACK_MATRIX matrix_t>
void colmajor_read (matrix_t &A, std::istream &is) const
 Read a dense matrix from an input stream (file, stdin, etc).
 
template<TLAPACK_MATRIX matrix_t>
void hessenberg (matrix_t &A)
 Generate a random upper Hessenberg matrix.
 
template<TLAPACK_MATRIX matrix_t>
void hilbert (matrix_t &A) const
 Generate a Hilbert matrix.
 
template<TLAPACK_MATRIX matrix_t>
void random (matrix_t &A)
 Generate a random dense matrix.
 
template<TLAPACK_UPLO uplo_t, TLAPACK_MATRIX matrix_t>
void random (uplo_t uplo, matrix_t &A)
 Generate an upper- or lower-triangular random matrix.
 
template<TLAPACK_MATRIX matrix_t>
void single_value (matrix_t &A, const type_t< matrix_t > &val) const
 Generate a matrix with a single value in all entries.
 
template<TLAPACK_UPLO uplo_t, TLAPACK_MATRIX matrix_t>
void single_value (uplo_t uplo, matrix_t &A, const type_t< matrix_t > &val) const
 Generate an upper- or lower-triangular matrix with a single value in all entries.
 

Public Attributes

rand_generator gen
 

Detailed Description

MatrixMarket class.

This class provides methods to read matrices from files and to generate random or structured matrices.

Member Function Documentation

◆ colmajor_read()

template<TLAPACK_MATRIX matrix_t>
void tlapack::MatrixMarket::colmajor_read ( matrix_t A,
std::istream &  is 
) const
inline

Read a dense matrix from an input stream (file, stdin, etc).

The data is read in column-major format.

Parameters
[out]AMatrix.
[in,out]isInput stream.

◆ hessenberg()

template<TLAPACK_MATRIX matrix_t>
void tlapack::MatrixMarket::hessenberg ( matrix_t A)
inline

Generate a random upper Hessenberg matrix.

Put a single garbage value float(0xFA57C0DE) below the first subdiagonal.

Parameters
[out]AMatrix.

◆ hilbert()

template<TLAPACK_MATRIX matrix_t>
void tlapack::MatrixMarket::hilbert ( matrix_t A) const
inline

Generate a Hilbert matrix.

The Hilbert matrix is defined as:

\[ A_{ij} = \frac{1}{i + j + 1} \]

Parameters
[out]AMatrix.

◆ random() [1/2]

template<TLAPACK_MATRIX matrix_t>
void tlapack::MatrixMarket::random ( matrix_t A)
inline

Generate a random dense matrix.

Parameters
[out]AMatrix.

◆ random() [2/2]

template<TLAPACK_UPLO uplo_t, TLAPACK_MATRIX matrix_t>
void tlapack::MatrixMarket::random ( uplo_t  uplo,
matrix_t A 
)
inline

Generate an upper- or lower-triangular random matrix.

Put a single garbage value float(0xCAFEBABE) in the opposite triangle.

Parameters
[in]uploUpper or lower triangular.
[out]AMatrix.

◆ single_value() [1/2]

template<TLAPACK_MATRIX matrix_t>
void tlapack::MatrixMarket::single_value ( matrix_t A,
const type_t< matrix_t > &  val 
) const
inline

Generate a matrix with a single value in all entries.

Parameters
[out]AMatrix.
[in]valValue.

◆ single_value() [2/2]

template<TLAPACK_UPLO uplo_t, TLAPACK_MATRIX matrix_t>
void tlapack::MatrixMarket::single_value ( uplo_t  uplo,
matrix_t A,
const type_t< matrix_t > &  val 
) const
inline

Generate an upper- or lower-triangular matrix with a single value in all entries.

Put a single garbage value float(0xCAFEBABE) in the opposite triangle.

Parameters
[in]uploUpper or lower triangular.
[out]AMatrix.
[in]valValue.

The documentation for this struct was generated from the following file: