lapack_matrix<T, int External=mtl::internal> [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:mtl2lapack,generators Component type:type
Description
Use this matrix type constructor to create the type of matrix to use in conjunction with the mtl2lapack functions.

The vector type you use with mtl2lapack functions must be contiguous in memory, and have a function data() defined which returns a pointer to that memory, and a function size() with gives the length.

Example
In getrf.cc:
  double da [] = { 1, 2, 2, 2, 1, 2, 2, 2, 1 };
  lapack_matrix<double,external>::type A(da, M, N);
  lapack_matrix<double>::type B(M*NRHS, NRHS);
  mtl::set(B, 15.0);
  dense1D<int> pivot(N, 0);
  int info = getrf(A, pivot);
  if (info == 0) {
    info = getrs('N', A, pivot, B);

    if (info == 0) {
      cout << "x:" << endl;
      print_all_matrix(B);
    } else
      cout << "Factorization failed with INFO = " << info << endl;
  } else
    cout << "Solve failed with INFO = " << info << endl;

More examples can be found in geequ.cc, gecon.cc, geev.cc

Definition
Template Parameters

ParameterDescriptionDefault
Tthe matrix element type, either float, double, std::complex< float >, or std::complex< double > 
ExternalMemory managed by MTL? internal
Model of
Members
Member Where defined Description
type    
New members
Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.