| ClassLazyArray {lazyarray} | R Documentation |
Internal Class definition for LazyArray
Description
Internal class definition of lazy array objects
Active bindings
meta_namefile name to store meta information
min_versionminimal version supported, for backward compatibility concerns
versioncurrent version of lazy data instance
dimdimension of the data
dimnamesdimension names of the data
ndimlength of dimensions
can_writeis array read-only or writable
storage_pathdirectory where the data is stored at
Methods
Public methods
Method print()
Override print method
Usage
ClassLazyArray$print(...)
Arguments
...ignored
Returns
self instance
Method new()
Constructor
Usage
ClassLazyArray$new(path, read_only = TRUE, meta_name = "lazyarray.meta")
Arguments
pathdirectory to store data into
read_onlywhether modification is allowed
meta_namemeta file to store the data into
Method flag_auto_clean()
Set auto clean flag
Usage
ClassLazyArray$flag_auto_clean(auto)
Arguments
autological whether the data on hard disk will be automatically cleaned
Method finalize()
Override finalize method
Usage
ClassLazyArray$finalize()
Method remove_data()
Remove data on hard disk
Usage
ClassLazyArray$remove_data(force = FALSE, warn = TRUE)
Arguments
forcewhether to force remove the data
warnwhether to show warning if not fully cleaned
Method make_writable()
Make instance writable
Usage
ClassLazyArray$make_writable()
Method make_readonly()
Make instance read-only
Usage
ClassLazyArray$make_readonly()
Method set_dim()
Set dim and dimnames of the array
Usage
ClassLazyArray$set_dim(dim, dimnames)
Arguments
Method get_file_format()
Partition format, currently only 'fst' is supported
Usage
ClassLazyArray$get_file_format()
Method get_storage_format()
Data storage format, expected to be one of the followings: 'double', 'integer', 'character', or 'complex'
Usage
ClassLazyArray$get_storage_format()
Method is_multi_part()
Whether partitioned based on the last dimension
Usage
ClassLazyArray$is_multi_part()
Method partition_dim()
Returns dimension of each partition
Usage
ClassLazyArray$partition_dim()
Method get_partition_fpath()
Get partition path
Usage
ClassLazyArray$get_partition_fpath(part, full_path = TRUE)
Arguments
partinteger representing the partition
full_pathwhether return the full system path
Returns
Character file name or full path
Method @set_data()
Internal method to set data
Usage
ClassLazyArray$@set_data(value, ...)
Arguments
valuevector of data to be set
...index set
Method set_compress_level()
Set compression level
Usage
ClassLazyArray$set_compress_level(level)
Arguments
levelfrom 0 to 100. 0 means no compression, 100 means max compression
Method get_compress_level()
Get compression level
Usage
ClassLazyArray$get_compress_level()
Method @get_data()
Internal method to read data
Usage
ClassLazyArray$@get_data(..., drop = TRUE)
Arguments
...index set
dropwhether to drop dimension after subset, default is true
Method @sample_data()
Internal method to obtain a sample data to be used to determine storage mode
Usage
ClassLazyArray$@sample_data()
Method clone()
The objects of this class are cloneable with this method.
Usage
ClassLazyArray$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Author(s)
Zhengjia Wang