why is dictionary introduced so later in matlab?

조회 수: 5 (최근 30일)
min lee
min lee 2024년 4월 7일
이동: Bruno Luong 2024년 4월 9일
I have been using matlab since 2006, but I have never heard of the dictionary structure untile recently when I started learning python.
After some check, I found that the dictionary structure was introduced into matlab only since 2022b.
That is amazingly later.
Why? Is the dictionary structure in conflict with the inner mechanism of matlab?
  댓글 수: 4
min lee
min lee 2024년 4월 8일
My concern is, the late implementation might suggest that intrinsically matlab is not very compatible with this kind of data structure.
The issue is relevant to my code developement. In 2010, when I did not know the notion of dictionary, I used the binary search method to look up a number in a sorted table. The time complexity is O(log(N)), where N is the size of the table.
With a dictionary, the time complexity is O(1), and I do not need to implement the binary search myself.
Bruno Luong
Bruno Luong 2024년 4월 8일
편집: Bruno Luong 2024년 4월 8일
"My concern is, the late implementation might suggest that intrinsically matlab is not very compatible with this kind of data structure"
I don't see why the data structure have anything to do with key hasing algorithm (as implemented by dictionary). Note that MATLAB has oop (class) for vey long.
Even if it was the case, you would not get an official answer, TMW staffs never discuss internal data structure related topic in public.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dictionaries에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by