Class CPDataFrameFactory

    • Constructor Detail

      • CPDataFrameFactory

        public CPDataFrameFactory()
    • Method Detail

      • fromRowMajorArray

        public static <V> MutableDataFrame<java.lang.Integer,​java.lang.String,​V> fromRowMajorArray​(java.lang.String[] names,
                                                                                                               java.lang.Class[] classes,
                                                                                                               V[][] data)
        Creates a data frame using a row-major two dimensional array.
        Type Parameters:
        V - the type of values
        Parameters:
        names - the column names
        classes - the type of values hold by each column
        data - the data array
        Returns:
        a newly created data frame.
      • fromJson

        public void fromJson​(java.lang.String url,
                             DataFrameFactory.Callback callback)
                      throws java.io.IOException
        Description copied from interface: DataFrameFactory
        Creates a data frame by loading a JSON encoded file.
        Parameters:
        url - the URL of the file
        callback - call back method
        Throws:
        java.io.IOException
      • fromJSON

        public MutableDataFrame<java.lang.Integer,​java.lang.String,​java.lang.Object> fromJSON​(java.lang.String url)
                                                                                                   throws java.io.IOException
        Creates a data frame by loading a JSON encoded file. The macrofocus-data.jar library is required to use this method.
        Parameters:
        url - the URL of the file
        Returns:
        a newly created data frame
        Throws:
        java.io.IOException
      • fromJSON

        public MutableDataFrame<java.lang.Integer,​java.lang.String,​java.lang.Object> fromJSON​(java.net.URL url)
                                                                                                   throws java.io.IOException
        Creates a data frame by loading a JSON encoded file. The macrofocus-data.jar library is required to use this method.
        Parameters:
        url - the URL of the file
        Returns:
        a newly created data frame
        Throws:
        java.io.IOException