@Test public void testFactory() throws Exception { zeroRank = Array.factory(DataType.INT, new int[0]); iter = zeroRank.getIndexIterator(); currentCounter = iter.getCurrentCounter(); assert currentCounter.length == 0; }
public static Array factory(DataType dataType, int[] shape) { return factory(dataType, Index.factory(shape), null); }
Array { public static Array factory(DataType dataType, int[] shape) { return factory(dataType, Index.factory(shape), null); } }
Array { public static Array factory(DataType dataType, int[] shape) { return factory(dataType, Index.factory(shape), null); } protected  Array(DataType dataType, int[] shape); protected  Array(DataType dataType, Index index); }
Array { public static Array factory(DataType dataType, int[] shape) { return factory(dataType, Index.factory(shape), null); } protected  Array(DataType dataType, int[] shape); protected  Array(DataType dataType, Index index); static Array factory(DataType dataType, int[] shape); static Array factory(DataType dataType, int[] shape, Object storage); static Array factory(DataType dtype, Index index, Object storage); static Array makeVlenArray(int[] shape, @Nonnull Array[] storage); static Array makeObjectArray(DataType dtype, Class classType, int[] shape, Object storage); static Array factoryConstant(DataType dtype, int[] shape, Object storage); static Array makeFromJavaArray(Object javaArray); static Array makeFromJavaArray(Object javaArray, boolean isUnsigned); static void arraycopy(Array arraySrc, int srcPos, Array arrayDst, int dstPos, int len); static Array makeArray(DataType dtype, int npts, double start, double incr); static Array makeArray(DataType dtype, List<String> stringValues); static Array makeArray(DataType dtype, String[] stringValues); static Array makeArrayRankPlusOne(Array org); DataType getDataType(); Index getIndex(); IndexIterator getIndexIterator(); int getRank(); int[] getShape(); long getSize(); long getSizeBytes(); IndexIterator getRangeIterator(List<Range> ranges); abstract Class getElementType(); abstract Object getStorage(); Array section(List<Range> ranges); Array section(int[] origin, int[] shape); Array section(int[] origin, int[] shape, int[] stride); Array sectionNoReduce(List<Range> ranges); Array sectionNoReduce(int[] origin, int[] shape, int[] stride); Array slice(int dim, int value); Array copy(); Object get1DJavaArray(DataType wantType); Object get1DJavaArray(Class wantType); ByteBuffer getDataAsByteBuffer(); ByteBuffer getDataAsByteBuffer(ByteOrder order); ByteBuffer getDataAsByteBuffer(int capacity, ByteOrder order); static Array factory(DataType dtype, int[] shape, ByteBuffer bb); Object copyTo1DJavaArray(); Object copyToNDJavaArray(); Array flip(int dim); Array transpose(int dim1, int dim2); Array permute(int[] dims); Array reshape(int[] shape); Array reshapeNoCopy(int[] shape); Array reduce(); Array reduce(int dim); boolean isUnsigned(); boolean isConstant(); boolean isVlen(); abstract double getDouble(Index ima); abstract void setDouble(Index ima, double value); abstract float getFloat(Index ima); abstract void setFloat(Index ima, float value); abstract long getLong(Index ima); abstract void setLong(Index ima, long value); abstract int getInt(Index ima); abstract void setInt(Index ima, int value); abstract short getShort(Index ima); abstract void setShort(Index ima, short value); abstract byte getByte(Index ima); abstract void setByte(Index ima, byte value); abstract char getChar(Index ima); abstract void setChar(Index ima, char value); abstract boolean getBoolean(Index ima); abstract void setBoolean(Index ima, boolean value); abstract Object getObject(Index ima); abstract void setObject(Index ima, Object value); abstract double getDouble(int elem); abstract void setDouble(int elem, double val); abstract float getFloat(int elem); abstract void setFloat(int elem, float val); abstract long getLong(int elem); abstract void setLong(int elem, long value); abstract int getInt(int elem); abstract void setInt(int elem, int value); abstract short getShort(int elem); abstract void setShort(int elem, short value); abstract byte getByte(int elem); abstract void setByte(int elem, byte value); abstract char getChar(int elem); abstract void setChar(int elem, char value); abstract boolean getBoolean(int elem); abstract void setBoolean(int elem, boolean value); abstract Object getObject(int elem); abstract void setObject(int elem, Object value); String toString(); String shapeToString(); boolean hasNext(); Object next(); double nextDouble(); float nextFloat(); byte nextByte(); short nextShort(); int nextInt(); long nextLong(); char nextChar(); boolean nextBoolean(); void resetLocalIterator(); }
Array { public static Array factory(DataType dataType, int[] shape) { return factory(dataType, Index.factory(shape), null); } protected  Array(DataType dataType, int[] shape); protected  Array(DataType dataType, Index index); static Array factory(DataType dataType, int[] shape); static Array factory(DataType dataType, int[] shape, Object storage); static Array factory(DataType dtype, Index index, Object storage); static Array makeVlenArray(int[] shape, @Nonnull Array[] storage); static Array makeObjectArray(DataType dtype, Class classType, int[] shape, Object storage); static Array factoryConstant(DataType dtype, int[] shape, Object storage); static Array makeFromJavaArray(Object javaArray); static Array makeFromJavaArray(Object javaArray, boolean isUnsigned); static void arraycopy(Array arraySrc, int srcPos, Array arrayDst, int dstPos, int len); static Array makeArray(DataType dtype, int npts, double start, double incr); static Array makeArray(DataType dtype, List<String> stringValues); static Array makeArray(DataType dtype, String[] stringValues); static Array makeArrayRankPlusOne(Array org); DataType getDataType(); Index getIndex(); IndexIterator getIndexIterator(); int getRank(); int[] getShape(); long getSize(); long getSizeBytes(); IndexIterator getRangeIterator(List<Range> ranges); abstract Class getElementType(); abstract Object getStorage(); Array section(List<Range> ranges); Array section(int[] origin, int[] shape); Array section(int[] origin, int[] shape, int[] stride); Array sectionNoReduce(List<Range> ranges); Array sectionNoReduce(int[] origin, int[] shape, int[] stride); Array slice(int dim, int value); Array copy(); Object get1DJavaArray(DataType wantType); Object get1DJavaArray(Class wantType); ByteBuffer getDataAsByteBuffer(); ByteBuffer getDataAsByteBuffer(ByteOrder order); ByteBuffer getDataAsByteBuffer(int capacity, ByteOrder order); static Array factory(DataType dtype, int[] shape, ByteBuffer bb); Object copyTo1DJavaArray(); Object copyToNDJavaArray(); Array flip(int dim); Array transpose(int dim1, int dim2); Array permute(int[] dims); Array reshape(int[] shape); Array reshapeNoCopy(int[] shape); Array reduce(); Array reduce(int dim); boolean isUnsigned(); boolean isConstant(); boolean isVlen(); abstract double getDouble(Index ima); abstract void setDouble(Index ima, double value); abstract float getFloat(Index ima); abstract void setFloat(Index ima, float value); abstract long getLong(Index ima); abstract void setLong(Index ima, long value); abstract int getInt(Index ima); abstract void setInt(Index ima, int value); abstract short getShort(Index ima); abstract void setShort(Index ima, short value); abstract byte getByte(Index ima); abstract void setByte(Index ima, byte value); abstract char getChar(Index ima); abstract void setChar(Index ima, char value); abstract boolean getBoolean(Index ima); abstract void setBoolean(Index ima, boolean value); abstract Object getObject(Index ima); abstract void setObject(Index ima, Object value); abstract double getDouble(int elem); abstract void setDouble(int elem, double val); abstract float getFloat(int elem); abstract void setFloat(int elem, float val); abstract long getLong(int elem); abstract void setLong(int elem, long value); abstract int getInt(int elem); abstract void setInt(int elem, int value); abstract short getShort(int elem); abstract void setShort(int elem, short value); abstract byte getByte(int elem); abstract void setByte(int elem, byte value); abstract char getChar(int elem); abstract void setChar(int elem, char value); abstract boolean getBoolean(int elem); abstract void setBoolean(int elem, boolean value); abstract Object getObject(int elem); abstract void setObject(int elem, Object value); String toString(); String shapeToString(); boolean hasNext(); Object next(); double nextDouble(); float nextFloat(); byte nextByte(); short nextShort(); int nextInt(); long nextLong(); char nextChar(); boolean nextBoolean(); void resetLocalIterator();  }