I am writing code that involves three dimensional spatial data.
I need to check if two 3D matrices, which represent values at (x,y,z) spatial locations, are equal.
If use an associative array to handle the 3 dimensions, it seems like I need to use a loop.
The simple example below illustrates the issue for a one-dimensional associative array.
I need to check if two 3D matrices, which represent values at (x,y,z) spatial locations, are equal.
If use an associative array to handle the 3 dimensions, it seems like I need to use a loop.
The simple example below illustrates the issue for a one-dimensional associative array.
Code:
: A=asarray_create("real",1) : : B=asarray_create("real",1) : : asarray(A,1,42) : : asarray(B,1,42) : : A==B 0 : : a=asarray(A,1) : : b=asarray(B,1) : : a==b 1