31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ool<br />

bool<br />

bool<br />

bool<br />

istream&<br />

ostream&<br />

const string& x < const string& y<br />

true iff x is lexicographically smaller than y.<br />

const string& x > const string& y<br />

true iff x is lexicographically greater than y.<br />

const string& x ≤ const string& y<br />

returns (x < y) | (x == y).<br />

const string& x ≥ const string& y<br />

returns (x > y) | (x == y).<br />

istream& I ≫ string& s<br />

same as s.read(I,’ ’).<br />

ostream& O ≪ const string& s<br />

writes string s to the output stream O.<br />

5. Implementation<br />

Strings are implemented by C++ character vectors. All operations involving the search<br />

for a pattern s1 in a string s take time O(s.lenght() ∗ s1.length()), [ ] takes constant time<br />

and all other operations on a string s take time O(s.length()).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!