generatePDF(8,1);
//generatePDF(3,2);
}
private static void generatePDF(int all, int missed) throws IOException {
Matrix matrix = Newton.generateMatrix(all,missed);
Matrix allMatrix = new Matrix(all, all);
for (int basisVector = 0; basisVector < matrix.getRowDimension(); basisVector++) {
for (int carrier = 0; carrier < matrix.getColumnDimension(); carrier++) {
allMatrix.set(basisVector, carrier, matrix.get(basisVector, carrier));
}
}
double[] weightings = Utils.createWeightings(all);
for (int basisVector = matrix.getRowDimension(); basisVector < allMatrix.getRowDimension(); basisVector++) {
for (int carrier = 0; carrier < allMatrix.getColumnDimension(); carrier++) {
allMatrix.set(basisVector, carrier, Math.pow(carrier - ((all-1)/2d), basisVector)*weightings[carrier]);
}
}
Utils.makeOrthoGramSchmidt(allMatrix);
Matrix droppedMatrix = new Matrix(missed, all);
for (int basisVector = matrix.getRowDimension(); basisVector < allMatrix.getRowDimension(); basisVector++) {
for (int carrier = 0; carrier < allMatrix.getColumnDimension(); carrier++) {
droppedMatrix.set(basisVector-matrix.getRowDimension(), carrier, allMatrix.get(basisVector, carrier));
}
}
PdfGenerator.createCombinedPDF(
"html/pdf/Polynomial_" + all + "used_" + missed + "dropped_DroppedDimComp.pdf",