BITMAP_AND
Description
The BITMAP_AND function is used to calculate the intersection of two bitmap type data. This function accepts two bitmap type parameters and returns a new bitmap type result that contains the common elements of the two input bitmaps.
Parameters
- left: The first bitmap type parameter.
- right: The second bitmap type parameter.
Return Type
Returns a result of bitmap type.
Example Usage
The following example demonstrates how to use the BITMAP_AND function to calculate the intersection of two bitmap type data.
Example 1:
Results:
Example 2:
Results:
Precautions
- The BITMAP_AND function requires both input parameters to be of bitmap type, otherwise, the function execution will fail.
- The result is displayed in array form, but what is actually returned is a bitmap type data. The client may not support directly printing bitmap type data, so it is necessary to use the corresponding conversion function (such as bitmap_to_array) to convert it into a printable format.
- When the number of elements in the input bitmap type data is large, the calculation efficiency of the BITMAP_AND function may be affected. In this case, consider using other data types and methods for calculation.