Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Manacher_Result Struct Reference

Result object for Manacher's algorithm. More...

#include <String_Palindromes.H>

Collaboration diagram for Aleph::Manacher_Result:
[legend]

Public Attributes

Array< size_t > odd_radius
 odd_radius[i] is radius around center i (length = 2*r-1).
 
Array< size_t > even_radius
 even_radius[i] is radius around center between i-1 and i (length = 2*r).
 
size_t longest_begin = 0
 0-based start index of the longest palindrome.
 
size_t longest_length = 0
 Length of the longest palindrome.
 
std::string longest_palindrome
 The longest palindromic substring.
 

Detailed Description

Result object for Manacher's algorithm.

Radius conventions:

  • odd_radius[i]: radius around center i (length = 2*r-1).
  • even_radius[i]: radius around center between i-1 and i (length = 2*r).

Definition at line 62 of file String_Palindromes.H.

Member Data Documentation

◆ even_radius

Array<size_t> Aleph::Manacher_Result::even_radius

even_radius[i] is radius around center between i-1 and i (length = 2*r).

Definition at line 65 of file String_Palindromes.H.

Referenced by Aleph::manacher().

◆ longest_begin

size_t Aleph::Manacher_Result::longest_begin = 0

0-based start index of the longest palindrome.

Definition at line 67 of file String_Palindromes.H.

Referenced by Aleph::manacher().

◆ longest_length

size_t Aleph::Manacher_Result::longest_length = 0

Length of the longest palindrome.

Definition at line 68 of file String_Palindromes.H.

Referenced by Aleph::manacher().

◆ longest_palindrome

std::string Aleph::Manacher_Result::longest_palindrome

The longest palindromic substring.

Definition at line 69 of file String_Palindromes.H.

Referenced by Aleph::longest_palindromic_substring(), and Aleph::manacher().

◆ odd_radius

Array<size_t> Aleph::Manacher_Result::odd_radius

odd_radius[i] is radius around center i (length = 2*r-1).

Definition at line 64 of file String_Palindromes.H.

Referenced by Aleph::manacher().


The documentation for this struct was generated from the following file: