Function noLZSS::count_factors

Function Documentation

size_t noLZSS::count_factors(std::string_view text)

Counts noLZSS factors in a text string.

Counts the number of noLZSS factors in a text string.

This function provides a convenient way to count factors without storing them. It uses the sink-based factorization internally with a counting lambda.

This is a memory-efficient alternative to factorize() when you only need the count of factors rather than the factors themselves.

See also

factorize() for getting the actual factors

See also

count_factors_file() for file-based counting

See also

count_factors_file() for file-based counting

Note

This is more memory-efficient than factorize() when you only need the count

Parameters:
  • text – Input text string

  • text – Input text string

Returns:

Number of factors in the factorization

Returns:

Number of factors in the factorization