Blatt07.pdf

blatt07.pdf
Preview of blatt07.pdf
🔗 Source: mathematik.uni-ulm.de
📊 Size: 93 KB
📄 Pages: 3 pages
⬇️ Downloads: 96

Summary

Institut für Numerische Mathematik
Dr. Andreas F. Borchert und Dr. Michael C. Lehn
8. Dezember 2016
Blatt 7
Objektorientierte Programmierung mit C++
(WS 2016/2017)
Abgabe bis zum 15. Dezember 2016, 16:00 Uhr
Lernziele:
• Entwicklung von Unterklassen zur Navigation in der übergeordneten Klasse
• Implementierung einfacher Iteratoren
Aufgabe 8: Navigieren in Tries
Die zuvor erarbeitete Implementierung für die Trie-Datenstruktur sah noch keine Navigati-
onsmöglichkeit vor.
Eine Unterklasse Trie::Pointer von Trie ist zu entwickeln, die das Navigieren unterstützt, ohne dabei die internen Zeiger preiszugeben.
Folgendes Code-Beispiel demonstriert die gewünschte Funktionalität:
Trie::Pointer ptr = trie.descend();
if (ptr.defined()) {
for (char ch: key) {
if (!ptr.descend(ch)) break;
if (ptr.exists()) {
cout << *ptr << endl;
}
}
}
Aufgabe 9: Navigieren in Tries II
Mit dem Trie::Pointer lässt sich noch nicht auf einfache Weise ermitteln, welche weitergehen-
den Unterbäume zur Verfügung stehen.
Ein Iterator des Typs Trie::Pointer::Iterator ist zu implementieren, um über die weiterführenden Zeichen zu iterieren.
Die folgenden Bedingungen müssen erfüllt werden:
• Trie::Pointer muss die Methoden begin und end unterstützen
• Der Iterator muss den Operator „!=“ unterstützen
• Der Iterator muss das Prefix-Inkrement unterstützen
• Der Iterator muss die Dereferenzierung unterstützen
Mit Hilfe der Iteratoren kann das Rätsel gelöst werden, welches Wort aus /usr/dict/words die meisten Präfixe enthält, die zugleich auch Wörter aus der gleichen Sammlung sind.

Description

Institut für Numerische Mathematik
Dr. Andreas F. Borchert und Dr.

Technical Information

  • File Format: PDF
  • File Size: 93 KB
  • Pages: 3
  • Language: DE
  • Total Downloads: 96
  • Last Updated: 7 days ago

Document Overview

This PDF document about blatt07.pdf provides comprehensive information and guidance. Whether you're a beginner or advanced user, this resource offers valuable insights into blatt07.pdf.

Related Topics

If you're interested in blatt07.pdf, you might also want to explore:

Download blatt07.pdf eBooks for free and learn more about blatt07.pdf. These books contain exercises and tutorials to improve your practical skills, at all levels!

Not satisfied with this document? We have related documents to blatt07.pdf, try searching with similar keywords: blatt07.pdf, Bulmaca Pdf Indirbulmaca Pdf Indirbulmaca Pdf Indirbulmaca Pdf Indir, Casa.pdf.pdf.pdf.pdf, pdf cours aikido listes des fichiers pdf pdf cours aikido pdf cours aikido, Pdf Pdf Les Secrets D'un Esprit Millionnaire Pdf Pdf, Editors Picks Press Release Script Pdf Username Www Pdf Action Login Pdf Action Login Pdf, Powered By Particle Links Below Pdf Username Www Pdf Action Login Pdf Quot Pdf Action Newaccount, Powered By Particle Links Below Pdf Username Www Pdf Pdf Action Login Pdf Action Newaccount

You can download PDF versions of the user's guide, manuals and ebooks about blatt07.pdf, you can also find and download for free A free online manual (notices) with beginner and intermediate, Downloads Documentation, You can download PDF files (or DOC and PPT) about blatt07.pdf for free, but please respect copyrighted ebooks.