Find Jobs
Hire Freelancers

akproj

$30-50 USD

Завершено
Опублікований about 22 years ago

$30-50 USD

Оплачується при отриманні
The Problem Write a pair of procedures that pickle and unpickle graph data structures. The procedures have the prototypes void pickle_graph(const std::string & fname, const graph_node * root); graph_node * unpickle_graph(const std::string & fname); The fname argument gives the name of the file to which the graph will be pickled or from which the graph will be unpickled. Each file contains one graph. Any errors that occur during file operations should result in an informative error message and program termination. The root argument to pickle_graph() is a node from the graph to pickle (despite the suggestive name, the graph need not be a tree). Only those nodes reachable from the root need to be pickled. Given a file name f, the node returned by unpickle_graph() should be the equivalent to the node passed into the most recent invocation of pickle_graph() with the same file name f. A graph is constructed from nodes with the structure struct graph_node { pickleable * data_ptr; std::vector children; }; all nodes in a graph are graph_nodes. A graph node may have any number of children, including none; the left-to-right order of children in a graph node is significant. Edges are directed; they point to the children but not back to the [login to view URL] file graph.h contains declarations for graph_node, pickle_graph(), and unpickle_graph(). The data stored in each graph node can be pickled and unpickled by calling the the member functions void pickleable::pickle(std::ostream &); void pickleable::unpickle(std::istream &); The data to pickle is written to the given ostream; the data to unpickle is read from the given istream. These member functions are defined in /e pickle.h [login to view URL] contains some simple driver code to test your routines. This code is not the code I'll use to test your assignment; in particular, your routines should work for arbitrary graphs, not just trees. The graph returned by unpickle_graph() should be equivalent to the graph passed into pickle_graph(). Two graphs are equivalent if there exists a one-to-one correspondence between the nodes and edges of one graph and the nodes and edges of the other graph. Two nodes are equivalent if they have the same data and the their children are equivalent in the left-to-right order given in each node. Two edges are equivalent if the nodes at their heads and tails are equivalent. -------------------------------- ## Deliverables Complete and fully-functional working program using C++ in executable form as well as complete source code of all work done. Complete copyrights to all work purchased. ## Platform Unix,Sun solaris,LInux ## Deadline information Must be checked,tested and documneted properly
ID проекту: 2845681

Про проект

5 пропозицій(-ї)
Дистанційний проект
Активність 22 yrs ago

Хочете заробити?

Переваги подання заявок на Freelancer

Вкажіть свій бюджет та терміни
Отримайте гроші за свою роботу
Опишіть свою пропозицію
Реєстрація та подання заявок у проекти є безкоштовними
Доручений:
Аватарка користувача
See private message.
$19,55 USD за 14 дні(-в)
5,0 (47 відгуки(-ів))
4,5
4,5
5 фрілансерів(-и) готові виконати цю роботу у середньому за $26 USD
Аватарка користувача
See private message.
$34 USD за 14 дні(-в)
5,0 (43 відгуки(-ів))
4,8
4,8
Аватарка користувача
See private message.
$25,50 USD за 14 дні(-в)
4,9 (6 відгуки(-ів))
1,5
1,5
Аватарка користувача
See private message.
$25,50 USD за 14 дні(-в)
5,0 (4 відгуки(-ів))
0,4
0,4
Аватарка користувача
See private message.
$25,50 USD за 14 дні(-в)
0,0 (1 відгук)
0,8
0,8

Про клієнта

Прапор UNITED STATES
United States
5,0
5
На сайті з бер. 28, 2002

Верифікація клієнта

Дякуємо! Ми надіслали на вашу електронну пошту посилання для отримання безкоштовного кредиту.
Під час надсилання електронного листа сталася помилка. Будь ласка, спробуйте ще раз.
Зареєстрованих користувачів Загальна кількість опублікованих робіт
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Завантажуємо для перегляду
Дозвіл на визначення геолокації надано.
Ваш сеанс входу закінчився, і сеанс було закрито. Будь ласка, увійдіть знову.