This file contains 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
var board = [ | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 'X', 'X', 'X', 'X', 'X', 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0 ] | |
]; |
This file contains 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
// compile with -std=c++11 | |
// | |
// @author jonbrennecke / https://github.com/jonbrennecke | |
#include <iostream> | |
#include <vector> | |
#include <regex> | |
#include <string> | |
/** |
This file contains 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
% Estimate the power spectra of a signal using Bartlett's Method, or, if parameter 'overlap' is specified, using Welch's Method. | |
% This method is based on the concept of using periodogram spectrum estimates, which are the result of converting a signal from the | |
% time domain to the frequency domain. | |
% | |
% @see Bartlett, M.S. (1948). "Smoothing Periodograms from Time-Series with Continuous Spectra". Nature 161: 686–687. | |
% @see Welch, P.D. (1967) "The Use of Fast Fourier Transform for the Estimation of Power Spectra: A Method Based on | |
% Time Averaging Over Short, Modified Periodograms", IEEE Transactions on Audio Electroacoustics, AU-15, 70–73. | |
% | |
% @link http://en.wikipedia.org/wiki/Bartlett%27s_method | |
% @link http://en.wikipedia.org/wiki/Welch_method |
NewerOlder