Package io.github.andreipunko.util
Class FileUtil
java.lang.Object
io.github.andreipunko.util.FileUtil
Util to serialize data into files
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidSave matrix into filestatic voidSave function y(x) on given interval into filestatic voidsaveFunc(Interval timeInterval, Function<Double, Double> xFunc, Function<Double, Double> yFunc, String fileName) Save function y(x) on given time interval into file for parameterized functions x(t) and y(t)static voidserialize(StringBuilder sb, String fileName) Save text data from StringBuilder instance into file
-
Constructor Details
-
FileUtil
public FileUtil()
-
-
Method Details
-
serialize
Save text data from StringBuilder instance into file- Parameters:
sb- StringBuilder instancefileName- name of file
-
saveFunc
Save function y(x) on given interval into file- Parameters:
interval- intervalfunc- function y = y(x)fileName- name of file
-
saveFunc
public static void saveFunc(Interval timeInterval, Function<Double, Double> xFunc, Function<Double, Double> yFunc, String fileName) Save function y(x) on given time interval into file for parameterized functions x(t) and y(t)- Parameters:
timeInterval- time intervalxFunc- function x = x(t)yFunc- function y = y(t)fileName- name of file
-
save
Save matrix into file- Parameters:
m- matrix to savefileName- name of filerotate- flag - rotate matrix or not before saving
-