This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <fmt/core.h> | |
| #include <vector> | |
| using stream_t = std::vector<double>; | |
| using split_t = std::vector<stream_t>; | |
| auto deinterleave(stream_t framesstream, int nchannel){ | |
| auto nframe = framesstream.size(); | |
| split_t res(nchannel); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| template<typename T> | |
| auto convolve(std::vector<T> v1, std::vector<T> v2){ | |
| std::vector<T> res(v1.size() + v2.size() - 1); | |
| for(int i = 0; i < v1.size(); i++){ | |
| int j = i; | |
| for(const auto &ev2 : v2){ | |
| res[j++] += v1[i]*ev2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (() => { | |
| let radios = document.querySelectorAll('input[type=radio]'); | |
| for(let i = 0; i < radios.length; i++){ | |
| if(radios[i].getAttribute('value') == `${Math.floor(Math.random() * 2) + 4}`){ //randomly generate value 4-6 | |
| radios[i].checked = true; | |
| } | |
| } | |
| })() |
NewerOlder