提交 37afe956 编写于 作者: J Jason Park

shorten the name of functino createRandomData to random

上级 5aead9c6
......@@ -6,8 +6,8 @@ Array1DTracer.prototype = Object.create(Array2DTracer.prototype);
Array1DTracer.prototype.constructor = Array1DTracer;
var Array1D = {
createRandomData: function (N, min, max) {
return Array2D.createRandomData(1, N, min, max)[0];
random: function (N, min, max) {
return Array2D.random(1, N, min, max)[0];
}
};
......
......@@ -26,7 +26,7 @@ Array2DTracer.prototype.clear = function () {
};
var Array2D = {
createRandomData: function (N, M, min, max) {
random: function (N, M, min, max) {
if (!N) N = 10;
if (!M) M = 10;
if (min === undefined) min = 1;
......
......@@ -26,7 +26,7 @@ GraphTracer.prototype.clear = function () {
};
var Graph = {
createRandomData: function (N, ratio) {
random: function (N, ratio) {
if (!N) N = 5;
if (!ratio) ratio = .3;
var G = [];
......
......@@ -17,7 +17,7 @@ WeightedGraphTracer.prototype.clear = function () {
};
var WeightedGraph = {
createRandomData: function (N, ratio, min, max) {
random: function (N, ratio, min, max) {
if (!N) N = 5;
if (!ratio) ratio = .3;
if (!min) min = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册