Lazarus
Free Pascal => General => Topic started by: dgaspary on July 09, 2014, 07:27:43 pm
-
Hi.
Is there (maybe at FCL) this type of data structure and its algorithms?
Lazarus seems to have now some Graphs objects at LvlGraphCtrl Unit.
But they are related to LCL controls.
Thank you.
-
On my to do list, currently I've only implemented k-ary tree with depth & breadth first: http://svn.freepascal.org/svn/fpc/trunk/packages/fcl-stl/src/gtree.pp
Actually, I should've implemented graph in the first place, then make tree as a special case of graph. My knowledge is a bit weak on graph, though. I only got B- on the respective programming subject and even C (on the second attempt, first attempt was D) on the respective mathematical subject. There are just too many graph traversal algorithm...
-
On my to do list, currently I've only implemented k-ary tree with depth & breadth first: http://svn.freepascal.org/svn/fpc/trunk/packages/fcl-stl/src/gtree.pp
Actually, I should've implemented graph in the first place, then make tree as a special case of graph. My knowledge is a bit weak on graph, though. I only got B- on the respective programming subject and even C (on the second attempt, first attempt was D) on the respective mathematical subject. There are just too many graph traversal algorithm...
I will take a look when I have some time. Thank you.
-
You have an AVL tree somewhere in the FCL.
-
I also need graph data structure so I would like to know if there is anything new on this matter in FreePascal?
-
You have an AVL tree somewhere in the FCL.
In RTL-generics....Not FCL.
-
You have an AVL tree somewhere in the FCL.
In RTL-generics....Not FCL.
There is one also in the FCL, in the unit: AVL_Tree
-
I also need graph data structure so I would like to know if there is anything new on this matter in FreePascal?
Check - https://github.com/avk959/LGenerics
-
I also need graph data structure so I would like to know if there is anything new on this matter in FreePascal?
Check - https://github.com/avk959/LGenerics
Thanks! :D
-
Also (if you know Python) take a look here - https://github.com/ufkapano/graphs-dict
-
https://github.com/zamtmn/zcad/tree/master/cad_source/other/AGraphLaz
Old and powerful graph lib
-
Thanks but you did not read topic carefull enough. I was not looking for visual graphs, but for implementation of graph data structure explained here: https://en.wikipedia.org/wiki/Graph_(abstract_data_type)
This is not a visual library, only the implementation of graphs and algorithms over them. See examples https://github.com/zamtmn/zcad/tree/master/cad_source/other/AGraphLaz/Test/Graph
-
@zamtmn:
I did not look deeper as I probably should have. I deleted the post before I saw that you have already replied. I apologize for the inconvenience I made.
@all:
I have added LGenerics to the wiki page and mentioned that it supports graphs:
https://wiki.freepascal.org/Data_Structures,_Containers,_Collections
-
avra
No problem.
Once upon a time I found this library. It is really powerful and convenient, implements many different mathematical algorithms. With the author I could not contact, all are very old contacts. I fixed some bugs related to 64 bit systems, and posted on github.
The only bad place is that the library was written long before the generics. And uses different hacks to implement generics functionality
-
Don't worry about not using generics, the only think you are missing is the bloat that comes with it.
These are my own opinions of course from the peanut gallery.
-
@Avra, I think this is somewhat premature, but thanks anyway.
@zamtmn, maybe you should also add a link to your library on the wiki? And it would be interesting someday to compare the capabilities and performance of both libraries.
@jamie, I believe that programs are not bloated by libraries, but by programmers who copy the entire(dynamic)
array when they need to read only three consecutive values from this array.
-
This isn't my library.
>>Copyright (C) Alexey A. Chernobaev, 1996-2003
I couldn't find the author, it's been a long time. I do not know analogues of this library, it implements not just a tree container, this is a full implementation of graphs and algorithms over them. For example - finding the shortest path
-
Well, does it probably have any license?
-
https://github.com/zamtmn/zcad/blob/master/cad_source/other/AGraphLaz/LICENSE the license is only for one part of the library, that's all the author left us
-
Yes, I have read it. I am not a lawyer, but it seems that there is nothing that would prohibit you from distributing this library under any kind of permissive license, provided that authorship is preserved. Or did I understand something wrong?
-
I am not a lawyer, but it seems that there is nothing that would prohibit you from distributing this library under any kind of permissive license, provided that authorship is preserved. Or did I understand something wrong?
You can not change the license of the library, it stays MPL. You can mix it with other source code without making it viral to your code. I might be wrong, so better check this:
https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)
-
I found this (in Russian) -
http://176.102.48.88/ftp/kabinet/info/%D0%9D%D0%B0%20%D0%B4%D0%BE%D0%BF%D0%BE%D0%BC%D0%BE%D0%B3%D1%83%20%D0%B2%D1%87%D0%B8%D1%82%D0%B5%D0%BB%D1%8E%20%D1%96%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B8/BOOK/Book_algo/book-html/graf.algo.server/www/
http://176.102.48.88/ftp/kabinet/info/%D0%9D%D0%B0%20%D0%B4%D0%BE%D0%BF%D0%BE%D0%BC%D0%BE%D0%B3%D1%83%20%D0%B2%D1%87%D0%B8%D1%82%D0%B5%D0%BB%D1%8E%20%D1%96%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B8/BOOK/Book_algo/book-html/graf.algo.server/www/index-1.htm
http://graph-software.narod.ru/main.html