xmatrix3.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "xmatrix2.h"
4 
5 namespace nmx::gsl::mat {
6 
10 template<class T>
11 struct IMExchange : public IGslContainer<T, gsl_matrix, 4> {
12  // benutze Elementfunktionen der Basisklasse
14 
20  void swap_rows(size_t i, size_t j) { //
21  gsl_matrix_swap_rows(gsl(), i, j);
22  }
23 
29  void swap_columns(size_t i, size_t j) { //
30  gsl_matrix_swap_columns(gsl(), i, j);
31  }
32 
38  void swap_row_columns(size_t i, size_t j) { //
39  gsl_matrix_swap_rowcol(gsl(), i, j);
40  }
41 
45  void transpose() { gsl_matrix_transpose(gsl()); }
46 
52  void transpose_copy(const T &m) { //
53  gsl_matrix_transpose_memcpy(gsl(), m.gsl());
54  }
55 };
56 
57 } // namespace nmx::gsl::mat
void transpose_copy(const T &m)
transpose_copy
Definition: xmatrix3.h:52
void swap_row_columns(size_t i, size_t j)
swap_row_columns vertausche Reihe mit Spalte
Definition: xmatrix3.h:38
void swap_rows(size_t i, size_t j)
swap_rows vertausche Reihen
Definition: xmatrix3.h:20
void swap_columns(size_t i, size_t j)
swap_columns vertausche Spalten
Definition: xmatrix3.h:29
The IMExchange struct.
Definition: xmatrix3.h:11
const gsl_matrix * gsl() const
ermöglicht direkten Zugriff auf gsl-Funktionen
Definition: xvector0.h:18
void transpose()
transpose Matrix wird transponiert
Definition: xmatrix3.h:45
The IGslContainer struct Basisklasse für gsl-Vektoren und Matrizen.
Definition: xvector0.h:13