14template <
int Size,
typename Scalar>
23 template <
int Size,
typename Scalar>
31 double norm1(
const Vector<Size, std::complex<double>>& vector);
37 template <
int Size,
typename Scalar>
40 template <
int Size,
typename Scalar>
48 double norm2(
const Vector<Size, std::complex<double>>& vector);
56 template <
int Size,
typename Scalar>
72 template <
int Size,
typename Scalar>
85 template <
int Size,
typename Scalar>
92 template <
int Size,
typename Scalar>
95 template <
int Size,
typename Scalar>
102 template <
int Size,
typename Scalar>
108 template <
int Size,
typename Scalar>
114 template <
int Size,
typename Scalar>
120 template <
int Size,
typename Scalar>
126 template <
int Size,
typename Scalar>
132 template <
int Size,
typename Scalar>
135 template <
int Size,
typename Scalar>
150 template <
int Size,
typename Scalar>
153 template <
int Size,
typename Scalar>
156 template <
int Size,
typename Scalar>
159 template <
int Size,
typename Scalar>
162 template <
int Size,
typename Scalar>
170template <
int Size,
typename Scalar>
173#include "VectorOperations.cpph"
std::ostream & operator<<(std::ostream &os, const tarch::la::Vector< Size, Scalar > &vector)
Streams the component values into a comma separated representation.
std::string toString(const tarch::la::Vector< Size, Scalar > &vector)
Forward declaration.
Scalar average(const Vector< Size, Scalar > &vector)
Computes the volume of the tetrahedron spanned by the Cartesian unit vectors scaled by the correspond...
int count(const Vector< Size, Scalar > &vector, const Scalar &value)
Scalar volume(const Vector< Size, Scalar > &vector)
Computes the volume of the tetrahedron spanned by the Cartesian unit vectors scaled by the correspond...
Vector< Size, double > real(const Vector< Size, std::complex< double > > &vector)
Scalar sum(const Matrix< Rows, Cols, Scalar > &matrix)
Computes the sum of all entries of the matrix.
double maxImag(const Vector< Size, std::complex< double > > &vector)
int indexMin(const Vector< Size, Scalar > &vector)
Returns the index of the element with minimal value (NOT absolute value).
bool allEntriesAreTheSame(const Vector< Size, Scalar > &vector)
std::vector< Scalar > toSTLVector(const Vector< Size, Scalar > &vector)
double abs(double value)
Returns the absolute value of a type by redirecting to std::abs.
int indexMax(const Vector< Size, Scalar > &vector)
Returns the index of the element with maximal value (NOT absolute value).
double max(double a, double b, double c)
I need the maximum of three values all the time, to I decided to write a function for this.
Matrix< Rows, Cols, Scalar > invertEntries(const Matrix< Rows, Cols, Scalar > &matrix)
Inverts each individual entry.
int isEntryFinite(const Vector< Size, Scalar > &vector)
Scalar norm2Squared(const Vector< Size, Scalar > &vector)
int isEntryNan(const Vector< Size, Scalar > &vector)
Scalar maxAbs(const Vector< Size, Scalar > &vector)
Returns the element with maximal absolute value.
Vector< Size, double > imag(const Vector< Size, std::complex< double > > &vector)
Scalar norm1(const Vector< Size, Scalar > &vector)
Computes the 1-norm of the vector, i.e.
bool contains(const Vector< Size, Scalar > &vector, const Scalar &value)
Scalar normMax(const Vector< Size, Scalar > &vector)
Computes the max-norm of the vector.
Scalar min(const Vector< Size, Scalar > &vector)
Returns the element with minimal value (NOT absolute value).
Scalar norm2(const Vector< Size, Scalar > &vector)
Computes the 2-norm of the vector, i.e.
double maxReal(const Vector< Size, std::complex< double > > &vector)
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.