Show / Hide Table of Contents

Class Subarray

Represents a TileDB subarray object.

Inheritance
object
Subarray
Implements
IDisposable
Namespace: TileDB.CSharp
Assembly: TileDB.CSharp.dll
Syntax
public sealed class Subarray : IDisposable

Constructors

| Edit this page View Source

Subarray(Array)

Creates a Subarray.

Declaration
public Subarray(Array array)
Parameters
Type Name Description
Array array

The Array the subarray is associated with.

| Edit this page View Source

Subarray(Array, bool)

Creates a Subarray with the ability to toggle range coalescing.

Declaration
public Subarray(Array array, bool coalesceRanges)
Parameters
Type Name Description
Array array

The Array the subarray is associated with.

bool coalesceRanges

Whether to coalesce adjacent ranges as they are added. Optional, defaults to true.

Methods

| Edit this page View Source

AddRange(string, string, string)

Adds a 1D string range along a subarray dimension name, in the form (start, end).

Declaration
public void AddRange(string dimensionName, string start, string end)
Parameters
Type Name Description
string dimensionName

The dimension's name.

string start

The start of the dimension's range.

string end

The end of the dimension's range.

| Edit this page View Source

AddRange(uint, string, string)

Adds a 1D string range along a subarray dimension index, in the form (start, end).

Declaration
public void AddRange(uint dimensionIndex, string start, string end)
Parameters
Type Name Description
uint dimensionIndex

The dimension's index.

string start

The start of the dimension's range.

string end

The end of the dimension's range.

| Edit this page View Source

AddRange<T>(string, T, T)

Adds a 1D range along a subarray dimension name, specified by its name, in the form (start, end).

Declaration
public void AddRange<T>(string dimensionName, T start, T end) where T : struct
Parameters
Type Name Description
string dimensionName

The dimension's name.

T start

The start of the dimension's range.

T end

The end of the dimension's range.

Type Parameters
Name Description
T

The dimension's type.

Exceptions
Type Condition
NotSupportedException

T is not supported.

| Edit this page View Source

AddRange<T>(uint, T, T)

Adds a 1D range along a subarray dimension index, in the form (start, end).

Declaration
public void AddRange<T>(uint dimensionIndex, T start, T end) where T : struct
Parameters
Type Name Description
uint dimensionIndex

The dimension's index.

T start

The start of the dimension's range.

T end

The end of the dimension's range.

Type Parameters
Name Description
T

The dimension's type.

Exceptions
Type Condition
NotSupportedException

T is not supported.

| Edit this page View Source

Dispose()

Disposes this Subarray.

Declaration
public void Dispose()
| Edit this page View Source

GetRangeCount(string)

Gets the number of ranges for a given dimension name.

Declaration
public ulong GetRangeCount(string dimensionName)
Parameters
Type Name Description
string dimensionName

The dimension's name.

Returns
Type Description
ulong
| Edit this page View Source

GetRangeCount(uint)

Gets the number of ranges for a given dimension index.

Declaration
public ulong GetRangeCount(uint dimensionIndex)
Parameters
Type Name Description
uint dimensionIndex

The dimension's index.

Returns
Type Description
ulong
| Edit this page View Source

GetRange<T>(string, uint)

Gets the range for a given dimension name and range index.

Declaration
public (T Start, T End) GetRange<T>(string dimensionName, uint rangeIndex) where T : struct
Parameters
Type Name Description
string dimensionName

The dimension's name.

uint rangeIndex

The range's index.

Returns
Type Description
(T Start, T End)

The dimension's start and end values.

Type Parameters
Name Description
T

The dimension's type.

Exceptions
Type Condition
NotSupportedException

T is not supported.

| Edit this page View Source

GetRange<T>(uint, uint)

Gets the range for a given dimension index and range index.

Declaration
public (T Start, T End) GetRange<T>(uint dimensionIndex, uint rangeIndex) where T : struct
Parameters
Type Name Description
uint dimensionIndex

The dimension's index.

uint rangeIndex

The range's index.

Returns
Type Description
(T Start, T End)

The dimension's start and end values.

Type Parameters
Name Description
T

The dimension's type.

Exceptions
Type Condition
NotSupportedException

T is not supported.

| Edit this page View Source

GetStringRange(string, uint)

Gets the string range for a given dimension name and range index.

Declaration
public (string Start, string End) GetStringRange(string dimensionName, uint rangeIndex)
Parameters
Type Name Description
string dimensionName

The dimension's name.

uint rangeIndex

The range's index.

Returns
Type Description
(string Start, string End)

The dimension's start and end values.

| Edit this page View Source

GetStringRange(uint, uint)

Gets the string range for a given dimension index and range index.

Declaration
public (string Start, string End) GetStringRange(uint dimensionIndex, uint rangeIndex)
Parameters
Type Name Description
uint dimensionIndex

The dimension's index.

uint rangeIndex

The range's index.

Returns
Type Description
(string Start, string End)

The dimension's start and end values.

| Edit this page View Source

SetConfig(Config)

Sets a Config to this Subarray

Declaration
public void SetConfig(Config config)
Parameters
Type Name Description
Config config

The config to set.

Remarks

The following options from config will be considered:

  • sm.memory_budget
  • sm.memory_budget_var
  • sm.sub_partitioner_memory_budget
  • sm.var_offsets.mode
  • sm.var_offsets.extra_element
  • sm.var_offsets.bitsize
  • sm.check_coord_dups
  • sm.check_coord_oob
  • sm.check_global_order
  • sm.dedup_coords
| Edit this page View Source

SetSubarray<T>(ReadOnlySpan<T>)

Sets a subarray, defined in the order dimensions were added.

Declaration
public void SetSubarray<T>(ReadOnlySpan<T> data) where T : struct
Parameters
Type Name Description
ReadOnlySpan<T> data

A read-only span of [start,stop] values per dimension.

Type Parameters
Name Description
T

The type of the dimensions.

Exceptions
Type Condition
NotSupportedException

T is not supported.

InvalidOperationException

T does not match the dimension's type.

ArgumentException

data does not contain exactly twice as many items as the number of dimensions.

See Also
SetSubarray<T>(params T[])
| Edit this page View Source

SetSubarray<T>(params T[])

Sets a subarray, defined in the order dimensions were added.

Declaration
public void SetSubarray<T>(params T[] data) where T : struct
Parameters
Type Name Description
T[] data

An array of [start,stop] values per dimension.

Type Parameters
Name Description
T

The type of the dimensions.

Exceptions
Type Condition
NotSupportedException

T is not supported.

InvalidOperationException

T does not match the dimension's type.

ArgumentException

data does not contain exactly twice as many items as the number of dimensions.

See Also
SetSubarray<T>(ReadOnlySpan<T>)

Implements

IDisposable
  • Edit this page
  • View Source
In this article
Back to top Copyright © 2018-2023 TileDB Inc.