|
Examples are a great way to get started with any programming system
and we include a number of them here. There is also a whole
directory of example in the MTL distribution, in the
/contrib/examples/ directory.
Two extended examples are given below.
We also have a number of shorter examples, consisting of annotated
source code: Basic
MTL, LAPACK interface, and
Iterative Template Library (ITL).
Extended Examples
LU Factorization shows how to
use MTL to implement both pointwise and blocked versions of LU
factorization.
Conjugate Gradient Solver, part of
the Iterative Template Library
(ITL) shows how to use MTL to implement a higher-level algorithm that
is itself generic.
Basic MTL
Apply Givens Rotation
Vector Copy
Vector Scale
Vector Swap
Index of Max Absolute
Dot Product
General Matrix-Vector Product
Banded Matrix-Vector Product
Symmetric Matrix-Vector Product
Triangular Solve
Rank One Update
Compressed Sparse Matrix
LAPACK Interface Examples
LU Factorization
Eigenvalues and Eigenvectors
Estimate of Condition Number
Equilibrate and Reduce Condition Number
ITL Examples
Incomplete LU Preconditioner
SSOR Preconditioner
QMR Iterative Method
GMRES Iterative Method
Complete documentation on the Iterative Template Library can be found
here.
|