• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

paulmthompson / WhiskerToolbox / 17846711083

19 Sep 2025 02:28AM UTC coverage: 72.02% (+0.08%) from 71.942%
17846711083

push

github

paulmthompson
event in interval computer works with entity ids

259 of 280 new or added lines in 6 files covered. (92.5%)

268 existing lines in 17 files now uncovered.

40247 of 55883 relevant lines covered (72.02%)

1227.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

74.07
/src/CoreGeometry/include/CoreGeometry/lines.hpp
1
#ifndef DATAMANAGER_LINES_HPP
2
#define DATAMANAGER_LINES_HPP
3

4
#include "CoreGeometry/points.hpp"
5

6
#include <cstdint>
7
#include <initializer_list>
8
#include <type_traits>
9
#include <vector>
10

11
class Line2D {
12
public:
13
    Line2D() = default;
6✔
14
    Line2D(std::vector<Point2D<float>> points) : points_(std::move(points)) {}
433✔
15

16
    /**
17
     * @brief Construct a Line2D from an initializer list of Point2D<float>.
18
     *
19
     * @pre None.
20
     * @post The line contains the provided points in the same order.
21
     */
22
    Line2D(std::initializer_list<Point2D<float>> points) : points_(points) {}
63✔
23

24
    /**
25
     * @brief Construct a Line2D from a variable number of Point2D<float> arguments.
26
     *
27
     * Enables parenthesis initialization like: Line2D(p1, p2, p3).
28
     *
29
     * @pre None.
30
     * @post The line contains the provided points in the same order.
31
     */
32
    template <typename... P,
33
              typename = std::enable_if_t<(std::conjunction_v<std::is_same<std::decay_t<P>, Point2D<float>>...>)>>
34
    explicit Line2D(P&&... pts) : points_{static_cast<Point2D<float>>(std::forward<P>(pts))...} {}
35

36
    size_t size() const {
9,463✔
37
        return points_.size();
9,463✔
38
    }
39

40
    Point2D<float> front() const {
29✔
41
        return points_.front();
29✔
42
    }
43

44
    bool empty() const {
827✔
45
        return points_.empty();
827✔
46
    }
47

48
    void push_back(Point2D<float> const & point) {
3,354✔
49
        points_.push_back(point);
3,354✔
50
    }
3,354✔
51

52
    Point2D<float> back() const {
136✔
53
        return points_.back();
136✔
54
    }
55
    Point2D<float> operator[](size_t index) const {
13,961✔
56
        return points_[index];
13,961✔
57
    }
58

59
    std::vector<Point2D<float>>::iterator begin() {
×
60
        return points_.begin();
×
61
    }
62

UNCOV
63
    std::vector<Point2D<float>>::iterator end() {
×
UNCOV
64
        return points_.end();
×
65
    }
66
    std::vector<Point2D<float>>::const_iterator begin() const {
49✔
67
        return points_.begin();
49✔
68
    }
69
    std::vector<Point2D<float>>::const_iterator end() const {
49✔
70
        return points_.end();
49✔
71
    }
72

73
    void erase(std::vector<Point2D<float>>::iterator it) {
74
        points_.erase(it);
75
    }
76

UNCOV
77
    void erase(std::vector<Point2D<float>>::iterator first, std::vector<Point2D<float>>::iterator last) {
×
UNCOV
78
        points_.erase(first, last);
×
UNCOV
79
    }
×
80

81
private:
82
    std::vector<Point2D<float>> points_; 
83

84
};
85

86

87
Line2D create_line(std::vector<float> const & x, std::vector<float> const & y);
88

89

90
void smooth_line(Line2D & line);
91

92
std::vector<uint8_t> line_to_image(Line2D & line, int height, int width);
93

94

95

96
#endif// DATAMANAGER_LINES_HPP
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc