Data Structures in MATLAB
14 次查看(过去 30 天)
显示 更早的评论
Hello, I hope this is an appropriate question to ask in here.
As part of continous learning, I took a course on ordered/unordered data structures and I will present the key points to my co-workers (different types of data structures, use cases, etc).
We mostly use MATLAB, so I was looking for pointers to make my presentation more appropriate.
As far as I know:
arrays/vectors are represented by MATLAB matrices
stacks/queues would also be represented by MATLAB matrices
lists - do they have a native representation?
hash tables (unordered maps) are represented by Containers.Map
binary trees (binary searcht trees, red-black trees, ordered maps/sets/dicts) - do they have a native representation?
min/max-heap - do they have a native representation?
graphs - I suppose it makes sense to manually implement graphs.
Conversely:
cell arrays - what are they / how are they implemented?
tables - what are they / how are they implemented?
I know this is a bit of a "theoretical" question but I would be very grateful to get some answers or be pointed towards documentation as I would not like to present erroneous information.
0 个评论
采纳的回答
Bharat Chandra Mukkavalli
2022-7-11
Hi,
To answer your query,
1) MATLAB does not have a "list" data class.
2) Trees are present in MATLAB in the "NTREE" class, the documentation can be found here: https://in.mathworks.com/help/wavelet/ref/ntree.html
3) Heaps Class is present in MATLAB and internally I believe max-heap is implemented, the implementation can be found here: https://in.mathworks.com/matlabcentral/fileexchange/34218-heap
4) MATLAB has the "graph" class to implement the graph data structure, the documentation can be found here: https://in.mathworks.com/help/matlab/ref/graph.html
5) Here is the documentation of Cell Arrays in MATLAB: https://in.mathworks.com/help/matlab/cell-arrays.html?s_tid=CRUX_topnav
6) Here is the documentation of Tables in MATLAB: https://in.mathworks.com/help/matlab/tables.html
Hope this helps!
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Directed Graphs 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!