Newer
Older
/*
* BorderArray.h
*
* Created on: 1. 11. 2014
* Author: Tomas Pecka
*/
#ifndef _BORDER_ARRAY_H_
#define _BORDER_ARRAY_H_
#include <vector>
#include <string/StringFeatures.h>
class BorderArray : public std::SingleDispatch<BorderArray, std::vector<unsigned>, const string::StringBase &> {
public:
/**
* Computes border array of string
* @param string string to compute border array for
* @return Vector of length same as string, where i-th index corresponds to i-th element of string
*/
static std::vector<unsigned> construct(const string::String& string);
static std::vector<unsigned> construct(const string::LinearString < >& string);