Algorithms For Dummies


Putting a Graph in Numeric Format



Download 7,18 Mb.
Pdf ko'rish
bet300/651
Sana15.07.2021
Hajmi7,18 Mb.
#120357
1   ...   296   297   298   299   300   301   302   303   ...   651
Bog'liq
Algorithms

Putting a Graph in Numeric Format

Precision is an important part of using algorithms. Even though too much preci-

sion hides the overall pictures from humans, computers thrive on detail. Often, 

the more detail you can provide, the better the results you receive. However, the 

form of that detail is important. To use certain algorithms, the data you provide 

must appear in certain forms or the result you receive won’t make sense (it will 

contain errors or have other issues).

Fortunately, NetworkX provides a number of functions to convert your graph into 

forms that other packages and environments can use. These functions appear at 

http://networkx.readthedocs.io/en/stable/reference/convert.html

. The 

following sections show how to present graph data as a NumPy (



http://www.

numpy.org/

) matrix, SciPy (

https://www.scipy.org/

) sparse representation

and a standard Python list. You use these presentations as the book progresses to 

work with the various algorithms. (The code in the following sections appears in 

the 


A4D; 08; Graph Conversion.ipynb

 file and relies on the graph you created 

in the “Counting edges and vertexes” section of the chapter.)



170

 

   


  PART 3 


Download 7,18 Mb.

Do'stlaringiz bilan baham:
1   ...   296   297   298   299   300   301   302   303   ...   651




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish