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

paulmthompson / WhiskerToolbox / 17270491352

27 Aug 2025 02:57PM UTC coverage: 65.333%. Remained the same
17270491352

push

github

paulmthompson
Merge branch 'main' of https://github.com/paulmthompson/WhiskerToolbox

352 of 628 new or added lines in 92 files covered. (56.05%)

357 existing lines in 24 files now uncovered.

26429 of 40453 relevant lines covered (65.33%)

1119.34 hits per line

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

0.0
/src/DataManager/utils/armadillo_wrap/analog_armadillo.cpp
1

2
#include "analog_armadillo.hpp"
3

4
#include "AnalogTimeSeries/Analog_Time_Series.hpp"
5

6

7
arma::Row<double> convertAnalogTimeSeriesToMlpackArray(
×
8
        AnalogTimeSeries const * analogTimeSeries,
9
        std::vector<size_t> const & timestamps) {
10
    auto length = timestamps.size();
×
11
    arma::Row<double> result(length, arma::fill::zeros);
×
12

13
    auto const & data = analogTimeSeries->getAnalogTimeSeries();
×
14
    auto const & time = analogTimeSeries->getTimeSeries();
×
15

16
    for (std::size_t i = 0; i < length; ++i) {
×
NEW
17
        auto it = std::find(time.begin(), time.end(), TimeFrameIndex(static_cast<int64_t>(timestamps[i])));
×
18
        if (it != time.end()) {
×
NEW
19
            result[i] = data[static_cast<size_t>(std::distance(time.begin(), it))];
×
20
        } else {
21
            result[i] = arma::datum::nan;
×
22
        }
23
    }
24

25
    return result;
×
26
}
×
27

28
void updateAnalogTimeSeriesFromMlpackArray(
×
29
        arma::Row<double> const & array,
30
        std::vector<TimeFrameIndex> & timestamps,
31
        AnalogTimeSeries * analogTimeSeries) {
32

33
    std::vector<float> data(array.n_elem); // Does this actually write anything?
×
34
    analogTimeSeries->overwriteAtTimeIndexes(data, timestamps);
×
35
}
×
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