Dateien nach „BSP_1_D“ hochladen

This commit is contained in:
Georg Thomas Mandl 2025-10-22 23:15:15 +02:00
commit dde42b7628
4 changed files with 127 additions and 0 deletions

25
BSP_1_D/bsp_1_d.h Normal file
View file

@ -0,0 +1,25 @@
#ifndef BSP_1_D_H_INCLUDED
#define BSP_1_D_H_INCLUDED
#include <vector>
/** \brief Berechnet das Skalarprodukt zweier Vektoren
*
* \param[in] x erster Vektor
* \param[in] y zweiter Vektor
* \return Skalarprodukt von @x und @y
*
*/
double scalar(std::vector<double> const &x, std::vector<double> const &y);
/** \brief Berechnet das Skalarprodukt zweier Vektoren unter Anwendung der Kahan-Summation
*
* \param[in] x erster Vektor
* \param[in] y zweiter Vektor
* \return Skalarprodukt von @x und @y
*
*/
double Kahan_skalar(std::vector<double> const &x, std::vector<double> const &y);
#endif // BSP_1_D_H_INCLUDED