MCPcopy Create free account
hub / github.com/BirolLab/RNA-Bloom / readDoubleArrayFromFile

Method readDoubleArrayFromFile

src/rnabloom/util/FileUtils.java:125–135  ·  view source on GitHub ↗
(String path)

Source from the content-addressed store, hash-verified

123 }
124
125 public static double[] readDoubleArrayFromFile(String path) throws FileNotFoundException, IOException {
126 ArrayDeque<Double> tmpQueue = new ArrayDeque<>();
127 BufferedReader br = getTextFileReader(path);
128 for (String line; (line = br.readLine()) != null; ) {
129 tmpQueue.add(Double.parseDouble(line.trim()));
130 }
131
132 br.close();
133
134 return tmpQueue.stream().mapToDouble(i->i).toArray();
135 }
136
137 public static void writeIntArrayToFile(File f, int[] arr) throws IOException {
138 BufferedWriter fr = new BufferedWriter(new FileWriter(f, false));

Callers

nothing calls this directly

Calls 3

getTextFileReaderMethod · 0.95
addMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected