Changeset 8284 for trunk/greenstone3-extensions/vishnu
- Timestamp:
- 2004-10-12T11:31:49+13:00 (20 years ago)
- Location:
- trunk/greenstone3-extensions/vishnu/src/vishnu/testvis
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/greenstone3-extensions/vishnu/src/vishnu/testvis/dendro/Clustering.java
r8189 r8284 34 34 35 35 36 public Clustering (DataManager dm, int linkage, int [][]m,36 public Clustering (DataManager dm, int linkage, float [][]m, 37 37 int num_of_vectors, 38 38 int arraySize, int min_c_items, … … 53 53 54 54 double[] heights; 55 double [][] vectors = intToDoubleMatrix(m);55 double [][] vectors = floatToDoubleMatrix(m);//intToDoubleMatrix(m); 56 56 //int [] coding = new int[m.length]; 57 57 … … 214 214 return res; 215 215 } 216 static double[][] floatToDoubleMatrix(float [][] m) 217 { 218 int h=m.length; 219 double [][] res = null; 220 if (h > 0) 221 { 222 int w = m[0].length; 223 res = new double[h][w]; 224 for(int c=0;c<h;c++) 225 for(int d = 0; d<w; d++) 226 res[c][d]=(double)m[c][d]; 227 } 228 return res; 229 } 216 230 217 231 -
trunk/greenstone3-extensions/vishnu/src/vishnu/testvis/dendro/TreePanel.java
r8189 r8284 375 375 } 376 376 377 int [][] full = m.getExpanded();378 377 //int [][] full = m.getExpanded(); 378 float [][] full = m.getExpanded(); 379 379 // the number of new clusters generated is either 20 380 380 // or if there are not many docs half the #docs … … 385 385 386 386 Clustering clustering = new Clustering(dataManager,Clustering.COMPLETE_LINKAGE, 387 388 389 387 full,m.getRowCount(), 388 m.getColumnCount(),1, 389 clusterNum,limit); 390 390 391 391 root = clustering.getRoot(); -
trunk/greenstone3-extensions/vishnu/src/vishnu/testvis/object/DataManager.java
r8189 r8284 10 10 11 11 import vishnu.testvis.sammon.*; 12 import vishnu. sammon.Sammon;12 import vishnu.util.Sammon; 13 13 import vishnu.cluster.Clustering; 14 14 import vishnu.testvis.browser.*; … … 496 496 } 497 497 498 int [][] full = m.getExpanded();498 float [][] full = m.getExpanded(); 499 499 500 500 // the number of new clusters generated is either 20 … … 507 507 508 508 Clustering clustering = new Clustering(Clustering.COMPLETE_LINKAGE, 509 full,m.getRowCount(),510 m.getColumnCount(),1,511 509 full,/*m.getRowCount(), 510 m.getColumnCount(),*/1, 511 clusterNum,limit); 512 512 513 Vector [] clusters = clustering.get TheResults();514 double [][] centroids= clustering.get TheCentroids();513 Vector [] clusters = clustering.getClusters(); 514 double [][] centroids= clustering.getCentroids(); 515 515 516 516 Sammon map = new Sammon(centroids); -
trunk/greenstone3-extensions/vishnu/src/vishnu/testvis/object/DocObj.java
r8189 r8284 43 43 return _weights; 44 44 } 45 public int getWeights(int i)45 public float getWeights(int i) 46 46 { 47 47 SparseNode test = _weights; -
trunk/greenstone3-extensions/vishnu/src/vishnu/testvis/object/GSDLEngine.java
r8189 r8284 6 6 import vishnu.testvis.visual.*; 7 7 import vishnu.server.Packaging; 8 import vishnu. server.XMLUtil;8 import vishnu.util.XMLUtil; 9 9 10 10 import org.w3c.dom.Element; -
trunk/greenstone3-extensions/vishnu/src/vishnu/testvis/visual/CvManyPoints.java
r8189 r8284 99 99 protected MapKeyWords mapping; 100 100 /** A two dimensional array of integers used for clustering */ 101 protected int [][] fullMatrix; 101 //protected int [][] fullMatrix; 102 protected float [][] fullMatrix; 102 103 /** array of data to draw target */ 103 104 protected int circles[][] = new int[maxCircleCount][4]; -
trunk/greenstone3-extensions/vishnu/src/vishnu/testvis/visual/HitCluster.java
r8189 r8284 13 13 static final int EMPTYARRAY[] = {}; 14 14 static int matrix[][]; 15 static int data[][]; 15 // static int data[][]; 16 static float data [][]; 16 17 static int clusters[][]; 17 18 static int keywords[]; … … 106 107 } 107 108 108 static int[] maximunDistance ( int[][] newData, int[] newKeywords, int documentCount)109 static int[] maximunDistance (float[][] newData, int[] newKeywords, int documentCount) 109 110 { 110 111 data = newData;
Note:
See TracChangeset
for help on using the changeset viewer.