Subarray Creation
ILArray<>s have the ability to derive subarrays from. Subarrays reflect parts of the original array. This is very often needed, when working with arrays. This tutorial will show all possible ways of creation, give decision hints and explain the syntax in detail.
Hint for users familiar with Matlab:
Creating subarrays for ILNumerics.Net is very similar to the way of creating subarrays in Matlab. In fact the syntax presented here will look very familiar for Matlab users. Besides the actual syntax and the underlying implementation - subarray creation is full compatible to Matlab! This even includes functionality like
Creating subarrays for ILNumerics.Net is very similar to the way of creating subarrays in Matlab. In fact the syntax presented here will look very familiar for Matlab users. Besides the actual syntax and the underlying implementation - subarray creation is full compatible to Matlab! This even includes functionality like
- writing to ranges
- automatic array reshaping on set access
- automatic array reshaping in get access with last dimension specified as ":"
- partial removal of dimensions by assigning
null(known as : '... = [ ]') - sequential index read/ write access
Content
Subarrays are created as full subarrays or as ranged arrays.- Full subarrays are created without dimension shifts or with dimensions shifts. They will conatain all elements of the original either in the same manner as the source or rearranged with shifted dimensions.
- Ranged subarrays partially reflect their original array. Optionally a dimension shift may be done simultaneously. Ranged subarrays are created by one of the following methods: