+ eigenvector.tred();
+
+ sb.append(" ---Tridiag transform matrix ---\n");
+ sb.append(" --- D vector ---\n");
+ eigenvector.printD(ps, "%15.4e");
+ ps.println();
+ sb.append("--- E vector ---\n");
+ eigenvector.printE(ps, "%15.4e");
+ ps.println();
+
+ // Now produce the diagonalization matrix
+ eigenvector.tqli();
+ } catch (Exception q)
+ {
+ q.printStackTrace();
+ sb.append("\n*** Unexpected exception when performing PCA ***\n"
+ + q.getLocalizedMessage());
+ sb.append(
+ "*** Matrices below may not be fully diagonalised. ***\n");
+ }
+
+ sb.append(" --- New diagonalization matrix ---\n");
+ eigenvector.print(ps, "%8.2f");
+ sb.append(" --- Eigenvalues ---\n");
+ eigenvector.printD(ps, "%15.4e");
+ ps.println();
+
+ details = sb.toString();
+ }
+
+ /**
+ * Returns a PrintStream that wraps (appends its output to) the given
+ * StringBuilder
+ *
+ * @param sb
+ * @return
+ */
+ protected PrintStream wrapOutputBuffer(StringBuilder sb)
+ {