Đã hoàn thành

Parsing an XML file, binary trees forest in C/C++

The task should use some of the following libraries RapidXml, Pugixml, Libxml, Boost and it'll be running on 64 bit Linux.

On input there is an XML file contains a forest of binary trees (<Segment>)

<Segment>

<Node id="1">

<True/>

<Node id="2">

<SimplePredicate field="data1" operator="lessOrEqual" value="1.162715515"/>

<Node id="4">

<SimplePredicate field="data2" operator="lessOrEqual" value="1.0299651565"/>

<Node id="8">

<SimplePredicate field="data3" operator="lessOrEqual" value="0.8254138555"/>

<Node id="14" score="4">

<SimplePredicate field="data4" operator="lessOrEqual" value="-0.72156197"/>

</Node>

<Node id="15" score="-1.5">

<SimplePredicate field="data4" operator="greaterThan" value="-0.72156197"/>

</Node>

</Node>

<Node id="9">

<SimplePredicate field="data3" operator="greaterThan" value="0.8254138555"/>

<Node id="16" score="-10">

From stdin you get a string like this (it can be an array of arguments if it's easier to work with that) data1:val1,data2:val2,...datan:valn|data1:val1,data2:val2,...datan:valn.... The "|" character marks end of each input

The program would go through each tree using each of the inputs and based on the data:value pair will end up in some node and store the value of score into an array. At the end it would print an average value of the array elements along with the input data.

For example an input data1:1.08;data2:1.01;data3:0.66;data4:-0.6 will store -1.5 into an array

In pseudocode the program might look like this

input=readstdin;

forest=readXMLfromfile;

foreach_input{

foreach_forest{

arr[length]=runthrough();

}

avg=countavg(arr);

print "data1;data2;data3;...;avg\n";

}

the XML filename will be provided on stdin as well

Kĩ năng: Lập trình C, Lập trình C++, XML

Xem nhiều hơn: use of binary, trees c, string in c programming, string c programming, segment tree, programming operator, programming in binary, parsing input, pair programming, node programming, node in tree, node based programming, length of a score, get string c, get length of string in c, get in c programming, data trees, data input operator, data3, c programming string

Về Bên Thuê:
( 9 nhận xét ) Aachen, Czech Republic

ID dự án: #8218565

Được trao cho:

vinaydev

A proposal has not yet been provided

$15 USD trong 5 ngày
(1 Nhận xét)
0.6

10 freelancer đang chào giá trung bình $39 cho công việc này

vano101

A proposal has not yet been provided

$25 USD trong 1 ngày
(1327 Nhận xét)
7.5
hbxfnzwpf

I am very proficient in c, c++. I have 15 years c++ developing experience now, and I have worked for 5 years. My work is online game developing, and mainly focus on server side, the language is c++ under linux. I used Thêm

$50 USD trong 1 ngày
(126 Nhận xét)
6.9
aleemakhtar1

A proposal has not yet been provided

$111 USD trong 3 ngày
(18 Nhận xét)
5.0
Venky117

hi... i can do this. please let me know immediately to start. i can deliver you on time. please initiate communication to discuss further. thanks

$50 USD trong 1 ngày
(40 Nhận xét)
5.0
bven09

I can implement your requirements in Boost. I have over 12 years experience in developing applications using Boost

$35 USD trong 1 ngày
(9 Nhận xét)
4.5
gaurav5670

Hello, I have over 6+ years of experience in C/C++ programming. I can write this program in C using libxml2 to parse the xml file. I will make this program to take inputs from command line. I have written various appli Thêm

$25 USD trong 1 ngày
(7 Nhận xét)
2.6
sagarys49

A proposal has not yet been provided

$20 USD trong 3 ngày
(0 Nhận xét)
0.0
dorianfugas

Пропозиція ще не була подана

$30 USD trong 2 ngày
(0 Nhận xét)
0.0
sudhanshu2340

Lies within our capabilities. On time delivery assured. Check [login to view URL] for more information. Sudhanshu [login to view URL][at][login to view URL]

$25 USD trong 1 ngày
(0 Nhận xét)
0.0