pub fn hist3d(
    arr_a: &Array1<usize>,
    arr_b: &Array1<usize>,
    arr_c: &Array1<usize>,
    nbins_a: usize,
    nbins_b: usize,
    nbins_c: usize
) -> Result<Array3<usize>>
Expand description

Calculates the event intersection between three integer arrays of equal size

Usage

use ndarray::array;
use information::hist3d;

let arr_a = array![0, 1, 1];
let arr_b = array![0, 0, 1];
let arr_c = array![1, 1, 1];
let expected = array![
    [[0, 1], 
     [0, 0]],

    [[0, 1], 
     [0, 1]]
];
let hist = hist3d(&arr_a, &arr_b, &arr_c, 2, 2, 2).unwrap();
assert_eq!(hist.shape(), &[2, 2, 2]);
assert_eq!(hist, expected);