Jadval funksiyani Fure qatoriga yoyish. Fure koeffitsientlarini hisoblash. Qator hadlari sonini tanlash Ishdan maqsad


Download 413.24 Kb.
bet6/9
Sana16.06.2023
Hajmi413.24 Kb.
#1518113
1   2   3   4   5   6   7   8   9
Bog'liq
13 - 18 - lab algoritm

Topshiriqlar.
9.Hoffman kodi algoritmi orqali HOFFMAN so’zini siqish

// Hoffman algoritmiga ko'ra daraxt quramiz


static Node * builder(priority_queue, Node> graph) {
while (graph.size() > 1) {
Node *n = new Node(graph.top());
graph.pop();
graph.push(*n->join(*new Node(graph.top())));
graph.pop();
}
return new Node(graph.top());
}
};
unsigned amounts[256]; / / belgilar bilan duch hisoblagich bir qator
int main() {
string s;
getline (std:: cin, s); / / bo'sh joylar bilan birga qatorni o'qing
for(auto i: s) amounts[i]++;
priority_queue, Node> graph;
for (int i = 'a'; i < = 'z'; i++) / / ustuvor bilan navbat yozish
if (amounts[i] > 0) graph.emplace(s=(char)i, amounts[i]);
Node *n = Node::builder(graph);
n->traversal_code("");
// grafning tavsifiga ko'ra tasvirlarni yaratish uchun Google xizmatiga havola yaratish
cout << "http://chart.apis.google.com/chart?cht=gv&chl=" << endl;
// olingan daraxtning DOT tavsifini chizish uchun yarating
cout << "Digraph G {\n" << n->to_str() << "}";



Xulosa:
Men bu laboratoriyada Axborot oqimi – bu logistik tizim ichida, logistik tizim va tashqi muhit ora-sida xarakatlanuvchi, logistik operatsiyalarning boshqaruvi va nazorati uchun zarur bo‘lgan xabarlar va ma’lumotlar yig‘indisidir. Axborot oqimi qog‘oz va elektron hujjatlar ko‘rinishida bo‘lishi mumkin ekanligini o’rgandim.

LABORATORIYA ISHI - 17
Mavzu: Jarayon matematik modelini tuzishda eng kichik kvadratlar usulidan foydalanish.
Ishdan maqsad. Jarayon matematik modelini tuzishda eng kichik kvadratlar usulidan foydalanishni o’rganish.
Qo’yilgan masala. Jarayon matematik modelini tuzishda eng kichik kvadratlar usulidan foydalanish.
Ish tartibi:




Download 413.24 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling