pub fn z_get<T>(
za: &[T],
i: usize,
j: usize,
xlen: usize,
ylen: usize,
) -> Result<T, DomainError>where
T: Num,
Expand description
Returns the value z
of grid point (i
, j
) of the array za
to z
.
§Important
The
za
array is indexed in column-major style (Fortran style), so it must be defined accordingly.
§Example
let xa = [0.0, 1.0];
let ya = [0.0, 2.0];
let za = [
0.0, 10.0, // <- We want this one
2.0, 3.0,
];
let g = z_get(&za, 1, 0, xa.len(), ya.len())?;
assert_eq!(g, 10.0);
}