Bidi.InvertMap(Int32[]) Method

Definition

Invert an index map.

[Android.Runtime.Register("invertMap", "([I)[I", "", ApiSince=29)]
public static int[]? InvertMap (int[]? srcMap);
[<Android.Runtime.Register("invertMap", "([I)[I", "", ApiSince=29)>]
static member InvertMap : int[] -> int[]

Parameters

srcMap
Int32[]

is an array whose elements define the original mapping from a source array to a destination array. Some elements of the source array may have no mapping in the destination array. In that case, their value will be the special value MAP_NOWHERE. All elements must be &gt;=0 or equal to MAP_NOWHERE. Some elements in the source map may have a value greater than the srcMap.length if the destination array has more elements than the source array. There must be no duplicate indexes (two or more elements with the same value except MAP_NOWHERE).

Returns

Int32[]

an array representing the inverse map. This array has a number of elements equal to 1 + the highest value in srcMap. For elements of the result array which have no matching elements in the source array, the corresponding elements in the inverse map will receive a value equal to MAP_NOWHERE. If element with index i in srcMap has a value k different from MAP_NOWHERE, this means that element i of the source array maps to element k in the destination array. The inverse map will have value i in its k-th element. For all elements of the destination array which do not map to an element in the source array, the corresponding element in the inverse map will have a value equal to MAP_NOWHERE.

Attributes

Remarks

Invert an index map. The index mapping of the argument map is inverted and returned as an array of indexes that we will call the inverse map.

Java documentation for android.icu.text.Bidi.invertMap(int[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to