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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>audio test</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script> | |
$(document).ready(function () { | |
$("#puyon1Button").click(function () { |
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
/* | |
* tbbTest.cpp | |
* | |
* Created on: 2014/11/05 | |
* Author: sase | |
*/ | |
#include <iostream> | |
#include <math.h> | |
#include <sys/time.h> |
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
/* | |
* main.cu | |
* | |
* Created on: 2014/11/05 | |
* Author: sase | |
*/ | |
/* | |
* tbbTest.cpp |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<title>logistic</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
var canvas = document.getElementById('myCanvas'); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<title>logistic</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { |
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
#include <iostream> | |
#include <fstream> | |
#include <list> | |
#include <math.h> | |
#define N 2000 | |
#define PI 3.141592 | |
using namespace std; |
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
// jacobi法による実対称行列の対角化 | |
// numeric.jsが必要 | |
// 他の関数との依存性排除ver | |
// size: 行列サイズ | |
// intputA: 対角化される入力行列 ※対称行列でなければならない | |
// 返り値 {DiagonalMatrix:A, OrthodonalMatrix:P}; | |
// A(入力時) = P A(対角化後) P.transpose が成り立つ | |
function jacobiDiagonalization(size, inputA, maxIteration, threshold) { | |
var A=numeric.clone(inputA); |
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
// numeric.jsを使用 | |
// データ点を配列で渡す 例: points = [[x0,y0],[x1,y1],[x2,y2],[x3,y3]]; | |
// y=c[0]*x+c[1] で近似し係数cを配列で返す | |
function leastSquare(points) { | |
var A=numeric.rep([2, 2], 0); | |
var b=numeric.rep([2], 0); | |
for(var i=0; i<points.length; ++i) { | |
A[0][0]+=points[i][0]*points[i][0]; | |
A[0][1]+=points[i][0]; | |
A[1][0]+=points[i][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
// numeric.jsを使用 | |
// データ点を配列で渡す 例: points = [[x0,y0],[x1,y1],[x2,y2],[x3,y3]]; | |
// 多項式の係数を配列で返す | |
// dim=2 -> 直線 | |
// dim=3 -> 二次曲線 | |
function leastSquareN(points, dim) { | |
if(points.length<dim) { | |
return numeric.rep([dim], 0); | |
} | |
var A=numeric.rep([dim, dim], 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
// ラグランジュ補間(と等価な多項式補間) | |
// 入力 N個の点列 points = [[x0,y0],[x1,x2],...,[xn-1,yn-1]] | |
// 出力 多項式の係数配列c | |
// y = c[0]*x^N-1 + c[1]*x^N-2 + ... + c[N-2]*x + c[N-1] | |
function lagrangeInterpolation(points) { | |
var dim=points.length; | |
var A=numeric.rep([dim, dim], 0); | |
var b=numeric.rep([dim], 0); | |
for(var i=0; i<dim; ++i) { | |
for(var j=0; j<dim; ++j) { |
OlderNewer