📄 matrixvectorwriter.java
字号:
*/ public void printCoordinate(int[] row, int[] column, double[] data, int offset) { int size = row.length; if (size != column.length || size != data.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) format("%10d %10d % .12e\n", row[i] + offset, column[i] + offset, data[i]); } /** * Prints the coordinate format to the underlying stream. One index and * entry on each line. The offset is added to each index, typically, this * can transform from a 0-based indicing to a 1-based. The first float array * specifies the real entries, and the second is the imaginary entries */ public void printCoordinate(int[] index, float[] dataR, float[] dataI, int offset) { int size = index.length; if (size != dataR.length || size != dataI.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) format("%10d % .12e % .12e\n", index[i] + offset, dataR[i], dataI[i]); } /** * Prints the coordinate format to the underlying stream. One index and * entry on each line. The offset is added to each index, typically, this * can transform from a 0-based indicing to a 1-based. The first double * array specifies the real entries, and the second is the imaginary entries */ public void printCoordinate(int[] index, double[] dataR, double[] dataI, int offset) { int size = index.length; if (size != dataR.length || size != dataI.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) format("%10d % .12e % .12e\n", index[i] + offset, dataR[i], dataI[i]); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line. The offset is added to each index, typically, this * can transform from a 0-based indicing to a 1-based. The first float array * specifies the real entries, and the second is the imaginary entries */ public void printCoordinate(int[] row, int[] column, float[] dataR, float[] dataI, int offset) { int size = row.length; if (size != column.length || size != dataR.length || size != dataI.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) format("%10d %10d % .12e % .12e\n", row[i] + offset, column[i] + offset, dataR[i], dataI[i]); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line. The offset is added to each index, typically, this * can transform from a 0-based indicing to a 1-based. The first double * array specifies the real entries, and the second is the imaginary entries */ public void printCoordinate(int[] row, int[] column, double[] dataR, double[] dataI, int offset) { int size = row.length; if (size != column.length || size != dataR.length || size != dataI.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) format("%10d %10d % .12e % .12e\n", row[i] + offset, column[i] + offset, dataR[i], dataI[i]); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line. The offset is added to each index, typically, this * can transform from a 0-based indicing to a 1-based. */ public void printCoordinate(int[] row, int[] column, int[] data, int offset) { int size = row.length; if (size != column.length || size != data.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) format("%10d %10d %19d\n", row[i] + offset, column[i] + offset, data[i]); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line. The offset is added to each index, typically, this * can transform from a 0-based indicing to a 1-based. */ public void printCoordinate(int[] row, int[] column, long[] data, int offset) { int size = row.length; if (size != column.length || size != data.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) format("%10d %10d %19d\n", row[i] + offset, column[i] + offset, data[i]); } /** * Prints the coordinates to the underlying stream. One index pair on each * line. The offset is added to each index, typically, this can transform * from a 0-based indicing to a 1-based. */ public void printPattern(int[] row, int[] column, int offset) { int size = row.length; if (size != column.length) throw new IllegalArgumentException( "All arrays must be of the same size"); for (int i = 0; i < size; ++i) format("%10d %10d\n", row[i] + offset, column[i] + offset); } /** * Prints the coordinates to the underlying stream. One index on each line. * The offset is added to each index, typically, this can transform from a * 0-based indicing to a 1-based. */ public void printPattern(int[] index, int offset) { int size = index.length; for (int i = 0; i < size; ++i) format("%10d\n", index[i] + offset); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line */ public void printCoordinate(int[] row, int[] column, float[] data) { printCoordinate(row, column, data, 0); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line */ public void printCoordinate(int[] row, int[] column, double[] data) { printCoordinate(row, column, data, 0); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line. The first double array specifies the real entries, * and the second is the imaginary entries */ public void printCoordinate(int[] row, int[] column, float[] dataR, float[] dataI) { printCoordinate(row, column, dataR, dataI, 0); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line. The first double array specifies the real entries, * and the second is the imaginary entries */ public void printCoordinate(int[] row, int[] column, double[] dataR, double[] dataI) { printCoordinate(row, column, dataR, dataI, 0); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line */ public void printCoordinate(int[] row, int[] column, int[] data) { printCoordinate(row, column, data, 0); } /** * Prints the coordinate format to the underlying stream. One index pair and * entry on each line */ public void printCoordinate(int[] row, int[] column, long[] data) { printCoordinate(row, column, data, 0); } /** * Prints the coordinates to the underlying stream. One index pair on each * line */ public void printPattern(int[] row, int[] column) { printPattern(row, column, 0); } /** * Prints the coordinate format to the underlying stream. One index and * entry on each line */ public void printCoordinate(int[] index, float[] data) { printCoordinate(index, data, 0); } /** * Prints the coordinate format to the underlying stream. One index and * entry on each line */ public void printCoordinate(int[] index, double[] data) { printCoordinate(index, data, 0); } /** * Prints the coordinate format to the underlying stream. One index and * entry on each line. The first double array specifies the real entries, * and the second is the imaginary entries */ public void printCoordinate(int[] index, float[] dataR, float[] dataI) { printCoordinate(index, dataR, dataI, 0); } /** * Prints the coordinate format to the underlying stream. One index and * entry on each line. The first double array specifies the real entries, * and the second is the imaginary entries */ public void printCoordinate(int[] index, double[] dataR, double[] dataI) { printCoordinate(index, dataR, dataI, 0); } /** * Prints the coordinate format to the underlying stream. One index and * entry on each line */ public void printCoordinate(int[] index, int[] data) { printCoordinate(index, data, 0); } /** * Prints the coordinate format to the underlying stream. One index and * entry on each line */ public void printCoordinate(int[] index, long[] data) { printCoordinate(index, data, 0); } /** * Prints the coordinates to the underlying stream. One index on each line */ public void printPattern(int[] index) { printPattern(index, 0); } /** * Prints all the comments. Prepends a '%' and appends a newline to every * comment */ public void printComments(String[] comments) { for (String comment : comments) println("%" + comment); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -