Function permutator::get_cartesian_size[][src]

pub fn get_cartesian_size(size: usize, degree: usize) -> usize

Calculate all possible cartesian combination size. It is always equals to size.pow(degree).

Parameters

  • size is a size of data to generate a cartesian product
  • degree is a number of combination of data.

Examples

use permutator::get_cartesian_size;
 
get_cartesian_size(3, 2); // return 9.
get_cartesian_size(3, 3); // return 27.

See

get_cartesian_for