pub fn random(alphabet: &[F], max_depth: u64) -> Term<F> where F: Clone + Ranked {
        let mut zeros = Vec::with_capacity(alphabet.len());
        for f in alphabet.iter() {
            if f.arity() == 0 {
                zeros.push(f.clone())
            }
        }

        assert!(!zeros.is_empty());
        Self::random_with_zeros(&zeros, alphabet, max_depth)
    }
/// Generate a random term with the given alphabet.
/// The alphabet must contain at least one constant (of arity 0), otherwise it will panic.
Generate a random term with the given alphabet.
The alphabet must contain at least one constant (of arity 0), otherwise it will panic.
Generate a random term with the given alphabet . The alphabet must contain at least one constant ( of arity 0 ) otherwise it will panic .
pub fn random(alphabet: &[F], max_depth: u64) -> Term<F> where F: Clone + Ranked {
        let mut zeros = Vec::with_capacity(alphabet.len());
        for f in alphabet.iter() {
            if f.arity() == 0 {
                zeros.push(f.clone())
            }
        }
        assert!(!zeros.is_empty());
        Self::random_with_zeros(&zeros, alphabet, max_depth)
    }
pub fn random ( alphabet : & [ F ] , max_depth : u64 ) -> Term < F > where F : Clone + Ranked { let mut zeros = Vec :: with_capacity ( alphabet . len ( ) ) ; for f in alphabet . iter ( ) { if f . arity ( ) == 0 { zeros . push ( f . clone ( ) ) } } assert ! ( zeros is_empty ( ) ) ; Self :: random_with_zeros ( & zeros , alphabet , max_depth ) }
Generate a random term with the given alphabet.
Generate a random term with the given alphabet .
alphabet
&[F]
max_depth
u64
alphabet
&[F]
max_depth
u64