< Summary - calculator library documentation coverage (Linux)

Information
Class: /home/runner/work/cpp-cmake-ctest-template/cpp-cmake-ctest-template/src/utility/header/mathUtility.h
Assembly: Default
File(s): /home/runner/work/cpp-cmake-ctest-template/cpp-cmake-ctest-template/src/utility/header/mathUtility.h
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 78
Line coverage: 85.7%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 09/30/2026 - 03:05:56 Line coverage: 85.7% (6/7) Total lines: 78

File(s)

/home/runner/work/cpp-cmake-ctest-template/cpp-cmake-ctest-template/src/utility/header/mathUtility.h

#LineLine coverage
 11/**
 2 * @file mathUtility.h
 3 *
 4 * @brief Provides functions for math. utilities
 5 */
 6
 7#ifndef MATH_UTILITY_H
 8#define MATH_UTILITY_H
 9
 10#include "commonTypes.h"
 11
 12namespace Coruh
 13{
 014    namespace Utility
 15    {
 16        /**
 17            @class MathUtility
 18            @brief Provides Math. functions for various operations.
 19        */
 120        class MathUtility
 21        {
 22        public:
 23      /**
 24       * @brief Calculates the mean (average) of an array of data.
 25       *
 26       * This function calculates the mean (average) of the given array of data.
 27       * The data array should contain datalen elements.
 28       *
 29       * @param fiArray The array of data.
 30       * @param fiArrayLen The length of the data array.
 31       * @return The calculated mean.
 32       */
 133      static double calculateMean(const double fiArray[], int fiArrayLen);
 34
 35      /**
 36       * @brief Calculates the median of an array of data.
 37       *
 38       * This function calculates the median of the given array of data.
 39       * The data array should contain datalen elements.
 40       *
 41       * @param fiArray The array of data.
 42       * @param fiArrayLen The length of the data array.
 43       * @return The calculated median.
 44       */
 145      static double calculateMedian(const double fiArray[], int fiArrayLen);
 46
 47      /**
 48       * @brief Compares two double values for sorting purposes.
 49       *
 50       * This function is used as a comparison function for sorting an array of doubles in ascending order.
 51       *
 52       * @param fiPtrLhs Pointer to the first double value.
 53       * @param fiPtrRhs Pointer to the second double value.
 54       * @return An integer value indicating the comparison result.
 55       *   - -1 if the first value is less than the second value.
 56       *   - 0 if the values are equal.
 57       *   - 1 if the first value is greater than the second value.
 58       */
 159      static int compareDouble(const void *fiPtrLhs, const void *fiPtrRhs);
 60
 61      /**
 62       * @brief Calculates the minimum and maximum values in an array of data.
 63       *
 64       * This function calculates the minimum and maximum values in the given array of data.
 65       * The data array should contain datalen elements.
 66       *
 67       * @param fiArray The array of data.
 68       * @param fiArrayLen The length of the data array.
 69       * @param foMin Pointer to store the minimum value.
 70       * @param foMax Pointer to store the maximum value.
 71       */
 172      static void calculateMinMax(const double fiArray[], int fiArrayLen, double *foMin, double *foMax);
 73
 74        };
 75    }
 76}
 77
 78#endif // FILE_UTILITY_H

Methods/Properties