Changeset 1569
- Timestamp:
- 06/18/14 16:35:36 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/substitution/TriangleMatrix.java
r1568 r1569 24 24 } 25 25 26 public void initialize(double value) { 27 for (int i=0; i < matrix.length; i++) { 28 matrix[i] = value; 29 } 30 } 26 31 27 32 28 29 //Note: String just looks good for small. testing matrices30 33 public String toString() { 31 34 String result = ""; … … 33 36 for(int j = 0; j< size; j++) { 34 37 if(i<j) { 35 result = result + String.format("%+4.1f",this.get(i,j)); 38 if(Double.isInfinite(this.get(i,j))) { 39 result = result + " -------"; 40 } 41 else { 42 result = result + String.format("%+8.2f",this.get(i,j)); 43 } 36 44 } 37 45 else { 38 result = result + (" ");46 result = result + (" "); 39 47 } 40 48 }
Note: See TracChangeset
for help on using the changeset viewer.