|
OPeNDAP Hyrax Back End Server (BES)
Updated for version 3.8.3
|
#include <NDimensionalArray.h>

Public Member Functions | |
| long | elementCount () |
| libdap::Array * | getArray (libdap::Array *templateArray) |
| unsigned int | getCurrentLastDimensionHyperSlab () |
| long | getLastDimensionElementCount () |
| Returns the size, in elements, of the last dimension. More... | |
| void | getLastDimensionHyperSlab (std::vector< unsigned int > *location, void **slab, unsigned int *elementCount) |
| The return value parameters slab and elementCount are used to return a pointer to the first element of the last dimension hyper-slab and the number of elements in the hyper-slab. More... | |
| void | getNextLastDimensionHyperSlab (void **slab) |
| void * | getStorage () |
| Type | getTypeTemplate () |
| NDimensionalArray (libdap::Array *arrayTemplate) | |
| NDimensionalArray (std::vector< unsigned int > *shape, libdap::Type dapType) | |
| void * | relinquishStorage () |
| Returns a pointer to the underlying storage for the NDimensionalArray. More... | |
| void | resetSlabIndex () |
| void | setAll (char val) |
| Uses 'memset' to set ALL of the values in the NDimensionalArray to the passed char value. More... | |
| void | setCurrentLastDimensionHyperSlab (unsigned int newIndex) |
| void | setLastDimensionHyperSlab (std::vector< unsigned int > *location, dods_byte *values, unsigned int numVal) |
| Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray). More... | |
| void | setLastDimensionHyperSlab (std::vector< unsigned int > *location, dods_int16 *values, unsigned int numVal) |
| Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray). More... | |
| void | setLastDimensionHyperSlab (std::vector< unsigned int > *location, dods_uint16 *values, unsigned int numVal) |
| Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray). More... | |
| void | setLastDimensionHyperSlab (std::vector< unsigned int > *location, dods_int32 *values, unsigned int numVal) |
| Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray). More... | |
| void | setLastDimensionHyperSlab (std::vector< unsigned int > *location, dods_uint32 *values, unsigned int numVal) |
| Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray). More... | |
| void | setLastDimensionHyperSlab (std::vector< unsigned int > *location, dods_float32 *values, unsigned int numVal) |
| Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray). More... | |
| void | setLastDimensionHyperSlab (std::vector< unsigned int > *location, dods_float64 *values, unsigned int numVal) |
| Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray). More... | |
| dods_byte | setValue (std::vector< unsigned int > *location, dods_byte value) |
| Sets the value of the array at the location specified by the passed location vector. More... | |
| dods_int16 | setValue (std::vector< unsigned int > *location, dods_int16 value) |
| Sets the value of the array at the location specified by the passed location vector. More... | |
| dods_uint16 | setValue (std::vector< unsigned int > *location, dods_uint16 value) |
| Sets the value of the array at the location specified by the passed location vector. More... | |
| dods_int32 | setValue (std::vector< unsigned int > *location, dods_int32 value) |
| Sets the value of the array at the location specified by the passed location vector. More... | |
| dods_uint32 | setValue (std::vector< unsigned int > *location, dods_uint32 value) |
| Sets the value of the array at the location specified by the passed location vector. More... | |
| dods_float32 | setValue (std::vector< unsigned int > *location, dods_float32 value) |
| Sets the value of the array at the location specified by the passed location vector. More... | |
| dods_float64 | setValue (std::vector< unsigned int > *location, dods_float64 value) |
| Sets the value of the array at the location specified by the passed location vector. More... | |
| unsigned int | sizeOfElement () |
| string | toString () |
| virtual | ~NDimensionalArray () |
Static Public Member Functions | |
| static long | computeArraySizeFromShapeVector (vector< unsigned int > *shape) |
| Computes the total number of elements of the n-dimensional array described by the shape vector. More... | |
| static long | computeConstrainedShape (libdap::Array *a, vector< unsigned int > *shape) |
| Computes and returns (via the returned value parameter 'shape') the constrained shape of the libdap::Array 'a'. More... | |
| static long | getStorageIndex (vector< unsigned int > *shape, vector< unsigned int > *location) |
| Computes the element index in the underlying one dimensional array for the passed location based on an n-dimensional array described by the shape vector. More... | |
| static void | retrieveLastDimHyperSlabLocationFromConstrainedArrray (libdap::Array *a, vector< unsigned int > *location) |
| static string | vectorToIndices (vector< unsigned int > *v) |
Definition at line 43 of file NDimensionalArray.h.
| libdap::NDimensionalArray::NDimensionalArray | ( | libdap::Array * | arrayTemplate | ) |
Definition at line 63 of file NDimensionalArray.cc.
References BESDEBUG, computeConstrainedShape(), and vectorToIndices().

| libdap::NDimensionalArray::NDimensionalArray | ( | std::vector< unsigned int > * | shape, |
| libdap::Type | dapType | ||
| ) |
Definition at line 78 of file NDimensionalArray.cc.
References BESDEBUG, computeArraySizeFromShapeVector(), and vectorToIndices().

|
virtual |
Definition at line 93 of file NDimensionalArray.cc.
|
static |
Computes the total number of elements of the n-dimensional array described by the shape vector.
Definition at line 218 of file NDimensionalArray.cc.
Referenced by NDimensionalArray().
|
static |
Computes and returns (via the returned value parameter 'shape') the constrained shape of the libdap::Array 'a'.
Returns the total number of elements in constrained shape.
Definition at line 117 of file NDimensionalArray.cc.
References BESDEBUG.
Referenced by NDimensionalArray().
|
inline |
Definition at line 85 of file NDimensionalArray.h.
| libdap::Array * libdap::NDimensionalArray::getArray | ( | libdap::Array * | templateArray | ) |
Definition at line 621 of file NDimensionalArray.cc.
References BESDEBUG.
|
inline |
Definition at line 101 of file NDimensionalArray.h.
| long libdap::NDimensionalArray::getLastDimensionElementCount | ( | ) |
Returns the size, in elements, of the last dimension.
Definition at line 617 of file NDimensionalArray.cc.
| void libdap::NDimensionalArray::getLastDimensionHyperSlab | ( | std::vector< unsigned int > * | location, |
| void ** | slab, | ||
| unsigned int * | elementCount | ||
| ) |
The return value parameters slab and elementCount are used to return a pointer to the first element of the last dimension hyper-slab and the number of elements in the hyper-slab.
The passed the location vector, identifies the requested slab.The location vector must have N-1 elements where N is the number of dimensions in the NDimensionalArray.
Definition at line 430 of file NDimensionalArray.cc.
References BESDEBUG, getStorageIndex(), and vectorToIndices().

| void libdap::NDimensionalArray::getNextLastDimensionHyperSlab | ( | void ** | slab | ) |
Definition at line 457 of file NDimensionalArray.cc.
References BESDEBUG.
|
inline |
Definition at line 90 of file NDimensionalArray.h.
|
static |
Computes the element index in the underlying one dimensional array for the passed location based on an n-dimensional array described by the shape vector.
Definition at line 469 of file NDimensionalArray.cc.
References BESDEBUG.
Referenced by getLastDimensionHyperSlab(), and setValue().
|
inline |
Definition at line 96 of file NDimensionalArray.h.
| void * libdap::NDimensionalArray::relinquishStorage | ( | ) |
Returns a pointer to the underlying storage for the NDimensionalArray.
Calling this function is effectively telling the instance of NDimensionalArray to 'release' it's reference to the storage. While the memory will not be deleted by this call, the instance of NDimensionalArray will remove it's internal reference to the storage and thus when the NDimensionalArray goes out of scope, or is otherwise deleted the storage WILL NOT BE DELETED. CALLING THIS METHOD MEANS THAT YOU ARE NOW RESPONSIBLE FOR FREEING THE MEMORY REFERENCED BY THE RETURNED POINTER.
Definition at line 105 of file NDimensionalArray.cc.
|
inline |
Definition at line 100 of file NDimensionalArray.h.
|
static |
Definition at line 152 of file NDimensionalArray.cc.
References BESDEBUG, and vectorToIndices().

| void libdap::NDimensionalArray::setAll | ( | char | val | ) |
Uses 'memset' to set ALL of the values in the NDimensionalArray to the passed char value.
Definition at line 608 of file NDimensionalArray.cc.
|
inline |
Definition at line 102 of file NDimensionalArray.h.
| void libdap::NDimensionalArray::setLastDimensionHyperSlab | ( | std::vector< unsigned int > * | location, |
| dods_byte * | values, | ||
| unsigned int | valueCount | ||
| ) |
Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray).
The number of values passed in must match the size of the last dimension hyper-slab, and the type of the values must match the underlying type of the NDimensionalArray.
Definition at line 512 of file NDimensionalArray.cc.
| void libdap::NDimensionalArray::setLastDimensionHyperSlab | ( | std::vector< unsigned int > * | location, |
| dods_int16 * | values, | ||
| unsigned int | valueCount | ||
| ) |
Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray).
The number of values passed in must match the size of the last dimension hyper-slab, and the type of the values must match the underlying type of the NDimensionalArray.
Definition at line 524 of file NDimensionalArray.cc.
| void libdap::NDimensionalArray::setLastDimensionHyperSlab | ( | std::vector< unsigned int > * | location, |
| dods_uint16 * | values, | ||
| unsigned int | valueCount | ||
| ) |
Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray).
The number of values passed in must match the size of the last dimension hyper-slab, and the type of the values must match the underlying type of the NDimensionalArray.
Definition at line 536 of file NDimensionalArray.cc.
| void libdap::NDimensionalArray::setLastDimensionHyperSlab | ( | std::vector< unsigned int > * | location, |
| dods_int32 * | values, | ||
| unsigned int | valueCount | ||
| ) |
Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray).
The number of values passed in must match the size of the last dimension hyper-slab, and the type of the values must match the underlying type of the NDimensionalArray.
Definition at line 548 of file NDimensionalArray.cc.
| void libdap::NDimensionalArray::setLastDimensionHyperSlab | ( | std::vector< unsigned int > * | location, |
| dods_uint32 * | values, | ||
| unsigned int | valueCount | ||
| ) |
Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray).
The number of values passed in must match the size of the last dimension hyper-slab, and the type of the values must match the underlying type of the NDimensionalArray.
Definition at line 560 of file NDimensionalArray.cc.
| void libdap::NDimensionalArray::setLastDimensionHyperSlab | ( | std::vector< unsigned int > * | location, |
| dods_float32 * | values, | ||
| unsigned int | valueCount | ||
| ) |
Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray).
The number of values passed in must match the size of the last dimension hyper-slab, and the type of the values must match the underlying type of the NDimensionalArray.
Definition at line 572 of file NDimensionalArray.cc.
| void libdap::NDimensionalArray::setLastDimensionHyperSlab | ( | std::vector< unsigned int > * | location, |
| dods_float64 * | values, | ||
| unsigned int | valueCount | ||
| ) |
Sets all of the values in the last dimension hyper-hyper slab identified by the N-1 element location vector (where N is the number of dimensions in the NDimensionalArray).
The number of values passed in must match the size of the last dimension hyper-slab, and the type of the values must match the underlying type of the NDimensionalArray.
Definition at line 583 of file NDimensionalArray.cc.
| dods_byte libdap::NDimensionalArray::setValue | ( | std::vector< unsigned int > * | location, |
| dods_byte | value | ||
| ) |
Sets the value of the array at the location specified by the passed location vector.
The number of elements in the location vector must be the the same as the number of dimensions in the NDimensionalArray and the type of the passed value must match the underlying type of the NDimensionalArray
Definition at line 315 of file NDimensionalArray.cc.
References getStorageIndex().

| dods_int16 libdap::NDimensionalArray::setValue | ( | std::vector< unsigned int > * | location, |
| dods_int16 | value | ||
| ) |
Sets the value of the array at the location specified by the passed location vector.
The number of elements in the location vector must be the the same as the number of dimensions in the NDimensionalArray and the type of the passed value must match the underlying type of the NDimensionalArray
Definition at line 332 of file NDimensionalArray.cc.
References getStorageIndex().

| dods_uint16 libdap::NDimensionalArray::setValue | ( | std::vector< unsigned int > * | location, |
| dods_uint16 | value | ||
| ) |
Sets the value of the array at the location specified by the passed location vector.
The number of elements in the location vector must be the the same as the number of dimensions in the NDimensionalArray and the type of the passed value must match the underlying type of the NDimensionalArray
Definition at line 349 of file NDimensionalArray.cc.
References getStorageIndex().

| dods_int32 libdap::NDimensionalArray::setValue | ( | std::vector< unsigned int > * | location, |
| dods_int32 | value | ||
| ) |
Sets the value of the array at the location specified by the passed location vector.
The number of elements in the location vector must be the the same as the number of dimensions in the NDimensionalArray and the type of the passed value must match the underlying type of the NDimensionalArray
Definition at line 365 of file NDimensionalArray.cc.
References getStorageIndex().

| dods_uint32 libdap::NDimensionalArray::setValue | ( | std::vector< unsigned int > * | location, |
| dods_uint32 | value | ||
| ) |
Sets the value of the array at the location specified by the passed location vector.
The number of elements in the location vector must be the the same as the number of dimensions in the NDimensionalArray and the type of the passed value must match the underlying type of the NDimensionalArray
Definition at line 381 of file NDimensionalArray.cc.
References getStorageIndex().

| dods_float32 libdap::NDimensionalArray::setValue | ( | std::vector< unsigned int > * | location, |
| dods_float32 | value | ||
| ) |
Sets the value of the array at the location specified by the passed location vector.
The number of elements in the location vector must be the the same as the number of dimensions in the NDimensionalArray and the type of the passed value must match the underlying type of the NDimensionalArray
Definition at line 397 of file NDimensionalArray.cc.
References getStorageIndex().

| dods_float64 libdap::NDimensionalArray::setValue | ( | std::vector< unsigned int > * | location, |
| dods_float64 | value | ||
| ) |
Sets the value of the array at the location specified by the passed location vector.
The number of elements in the location vector must be the the same as the number of dimensions in the NDimensionalArray and the type of the passed value must match the underlying type of the NDimensionalArray
Definition at line 413 of file NDimensionalArray.cc.
References getStorageIndex().

|
inline |
Definition at line 86 of file NDimensionalArray.h.
| string libdap::NDimensionalArray::toString | ( | ) |
Definition at line 801 of file NDimensionalArray.cc.
|
static |
Definition at line 45 of file NDimensionalArray.cc.
Referenced by getLastDimensionHyperSlab(), NDimensionalArray(), and retrieveLastDimHyperSlabLocationFromConstrainedArrray().