public class DoubleDiskDataStorage extends DiskDataStorage
double
element type.DataStorage.AbstractIterator, DataStorage.Iterator
READ, READ_WRITE, WRITE
Modifier | Constructor and Description |
---|---|
|
DoubleDiskDataStorage()
Default constructor.
|
protected |
DoubleDiskDataStorage(DoubleDiskDataStorage doubleDiskDataStorage,
long offset,
long length)
Subsequence constructor.
|
Modifier and Type | Method and Description |
---|---|
protected ArrayAccess |
createArrayAccess(int mode,
int startColumn,
int columns,
int rows)
Create an empty ArrayAccess.
|
protected ArrayAccess |
createTransposedArrayAccess(int mode,
int startColumn,
int columns,
int rows)
Create an empty transposed ArrayAccess.
|
protected int |
getUnitSize()
Size of the element type, in bytes.
|
protected ArrayAccess |
implGetArray(int mode,
long offset,
int length)
Gets an array access to the data of this data storage when it is treated as a linear block.
|
protected DataStorage |
implSubsequence(long offset,
long length)
Implementation of getting a subsequence of this data storage.
|
DataStorage.Iterator |
iterator(int mode,
long startPosition,
long endPosition)
Constructs a new iterator.
|
getBlockSize, getFileChannel, getFilename, implCopyFrom, implGetArray, implGetSize, implGetTransposedArray, implSetSize, isCached, setArray, setTransposedArray, transferFrom, transferTo
copyFrom, copyFrom, getArray, getArray, getOffset, getSize, getTransposedArray, isReadOnly, isSubsequenced, setReadOnly, setSize, subsequence
public DoubleDiskDataStorage() throws ApfloatRuntimeException
ApfloatRuntimeException
protected DoubleDiskDataStorage(DoubleDiskDataStorage doubleDiskDataStorage, long offset, long length)
doubleDiskDataStorage
- The originating data storage.offset
- The subsequence starting position.length
- The subsequence length.protected DataStorage implSubsequence(long offset, long length) throws ApfloatRuntimeException
DataStorage
implSubsequence
in class DataStorage
offset
- The subsequence starting position.length
- The subsequence length.ApfloatRuntimeException
protected ArrayAccess implGetArray(int mode, long offset, int length) throws ApfloatRuntimeException
DataStorage
implGetArray
in class DataStorage
mode
- Access mode for the array access: DataStorage.READ
, DataStorage.WRITE
or both.offset
- Starting position of the array access in the data storage.length
- Number of accessible elements in the array access.ApfloatRuntimeException
protected ArrayAccess createArrayAccess(int mode, int startColumn, int columns, int rows)
DiskDataStorage
createArrayAccess
in class DiskDataStorage
mode
- Whether the array is prepared for reading, writing or both. The value should be DataStorage.READ
, DataStorage.WRITE
or a combination of these.startColumn
- The starting column where data is stored.columns
- The number of columns of data.rows
- The number of rows of data.protected ArrayAccess createTransposedArrayAccess(int mode, int startColumn, int columns, int rows)
DiskDataStorage
createTransposedArrayAccess
in class DiskDataStorage
mode
- Whether the array is prepared for reading, writing or both. The value should be DataStorage.READ
, DataStorage.WRITE
or a combination of these.startColumn
- The starting column where data is stored.columns
- The number of columns of data.rows
- The number of rows of data.public DataStorage.Iterator iterator(int mode, long startPosition, long endPosition) throws IllegalArgumentException, IllegalStateException, ApfloatRuntimeException
DataStorage
startPosition
is less than or greater than endPosition
, correspondingly.iterator
in class DataStorage
mode
- Access mode for iterator: DataStorage.READ
, DataStorage.WRITE
or both.startPosition
- Starting position of iterator in the data set. For reverse access, the first element in the iterator is startPosition - 1
.endPosition
- End position of iterator in the data set. For forward access, the last accessible element in the iterator is endPosition - 1
.IllegalArgumentException
- If the requested area is out of bounds of the data storage.IllegalStateException
- If write access is requested for a read-only data storage.ApfloatRuntimeException
protected int getUnitSize()
DiskDataStorage
getUnitSize
in class DiskDataStorage
Copyright © 2018. All rights reserved.