/** * <a href="http://math.nist.gov/javanumerics/jama/">Jama</a> [math.nist.gov] style: * construct a matrix from a one-dimensional packed array * * @param name - array name * @param vals - One-dimensional array of short, packed by columns (ala Fortran). * @param m - Number of rows */ public MLInt16(String name, short[] vals, int m) { this(name, castToShort(vals), m); }
public Short buldFromBytes(byte[] bytes) { if (bytes.length != getBytesAllocated()) { throw new IllegalArgumentException( "To build from byte array I need array of size: " + getBytesAllocated()); } return ByteBuffer.wrap(bytes).getShort(); }
/** * <a href="http://math.nist.gov/javanumerics/jama/">Jama</a> [math.nist.gov] style: * construct a 2D real matrix from <code>double[][]</code> * * Note: array is converted to Short[] * * @param name - array name * @param vals - two-dimensional array of values */ public MLInt16(String name, short[][] vals) { this(name, short2DToShort(vals), vals.length); }
mlArray = new MLInt16(name, dims, type, attributes);
/** * <a href="http://math.nist.gov/javanumerics/jama/">Jama</a> [math.nist.gov] style: * construct a 2D real matrix from <code>double[][]</code> * * Note: array is converted to Short[] * * @param name - array name * @param vals - two-dimensional array of values */ public MLInt16(String name, short[][] vals) { this(name, short2DToShort(vals), vals.length); }
mlArray = new MLInt16(name, dims, type, attributes);
public Short buldFromBytes(byte[] bytes) { if (bytes.length != getBytesAllocated()) { throw new IllegalArgumentException( "To build from byte array I need array of size: " + getBytesAllocated()); } return ByteBuffer.wrap(bytes).getShort(); }
/** * <a href="http://math.nist.gov/javanumerics/jama/">Jama</a> [math.nist.gov] style: * construct a 2D real matrix from <code>double[][]</code> * * Note: array is converted to Short[] * * @param name - array name * @param vals - two-dimensional array of values */ public MLInt16( String name, short[][] vals ) { this( name, short2DToShort(vals), vals.length ); }
/** * <a href="http://math.nist.gov/javanumerics/jama/">Jama</a> [math.nist.gov] style: * construct a matrix from a one-dimensional packed array * * @param name - array name * @param vals - One-dimensional array of short, packed by columns (ala Fortran). * @param m - Number of rows */ public MLInt16(String name, short[] vals, int m) { this(name, castToShort(vals), m); }
mlArray = new MLInt16(name, dims, type, attributes);
public Short buldFromBytes(byte[] bytes) { if ( bytes.length != getBytesAllocated() ) { throw new IllegalArgumentException( "To build from byte array I need array of size: " + getBytesAllocated() ); } return ByteBuffer.wrap( bytes ).getShort(); }
/** * <a href="http://math.nist.gov/javanumerics/jama/">Jama</a> [math.nist.gov] style: * construct a 2D real matrix from <code>double[][]</code> * * Note: array is converted to Short[] * * @param name - array name * @param vals - two-dimensional array of values */ public MLInt16( String name, short[][] vals ) { this( name, short2DToShort(vals), vals.length ); }
/** * <a href="http://math.nist.gov/javanumerics/jama/">Jama</a> [math.nist.gov] style: * construct a matrix from a one-dimensional packed array * * @param name - array name * @param vals - One-dimensional array of short, packed by columns (ala Fortran). * @param m - Number of rows */ public MLInt16(String name, short[] vals, int m) { this(name, castToShort( vals ), m ); } /**
mlArray = new MLInt16(name, dims, type, attributes);
public Short buldFromBytes(byte[] bytes) { if ( bytes.length != getBytesAllocated() ) { throw new IllegalArgumentException( "To build from byte array I need array of size: " + getBytesAllocated() ); } return ByteBuffer.wrap( bytes ).getShort(); }
/** * <a href="http://math.nist.gov/javanumerics/jama/">Jama</a> [math.nist.gov] style: * construct a matrix from a one-dimensional packed array * * @param name - array name * @param vals - One-dimensional array of short, packed by columns (ala Fortran). * @param m - Number of rows */ public MLInt16(String name, short[] vals, int m) { this(name, castToShort( vals ), m ); } /**