-
-
09 Jan 2022 17:36:56 UTC
- Distribution: String-Eertree
- Module version: 0.02
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (92 / 0 / 1)
- Kwalitee
Bus factor: 1- 92.11% Coverage
- License: artistic_2
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (5.85KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Moo
- Syntax::Construct
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
String::Eertree - Build the palindromic tree aka Eertree for a string
VERSION
Version 0.02
SYNOPSIS
Eertrees make it possible to find palindrome substrings of a string in a very fast way.
use String::Eertree; my $tree = 'String::Eertree'->new(string => 'referee'); my @palindromes = $tree->uniq_palindromes; # r e f efe refer ere ee
METHODS
new
'String::Eertree'->new(string => 'xxx')
The constructor. Use the named argument
string
to specify the string you want to analyse.string
my $string = $tree->string;
The original string the tree was constructed from (see above).
uniq_palindromes
my @palindromes = $tree->uniq_palindromes;
Returns all distinct palindrome substrings of the string.
palindromes
my @palindromes = $tree->palindromes;
Returns all the palindrome substrings of the string, each substring can be repeated if it's present at different positions in the string.
AUTHOR
E. Choroba,
<choroba at cpan.org>
BUGS
Please report any bugs or feature requests to
bug-string-eertree at rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=string-eertree. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORT
You can find documentation for this module with the perldoc command.
perldoc String::Eertree
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Thanks Mohammad S Anwar (MANWAR) for introducing me to the idea.
Thanks shubham2508 for a clean Python implementation.
Thanks Mikhail Rubinchik and Arseny M. Shur for inventing the eertree (arXiv:1506.04862v2 [cs.DS] 17 Aug 2015).
LICENSE AND COPYRIGHT
This software is Copyright (c) 2022 by E. Choroba.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
Module Install Instructions
To install String::Eertree, copy and paste the appropriate command in to your terminal.
cpanm String::Eertree
perl -MCPAN -e shell install String::Eertree
For more information on module installation, please visit the detailed CPAN module installation guide.