/* C */ struct sidl_double__array* sidl_double__array_createCol(int32_t dimen, const int32_t lower[], const int32_t upper[]); // // C++ static sidl::array<double> sidl::array<double>::createCol(int32_t dimen, const int32_t lower[], const int32_t upper[]); C C FORTRAN 77 subroutine sidl_double__array_createCol_f(dimen, lower, upper, result) integer*4 dimen integer*4 lower(dimen), upper(dimen) integer*8 result ! ! FORTRAN 90 subroutine createCol(lower, upper, result) integer (selected_int_kind(9)), dimension(:), intent(in) :: lower, upper type (sidl_double_3d), intent(out) :: result ! type depends on dimension ! dimension of result is inferred from the size of lower // Java // (isRow should be false to get a column order array) public Array(int dim, int[] lower, int[] upper, boolean isRow);
This method creates a column-major, multi-dimensional array in a
contiguous block of memory. dimen should be strictly greater
than zero, and lower and upper should have dimen
elements. lower[i] must be less than or equal to
upper[i]-1 for i 0 and i
dimen. If
this function fails for some reason, it returns
NULL. lower[i] specifies the smallest valid index for
dimension i, and upper[i] specifies the largest. Note
this definition is somewhat un-C like where the upper bound is often
one past the end. In SIDL, the size of dimension i is 1
+ upper[i] - lower[i].
The function makes copies of the information provided by dimen, lower, and upper, so the caller is not obliged to maintain those values after the function call.
For Fortran, the new array is returned in the last parameter, result. A zero value in result indicates that the operation failed. For Fortran 90, you can use the function not_null to verify that result is a valid array.