C# Class Jurassic.Library.SparseArray

Represents an array with non-consecutive elements.
ファイルを表示 Open project: paulbartrum/jurassic Class Usage Examples

Public Methods

Method Description
CopyTo ( SparseArray source, uint start ) : void

Copies the elements of the given sparse array to this sparse array, starting at a particular index. Existing values are overwritten.

CopyTo ( object source, uint start, int length ) : void

Copies the elements of the sparse array to this sparse array, starting at a particular index. Existing values are overwritten.

Delete ( uint index ) : void

Deletes (sets to null) an array element.

DeleteRange ( uint start, uint length ) : void

Deletes (sets to null) a range of array elements.

FromDenseArray ( object array, int length ) : SparseArray

Creates a sparse array from the given dense array.

SparseArray ( ) : System
this ( uint index ) : object

Gets the total number of items that can be stored in this tree without having to increase the size of the tree.

Private Methods

Method Description
DeleteRange ( uint start, uint length, Node parentNode, Node node, int nodeIndex, int nodeDepth ) : void

Deletes (sets to null) a range of array elements.

FindOrCreateArray ( uint index, bool writeAccess ) : object[]
GetValueNonCached ( uint index ) : object

Method Details

CopyTo() public method

Copies the elements of the given sparse array to this sparse array, starting at a particular index. Existing values are overwritten.
public CopyTo ( SparseArray source, uint start ) : void
source SparseArray The sparse array to copy.
start uint The zero-based index at which copying begins.
return void

CopyTo() public method

Copies the elements of the sparse array to this sparse array, starting at a particular index. Existing values are overwritten.
public CopyTo ( object source, uint start, int length ) : void
source object The sparse array to copy.
start uint The zero-based index at which copying begins.
length int The number of elements to copy.
return void

Delete() public method

Deletes (sets to null) an array element.
public Delete ( uint index ) : void
index uint The index of the array element to delete.
return void

DeleteRange() public method

Deletes (sets to null) a range of array elements.
public DeleteRange ( uint start, uint length ) : void
start uint The index of the first array element to delete.
length uint The number of array elements to delete.
return void

FromDenseArray() public static method

Creates a sparse array from the given dense array.
public static FromDenseArray ( object array, int length ) : SparseArray
array object The array to copy items from.
length int The number of items to copy.
return SparseArray

SparseArray() public method

public SparseArray ( ) : System
return System

this() public method

Gets the total number of items that can be stored in this tree without having to increase the size of the tree.
public this ( uint index ) : object
index uint
return object