Changeset 4211
 Timestamp:
 07/21/08 10:56:25 (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/loci/slim/CurveCollection.java
r4210 r4211 59 59 * if numRows or numCols is not a power of two or numRows != numCols 60 60 */ 61 public CurveCollection(CurveFitter[][] c f) {62 int numRows = c f.length;63 int numCols = c f[0].length;61 public CurveCollection(CurveFitter[][] curveFitters) { 62 int numRows = curveFitters.length; 63 int numCols = curveFitters[0].length; 64 64 if (numRows != numCols) { 65 65 throw new IllegalArgumentException("Row and column counts do not match"); … … 71 71 } 72 72 curves = new CurveFitter[depth + 1][][]; 73 curves[0] = c f;73 curves[0] = curveFitters; 74 74 75 75 // compute subsamplings 76 for (int i=1; i<=depth; i++) { 77 curves[i] = null;//TODO 76 int res = numRows; 77 for (int d=1; d<=depth; d++) { 78 res /= 2; 79 curves[d] = new CurveFitter[res][res]; 80 for (int y=0; y<res; y++) { 81 for (int x=0; x<res; x++) { 82 CurveFitter cf = new GACurveFitter(); 83 /* 84 int[] data0 = curves[d1][2*y][2*x].getData(); 85 int[] data1 = curves[d1][2*y][2*x+1].getData(); 86 int[] data2 = curves[d1][2*y+1][2*x].getData(); 87 int[] data3 = curves[d1][2*y+1][2*x+1].getData(); 88 int[] data = new int[data0.length]; 89 for (int i=0; i<data.length; i++) { 90 data[i] = data0[i] + data1[i] + data2[i] + data3[i]; 91 } 92 cf.setData(data); 93 */ 94 curves[d][y][x] = cf; 95 } 96 } 78 97 } 79 98 }
Note: See TracChangeset
for help on using the changeset viewer.