亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? totalsupporttree.java

?? apriori algorithm using datasets implementation
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
				
	// Return confidence
	double confidenceForAR = ((double) support/supportForAntecedent)*10000;
	int tempConf = (int) confidenceForAR;
	confidenceForAR = (double) tempConf/100;
	return(confidenceForAR); 
	}

    /* GET CURRENT RULE LIST OBJECT */	   	

    /** Gets the current instance of the RuleList class.
    @return the current RuleList object. */

    public RuleList getCurrentRuleListObject() {
        return(currentRlist);
	} 
			
    /*----------------------------------------------------------------------- */
    /*                                                                        */
    /*                              UTILITY METHODS                           */
    /*                                                                        */
    /*----------------------------------------------------------------------- */
    
    /* SET NUMBER ONE ITEM SETS */
    
    /** Sets the number of one item sets field (<TT>numOneItemSets</TT> to 
    the number of supported one item sets. */
    
    public void setNumOneItemSets() {
        numOneItemSets=getNumSupOneItemSets();
	}
		 	
    /*----------------------------------------------------------------------- */
    /*                                                                        */
    /*                              OUTPUT METHODS                            */
    /*                                                                        */
    /*----------------------------------------------------------------------- */
  
    /* Nine output options:
    
    (1)  Output T-tree
    (2)  Output frequent sets 
    (3)  Output number of frequent sets
    (4)  Output number of updates and nodes created
    (5)  Output T-tree storage  */
    
    /* ---------------- */
    /* 1. OUTPUT T-TRRE */
    /* ---------------- */
    /** Commences process of outputting T-tree structure contents to screen. */	
    public void outputTtree() {
	int number = 1;
	
	// Loop
	
	for (int index=1; index < startTtreeRef.length; index++) {
	    if (startTtreeRef[index] !=null) {
	        System.out.print("[" + number + "] {" + index);
	        System.out.println("} = " + startTtreeRef[index].support);
	        outputTtree(new Integer(number).toString(),
			new Integer(index).toString(),
			startTtreeRef[index].childRef);
		number++;
		}
	    }   
	}
	
    /** Continue process of outputting T-tree. <P> Operates in a recursive 
    manner.
    @param number the ID number of a particular node.
    @param itemSetSofar the label for a T-tree node as generated sofar.
    @param linkRef the reference to the current array level in the T-tree. */
    
    private void outputTtree(String number, String itemSetSofar,
    				TtreeNode[] linkRef) {
	// Set output local variables.
	int num=1;
	number = number + ".";
	itemSetSofar = itemSetSofar + " ";
	
	// Check for empty branch/sub-branch.
	if (linkRef == null) return;
	
	// Loop through current level of branch/sub-branch.
	for (int index=1;index<linkRef.length;index++) {
	    if (linkRef[index] != null) {
	        System.out.print("[" + number + num + "] {" + itemSetSofar +
	    		index);
	        System.out.println("} = " + linkRef[index].support);
	        String newitemSet = itemSetSofar + 
						new Integer(index).toString();
	        outputTtree(number + num,newitemSet,linkRef[index].childRef); 
	        num++;
		}
	    }    
	}	

    /* ----------------------- */
    /* 2. OUTPUT T-TREE BRANCH */
    /* ----------------------- */
    /** Commences process of outputting contents of a given T-tree branch to
    screen.
    @param linkRef the reference to the start of the branch*/	
    
    /*public void outputTtreeBranch(TtreeNode[] linkRef) {
	int number = 1;
	
	// Check for empty tree
	
	if (linkRef == null) return;
	
	// Loop
	
	for (int index=1; index<linkRef.length; index++) {
	    if (linkRef[index] !=null) {
	        System.out.print("[" + number + "] {" + index);
	        System.out.println("} = " + linkRef[index].support);
	        outputTtree(new Integer(number).toString(),
			new Integer(index).toString(),linkRef[index].childRef);
		number++;
		}
	    }   
	}*/
    
    /* ----------------------- */ 	
    /* 3. OUTPUT FREQUENT SETS */
    /* ----------------------- */
    /** Commences the process of outputting the frequent sets contained in 
    the T-tree. */	
    
    public void outputFrequentSets() {
	int number = 1;
	
	System.out.println("FREQUENT (LARGE) ITEM SETS:\n" +
	                    	"---------------------------");
	
	// Loop
	
	for (int index=1; index <= numOneItemSets; index++) {
	    if (startTtreeRef[index] !=null) {
	        if (startTtreeRef[index].support >= minSupport) {
	            System.out.println("[" + number + "] {" + index + "} = " + 
		    				startTtreeRef[index].support);
	            number = outputFrequentSets(number+1,
		    			new Integer(index).toString(),
		    			index,startTtreeRef[index].childRef);
		    }
		}
	    }   
	
	// End
	
	System.out.println("\n");
	}

    /** Outputs T-tree frequent sets. <P> Operates in a recursive manner.
    @param number the number of frequent sets so far.
    @param itemSetSofar the label for a T-treenode as generated sofar.
    @param size the length/size of the current array level in the T-tree.
    @param linkRef the reference to the current array level in the T-tree. 
    @return the incremented (possibly) number the number of frequent sets so 
    far. */
    
    private int outputFrequentSets(int number, String itemSetSofar, int size,
    							TtreeNode[] linkRef) {
	
	// No more nodes
	
	if (linkRef == null) return(number);
	
	// Otherwise process
	
	itemSetSofar = itemSetSofar + " ";
	for (int index=1; index < size; index++) {
	    if (linkRef[index] != null) {
	        if (linkRef[index].support >= minSupport) {
	            System.out.println("[" + number + "] {" + itemSetSofar + 
		    		index +"} = " + linkRef[index].support);
	            String newitemSet = itemSetSofar + 
		    			new Integer(index).toString();
	            number = outputFrequentSets(number + 1,newitemSet,index,
		    			linkRef[index].childRef); 
	            }
		}
	    }   
	
	// Return
	
	return(number);
	}
    
	
    /* ------------------------------ */
    /* 4. OUTPUT NUMBER FREQUENT SETS */
    /* ------------------------------ */
    /** Commences the process of counting and outputing number of supported 
    nodes in the T-tree.<P> A supported set is assumed to be a non null node in
    the T-tree. */

    public void outputNumFreqSets() {
	
	// If empty tree (i.e. no supported sets) do nothing
	if (startTtreeRef== null) System.out.println("Number of frequent " +
					"sets = 0");
	// Otherwise count and output
	else System.out.println("Number of frequent sets = " + 
					countNumFreqSets());
	}
    
    /* COUNT NUMBER OF FRQUENT SETS */
    /** Commences process of counting the number of frequent (large/supported
    sets contained in the T-tree. */
    
    protected int countNumFreqSets() {
        // If empty tree return 0
	if (startTtreeRef ==  null) return(0);
	
	// Otherwise loop through T-tree starting with top level
	int num=0;
	for (int index=1; index <= numOneItemSets; index++) {
	    // Check for null valued top level Ttree node.
	    if (startTtreeRef[index] !=null) {
	        if (startTtreeRef[index].support >= minSupport) 
			num = countNumFreqSets(index,
	    				startTtreeRef[index].childRef,num+1);
		}
	    }   
	
	// Return
	return(num);
	}
	
    /** Counts the number of supported nodes in a sub branch of the T-tree.
    @param size the length/size of the current array level in the T-tree.
    @param linkRef the reference to the current array level in the T-tree.
    @param num the number of frequent sets sofar. */

    protected int countNumFreqSets(int size, TtreeNode[] linkRef, int num) {
	
	if (linkRef == null) return(num);
	
	for (int index=1; index < size; index++) {
	    if (linkRef[index] != null) {
	        if (linkRef[index].support >= minSupport) 
	            			num = countNumFreqSets(index,
					linkRef[index].childRef,num+1);
		}
	    }
	
	// Return
	
	return(num);
	}
    
    /* --------------------------------------------------- */
    /* 5. OUTPUT NUMBER OF FREQUENT SETS PER T-TREE BRANCH */
    /* --------------------------------------------------- */
    /** Outputs the number of supported sets per T-tree branch descending from 
    the top-level of the tree. <P> Used for diagnostic purposes. */
    
    /*public void outputNumFreqSetsPerBranch() { 
	
	System.out.println("Number of frequent sets per branch");

	
	for (int index=1; index <= numOneItemSets; index++) {
	    if (startTtreeRef[index] !=null) {
	        System.out.println("(" + index + ")" + countNumFreqSets(index,
					startTtreeRef[index].childRef,1));
		}	   
	    }
	}*/
	
    /* --------------------------- */
    /* 6. OUTPUT T-TREE STATISTICS */
    /* --------------------------- */
    /** Commences the process of outputting T-tree statistics (for diagnostic
    purposes): (a) Storage, (b) Number of nodes on P-tree, (c) number of
    partial support increments (updates) and (d) generation time. */
    
    /*public void outputTtreeStats() {
        System.out.println("T-TREE STATISTICS\n-----------------");	
	System.out.println(calculateStorage() + " (Bytes) storage");
	System.out.println(TtreeNode.getNumberOfNodes() + " nodes");
	System.out.println(countNumFreqSets() + " frequent sets");
	System.out.println(numUpdates + " support value increments");
	System.out.println(duration);
	}*/
	
    /* --------------------------- */
    /* 7. OUTPUT NUMBER OF UPDATES */
    /* --------------------------- */
    /** Commences the process of determining and outputting the storage
    requirements (in bytes) for the T-tree */
    /** Outputs the number of update and number of nodes created during the
    generation of the T-tree (the later is not the same as the number of 
    supported nodes). */
    
    public void outputNumUpdates() {
	System.out.println("Number of Nodes created = " + 
			TtreeNode.getNumberOfNodes());
	System.out.println("Number of Updates       = " + numUpdates);
	} 
		
    /* ----------------- */
    /* 8. OUTPUT STORAGE */
    /* ----------------- */
    /** Commences the process of determining and outputting the storage
    requirements (in bytes) for the T-tree. <P> Example: Given ---
    <PRE>
        	{1,2,3} 
    		{1,2,3}
		{1,2,3}
    		{1,2,3}
		{1,2,3}
    </PRE>
    This will produce a T-tree as shown below:	
    <PRE>
    +---+---+---+---+ 		
    | 0 | 1 | 2 | 3 |	
    +---+---+---+---+
          |   |   |
	  |   |   +-----------+
	  |   |               |
	  |   +---+         +---+---+---+    
          |       |         | 0 | 1 | 2 |
	( 5 )   +---+---+   +---+---+---+
	(nul)   | 0 | 1 |         |   |
	        +---+---+         |   +----+
		      |           |        |
		      |           |      +---+---+
		    ( 5 )         |      | 0 + 1 |
		    (nul)       ( 5 )    +---+---+
	                        (nul)          |
				               |
					     ( 5 )
					     (nul)    
    </PRE>					     
    0 elements require 4 bytes of storage, null nodes (not shown above) 4 bytes 
    of storage, others 12 bytes of storage.			*/
    
    public void outputStorage() {
	
	// If empty tree (i.e. no supported sets) do nothing
	if (startTtreeRef ==  null) return;
		
	/* Otherwise calculate storage */
	System.out.println("T-tree Storage          = " + calculateStorage() + 
			" (Bytes)");
	} 	
   
    /* CALCULATE STORAGE */
    /** Commences process of calculating storage requirements for  T-tree. */
    
    protected int calculateStorage() {
        // If emtpy tree (i.e. no supported sets) return 0
	if (startTtreeRef ==  null) return(0);
		
	/* Step through top level */	
	int storage = 4;	// For element 0
	for (int index=1; index <= numOneItemSets; index++) {
	    if (startTtreeRef[index] !=null) storage = storage + 12 + 
	    		calculateStorage(0,startTtreeRef[index].childRef);
	    else storage = storage+4;
	    }
	// Return
	return(storage);
	}
        
    /** Calculate storage requirements for a sub-branch of the T-tree.
    @param localStorage the storage as calculated sofar (set to 0 at start).
    @param linkRef the reference to the current sub-branch of the T-tree. */
    
    private int calculateStorage(int localStorage, TtreeNode[] linkRef) {
	
	if (linkRef == null) return(0);
	
	for (int index=1; index < linkRef.length; index++) {
	    if (linkRef[index] !=null) localStorage = localStorage + 12 + 
	    		calculateStorage(0,linkRef[index].childRef);
	    else localStorage = localStorage + 4;
	    }   
         
	 /* Return */
	 
	 return(localStorage+4);	// For element 0
	 }
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品中文字幕一区| a在线欧美一区| 欧美日韩一卡二卡| 亚洲精品福利视频网站| 99免费精品在线| 国产精品欧美精品| 成人高清伦理免费影院在线观看| 久久看人人爽人人| 国产福利精品导航| 亚洲国产精品二十页| 成人免费毛片片v| 中文字幕一区二区日韩精品绯色| 成人午夜电影小说| 亚洲天堂免费在线观看视频| 9色porny自拍视频一区二区| 国产精品伦理一区二区| 在线免费观看一区| 丝袜诱惑亚洲看片| 色综合色狠狠天天综合色| 一区二区三区精品在线| 欧美日韩免费在线视频| 亚洲欧美一区二区三区极速播放| av在线播放成人| 亚洲一二三区不卡| 欧美欧美午夜aⅴ在线观看| 日韩av一区二| 国产欧美综合在线观看第十页| 99精品桃花视频在线观看| 洋洋av久久久久久久一区| 欧美精品粉嫩高潮一区二区| 国产麻豆成人传媒免费观看| 91论坛在线播放| 综合欧美亚洲日本| 91九色最新地址| 三级久久三级久久久| 日韩一级片网站| 天天操天天色综合| www精品美女久久久tv| 成人开心网精品视频| 亚洲另类春色国产| 日韩美女视频一区二区在线观看| 精品一区二区三区影院在线午夜| 久久亚洲欧美国产精品乐播 | 99精品欧美一区二区三区综合在线| 日韩女优视频免费观看| 成人在线视频首页| 性感美女久久精品| 国产日韩欧美在线一区| 日韩一区二区免费高清| 国产91在线观看丝袜| 亚洲国产成人tv| 国产精品色婷婷| 欧美性大战久久| 麻豆久久一区二区| 一区二区视频免费在线观看| 777奇米成人网| 91玉足脚交白嫩脚丫在线播放| 欧美96一区二区免费视频| 国产精品福利av | 日韩欧美电影一二三| 国产自产视频一区二区三区| 一区二区三区四区高清精品免费观看| 亚洲精品在线一区二区| 欧美色视频在线| 99综合影院在线| 国产在线不卡一区| 日韩中文字幕av电影| 亚洲色图一区二区三区| 欧美一级一区二区| www.爱久久.com| 国产麻豆视频一区| 久久国产三级精品| 日韩电影在线免费| 亚洲制服欧美中文字幕中文字幕| 国产日韩av一区| 久久综合av免费| 欧美成人一区二区三区片免费| 欧美日韩精品一区二区三区蜜桃| 一本色道亚洲精品aⅴ| 国内久久婷婷综合| 蓝色福利精品导航| 蜜桃视频在线观看一区| 偷窥少妇高潮呻吟av久久免费| 日韩一级免费观看| 国产盗摄视频一区二区三区| 免费看日韩精品| 午夜欧美视频在线观看| 亚洲香蕉伊在人在线观| 亚洲美女少妇撒尿| 亚洲精品久久久蜜桃| 国产精品久久久久久久久久免费看| 精品久久久久99| 精品国产91洋老外米糕| 久久综合九色综合欧美就去吻| 欧美一级黄色大片| 精品少妇一区二区| 久久久久国产精品麻豆| 3d动漫精品啪啪1区2区免费| 4438成人网| 欧美最新大片在线看 | 国产精品一区二区无线| 日韩在线播放一区二区| 久久国产麻豆精品| 理论片日本一区| 波多野结衣的一区二区三区| 免费人成黄页网站在线一区二区| 一区二区三区在线观看网站| 精品国产伦一区二区三区免费| 日韩欧美一区中文| 91精品国产高清一区二区三区蜜臀 | 国产91丝袜在线播放0| 国产成人av影院| 久久国产精品色婷婷| 乱一区二区av| 国产精品妹子av| 亚洲欧美国产三级| 麻豆91免费看| 欧美精品丝袜中出| 久久久亚洲午夜电影| 国产日韩欧美一区二区三区乱码 | 日本精品裸体写真集在线观看| 色综合天天综合网天天狠天天| 在线日韩av片| 国产午夜三级一区二区三| 国产精品电影院| 日日摸夜夜添夜夜添亚洲女人| 99亚偷拍自图区亚洲| 国产丝袜欧美中文另类| 国产真实乱子伦精品视频| 91亚洲精品久久久蜜桃| 日韩三级视频在线看| 一区二区三区色| 看电视剧不卡顿的网站| 懂色av中文一区二区三区| 欧美一区二区三区在线| 亚洲日本丝袜连裤袜办公室| 亚洲图片激情小说| av电影一区二区| 26uuu成人网一区二区三区| 一区二区三区在线高清| 奇米亚洲午夜久久精品| 色综合久久中文字幕| 9191成人精品久久| 中文字幕在线不卡视频| 国产一区二区不卡| 欧美日韩国产天堂| 亚洲精品写真福利| 久国产精品韩国三级视频| 欧美精品一卡两卡| 国产高清不卡一区| 中文字幕一区二区三区蜜月| 欧洲在线/亚洲| 日本麻豆一区二区三区视频| 欧美一区二区三区播放老司机| 亚洲精品国产无天堂网2021| 7777精品伊人久久久大香线蕉完整版| 国产剧情在线观看一区二区| 图片区小说区国产精品视频| 日韩亚洲欧美一区二区三区| 国产91在线观看丝袜| 中文字幕av免费专区久久| 久久精品国产免费| 欧美午夜宅男影院| 激情丁香综合五月| 日本视频免费一区| 一区二区免费在线播放| 中文字幕亚洲在| 欧美主播一区二区三区| 亚洲日本青草视频在线怡红院 | 国产亚洲精品7777| 久久av资源网| 精品福利一区二区三区免费视频| 日日摸夜夜添夜夜添国产精品| 欧美主播一区二区三区美女| 亚洲电影一级黄| 欧美一区二区性放荡片| 麻豆国产欧美日韩综合精品二区 | 国产一区二区三区日韩| 久久久久久久久久久久电影| 国产一区二区三区四| 国产精品久久久久影院色老大| 成人爱爱电影网址| 一区二区欧美在线观看| 欧美精品 日韩| 蜜臀久久久99精品久久久久久| 亚洲精品一区二区三区精华液| 久久国产麻豆精品| 国产精品乱码一区二区三区软件| 91亚洲永久精品| 国产精品三级电影| 激情综合亚洲精品| 亚洲国产精品成人综合| 99v久久综合狠狠综合久久| 国产精品美女一区二区| 91精品国产高清一区二区三区蜜臀 | av网站免费线看精品| 成人av资源在线| 国产99精品国产| 在线免费观看日本欧美| 不卡的av中国片|