Data Structure: A Cell Array List Container

버전 1.5.0.1 (32.3 KB) 작성자: Bobby Nedelkovski
Provides a useful 1D container for storing an ordered heterogeneous set of elements
다운로드 수: 1.6K
업데이트 날짜: 2016/9/1

라이선스 보기

Intent: Provides a useful 1D data structure (or container) for storing an ordered heterogeneous set of elements.
Motivation: MATLAB® R2009a provides the "containers.Map" data structure for storing an unordered heterogeneous set of elements - the Map ADT is a container that is indexed with a "key" of any data type. A List ADT is a data container that is indexed by integers. The benefit in using a List ADT opposed to a native MATLAB cell array is the List ADT hides the complexity in implementation of the operations you would perform to insert and remove elements in/from arbitrary positions, for example.

Implementation: Class 'CellArrayList' is a concrete realisation of the the List ADT which uses a "native" MATLAB cell array as its storage mechanism.

The source files are contained in the zip file 'CellArrayList.zip'. Refer to the comments in 'List.m' and 'CellArrayList.m' for full details on the motivation and implementation. The script 'testCellArrayList.m' demonstrates the use of 'CellArrayList.m'. Further, a corresponding UML class diagram is illustrated in 'CellArrayList_UML_Diagram.pdf'.

Written by Bobby Nedelkovski
MathWorks Australia
Copyright 2009-2010, The MathWorks, Inc.

인용 양식

Bobby Nedelkovski (2024). Data Structure: A Cell Array List Container (https://www.mathworks.com/matlabcentral/fileexchange/25024-data-structure-a-cell-array-list-container), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Dictionaries에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.5.0.1

Updated license

1.5.0.0

Bug fix to allow creation of N-D arrays of CellArrayLists - see my comment under 'Comments and Ratings' on '11 Apr 2010'. All methods including overloaded system functions 'isempty', 'length' and 'display' have been updated in class CellArrayList.

1.4.0.0

Bug fix (much thanks to João Henriques) to avoid infinite while-loop in add() method when capacity reaches 0. Added constant property INITIAL_CAPACITY due to bug fix. UML Diagram has been updated to reflect the change.

1.3.0.0

Property 'numElts' changed to concrete protected in abstract class List - conforms with R2009b OOP. Updated UML diagram to reflect this change. Bug fix with remove() method in CellArrayList.

1.2.0.0

Minor fix in comments of 'testCellArrayList.m'. Removed abstract declaration 'list' from abstract class 'List' as this presumes a List ADT is implemented using a flat array-like data structure. UML Diagram has been updated to reflect the change.

1.1.0.0

Minor fix in comments of 'testCellArrayList.m'. Removed abstract declaration 'list' from abstract class 'List' as this presumes a List ADT is implemented using a flat array-like data structure. UML Diagram has been updated to reflect the change.

1.0.0.0