Package linalg.util

Class FileManager

java.lang.Object
linalg.util.FileManager

public class FileManager extends Object
This class provides several methods for loading and saving matrices to/from a file.
  • Method Details

    • readcsv

      public static Matrix readcsv(String filePath)
      Loads matrix data from a file.
      Parameters:
      filePath - - The path, including extension, of the file to read.
      Returns:
      A matrix containing the data from the csv file.
      Throws:
      IllegalArgumentException - if file path does not end with .csv, if file data is not formatted to be a CNumber correctly.
    • write2csv

      public static void write2csv(Matrix A, String filePath)
      Writes the contends of a matrix to a csv file.
      Parameters:
      A - - Matrix to write to file.
      filePath - - Path, including extension, to write file to.
    • main

      public static void main(String[] args)