MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / main

Function main

cpp_package/examples/signal_processing/src/csp.cpp:13–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13int main (int argc, char *argv[])
14{
15 constexpr int n_ep = 2;
16 constexpr int n_ch = 2;
17 constexpr int n_times = 4;
18 constexpr int total_len = n_ep * n_ch * n_times;
19
20 double labels_array[n_ep] = {0, 1};
21 double data_array[total_len] = {6, 3, 1, 5, 3, 0, 5, 1, 1, 5, 6, 2, 5, 1, 2, 2};
22
23 BrainFlowArray<double, 1> labels (labels_array, n_ep);
24 BrainFlowArray<double, 3> data (data_array, n_ep, n_ch, n_times);
25 std::cout << data << std::endl;
26
27 std::pair<BrainFlowArray<double, 2>, BrainFlowArray<double, 1>> output =
28 DataFilter::get_csp (data, labels);
29
30 std::cout << output.first << std::endl;
31 std::cout << output.second << std::endl;
32}

Callers

nothing calls this directly

Calls 1

get_cspFunction · 0.50

Tested by

no test coverage detected