pub struct TileDBArray { /* private fields */ }Expand description
A TileDB array supporting dense and sparse storage.
Data is organized into tiles for efficient I/O. Dense arrays store all cells within dimension bounds; sparse arrays store only occupied cells with explicit coordinates.
Implementations§
Source§impl TileDBArray
impl TileDBArray
Sourcepub fn create(
schema: ArraySchema,
config: TileDBConfig,
) -> Result<Self, TileDBError>
pub fn create( schema: ArraySchema, config: TileDBConfig, ) -> Result<Self, TileDBError>
Create a new TileDB array from a schema.
Sourcepub fn schema(&self) -> &ArraySchema
pub fn schema(&self) -> &ArraySchema
Return the schema of this array.
Sourcepub fn config(&self) -> &TileDBConfig
pub fn config(&self) -> &TileDBConfig
Return the config of this array.
Sourcepub fn write_dense(
&mut self,
data: &[f64],
subarray: &[(usize, usize)],
) -> Result<(), TileDBError>
pub fn write_dense( &mut self, data: &[f64], subarray: &[(usize, usize)], ) -> Result<(), TileDBError>
Write data to a dense subarray.
data contains the values to write in row-major order.
subarray defines the range for each dimension as (start, end) inclusive.
Sourcepub fn read_dense(
&self,
subarray: &[(usize, usize)],
) -> Result<Vec<f64>, TileDBError>
pub fn read_dense( &self, subarray: &[(usize, usize)], ) -> Result<Vec<f64>, TileDBError>
Read data from a dense subarray.
subarray defines the range for each dimension as (start, end) inclusive.
Returns data in row-major order.
Sourcepub fn write_sparse(
&mut self,
coords: &[Vec<f64>],
values: &[f64],
) -> Result<(), TileDBError>
pub fn write_sparse( &mut self, coords: &[Vec<f64>], values: &[f64], ) -> Result<(), TileDBError>
Write sparse data to the array.
coords is a slice of coordinate vectors (one per dimension).
values contains the attribute values for each coordinate tuple.
Sourcepub fn read_sparse(
&self,
query_range: &[(f64, f64)],
) -> Result<(Vec<Vec<f64>>, Vec<f64>), TileDBError>
pub fn read_sparse( &self, query_range: &[(f64, f64)], ) -> Result<(Vec<Vec<f64>>, Vec<f64>), TileDBError>
Read sparse data within a range query.
query_range defines the (min, max) range for each dimension.
Returns (coordinates, values) for all cells within the range.
Sourcepub fn total_capacity(&self) -> usize
pub fn total_capacity(&self) -> usize
Return the total capacity of the dense array.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TileDBArray
impl RefUnwindSafe for TileDBArray
impl Send for TileDBArray
impl Sync for TileDBArray
impl Unpin for TileDBArray
impl UnsafeUnpin for TileDBArray
impl UnwindSafe for TileDBArray
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.