25 template<
class X,
class FN>
27 if constexpr (std::is_same_v<X, double>) {
32 return static_cast<T &
>(*this);
60 return apply_fn(x, gsl_vector_add_constant);
63 return apply_fn(-x, gsl_vector_add_constant);
66 return apply_fn(x, gsl_vector_scale);
76 gsl_vector_scale(
gsl(), 1 / x);
77 return static_cast<T &
>(*this);
The IVCalc struct Komponente implementiert Operatoren +=,-=,*=,/=.
T & operator+=(double x)
Implementierung der Operatoren +=,-=,*=.
T & operator+=(const T &v)
Implementierung der Operatoren +=,-=,*=,/=.
T & operator*=(const T &v)
static void error_if(const std::string &s, bool arg)
error_if Fehler wenn Bedingung erfüllt ist
T & apply_fn(const X &v, FN fn)
apply_fn Hilfsfunktion
T & operator-=(const T &v)
const gsl_vector * gsl() const
ermöglicht direkten Zugriff auf gsl-Funktionen
T & operator/=(const T &v)
T & operator/=(double x)
operator /= dividiere alle Elemente mit einer Zahl
The IGslContainer struct Basisklasse für gsl-Vektoren und Matrizen.