xmatrix6.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "xmatrix5.h"
4 
5 namespace nmx::gsl::mat {
6 
10 template<class M>
11 struct IMProperties : public IGslContainer<M, gsl_matrix, 6> {
12  // benutze Elementfunktionen der Basisklasse
14 
15  // Informationen bezüglich der Elemente einer Matrix
16  // sind alle Elemente 0?
17  inline bool is_null() const { //
18  return gsl_matrix_isnull(gsl()) == 1;
19  }
20  //sind alle Elemente > 0 ?
21  inline bool is_pos() const { //
22  return gsl_matrix_ispos(gsl()) == 1;
23  }
24  //sind alle Elemente < 0 ?
25  inline bool is_neg() const { //
26  return gsl_matrix_isneg(gsl()) == 1;
27  }
28  // sind alle Elemente nicht negativ?
29  inline bool is_nonneg() const { //
30  return gsl_matrix_isnonneg(gsl()) == 1;
31  }
32 
39  inline friend bool operator==(const M &v1, const M &v2) {
40  return gsl_matrix_equal(v1.gsl(), v2.gsl()) == 1;
41  }
42 
49  inline friend bool operator!=(const M &m1, const M &m2) {
50  return gsl_matrix_equal(m1.gsl(), m2.gsl()) != 1;
51  }
52 };
53 
54 } // namespace nmx::gsl::mat
The IMProperties struct.
Definition: xmatrix6.h:11
friend bool operator==(const M &v1, const M &v2)
operator == prüfe ob zwei Vektoren gleich sind
Definition: xmatrix6.h:39
const gsl_matrix * gsl() const
ermöglicht direkten Zugriff auf gsl-Funktionen
Definition: xvector0.h:18
bool is_nonneg() const
Definition: xmatrix6.h:29
friend bool operator!=(const M &m1, const M &m2)
operator == prüfe ob zwei Vektoren gleich sind
Definition: xmatrix6.h:49
The IGslContainer struct Basisklasse für gsl-Vektoren und Matrizen.
Definition: xvector0.h:13