Created
May 5, 2019 08:18
-
-
Save sailist/b1c8d0c8b3a5b3fdfeeec860f0f132c0 to your computer and use it in GitHub Desktop.
Quick set value in the table
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
// 可视化网站 链接http://athena.ecs.csus.edu/~associationcw/FpGrowth.html | |
// 对于一些数据可能会出错误 | |
var align = [["A",1,], | |
["B",2,], | |
["C",3,], | |
["D",4,], | |
["E",5,], | |
["F",6,], | |
["G",7,], | |
["S",8,], | |
["K",9,], | |
]; | |
var amap = {}; | |
align.forEach(function(value,index,arr){ | |
amap[value[0]] = value[1]; | |
}); | |
var data = [["F","A","B",], | |
["D","F","B","C",], | |
["D","E","A","C",], | |
["D","E",], | |
["C","B","A",], | |
["D","A","G","B","C",], | |
["A","S",], | |
["C","A","B",], | |
["D","K","B","A",], | |
["B","E","C",]]; | |
//var data = [ | |
// ["A","C"], | |
// ["A"], | |
// ["B"], | |
// [""], | |
//] | |
var w = align.length+1; | |
var h = data.length; | |
//var ipts = $("#AlgorithmSpecificControls input"); | |
//ipts[0].value = align.length; | |
//ipts[1].value = h; | |
//ipts[2].click(); | |
var ipts = $("#AlgorithmSpecificControls input"); | |
//align.forEach(function(value,index,arr){ | |
// ipts[value[1]].value = value[0]; | |
//}); | |
data.forEach(function(line,li,arr){ | |
line.forEach(function(value,i,arr){ | |
ipts[w*(li+1)+amap[value]].value = 1; | |
}); | |
}); | |
var minsup = 3; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment