All Downloads are FREE. Search and download functionalities are using the official Maven repository.

water.fvec.FrameTestUtil Maven / Gradle / Ivy

The newest version!
package water.fvec;

import hex.CreateFrame;
import org.junit.Assert;
import org.junit.Ignore;
import water.DKV;
import water.Key;
import water.MRTask;
import water.parser.BufferedString;
import water.util.Log;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * Methods to access frame internals.
 */
@Ignore("Support for tests, but no actual tests here")
public class FrameTestUtil {

  public static Frame createFrame(String fname, long[] chunkLayout, String[][] data) {
    Frame f = new Frame(Key.make(fname));
    f.preparePartialFrame(new String[]{"C0"});
    f.update();
    // Create chunks
    byte[] types = new byte[] {Vec.T_STR};
    for (int i=0; imake(fname));
    f.preparePartialFrame(new String[]{"C0"});
    f.update();
    byte[] types = new byte[] {Vec.T_NUM};
    // Create chunks
    for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy