⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.java

📁 转载聚类源代码
💻 JAVA
字号:
/*
 * Main.java
 *
 * Created on 2007年5月28日, 下午10:37
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package cindy;

import java.util.*;

/**
 *
 * @author njchenyi
 */
public class Main {
    double tmp=0.0;
    int i;
    Vector v = new Vector();
    /** Creates a new instance of Main */
    public Main() {
        ReadFile rf=new ReadFile();
        //tmp=rf.calculateJ();
        while(tmp!=rf.calculateJ()){
            tmp=rf.calculateJ();
            rf.calculateP();
            System.out.println(i++ +"  "+tmp);
        }
        
        v=rf.getClusterVector();
        
        for(int j =0;j<v.size();j++){
            System.out.println();
            System.out.println("Cluster" + j);
            for(int k = 0; k<((Cluster)v.elementAt(j)).getSample().size();k++){
                System.out.print(((Sample)((Cluster)v.elementAt(j)).getSample().elementAt(k)).getIndex()+", ");
            }
        }
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        new Main();
    }
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -