linked list implementation
*creation:
listBtns = linkedListClass('grpName');
for igrp = 1:n
b.grpName = aObj.INP.GROUP{igrp}.GROUPNAME; %#ok<*AGROW>
b.handle= uicontrol('Style','radiobutton ',...
'units' , 'normalized', ...
'String',b.grpName,...
'Position',[0.01,igrp*0.03,0.2,0.03],...
'Enable','off');
%set the hande func for the modif of the text
set(b.handle,'Callback',@(hObject,eventdata)radionButtons_callback(hObject,eventdata, guidata(hObject)));
b.value= false;
rdioBtnsEgoGrp.listBtns.addAtEnd(b);
% rdioBtns.wasLastSelected = false;
end
*interogation
L = correctionList();
if ~L.isEmpty()
i = 1;
el = L.getElementOnPoz(i);
while ~isempty(el)
fprintf('\n Elem Nr: %d', el.Data.nr);
fprintf('\n Group Name: %s', el.Data.grpName);
i= i+1;
el = L.getElementOnPoz(i);
end
else
fprintf('\n Empty List ');
end
*deletion
L = correctionList();
if ~L.isEmpty()
L.deleteElemOnPoz(1);
el = L.getElementOnPoz(1);
while ~isempty(el)
L.deleteElemOnPoz(1);
el = L.getElementOnPoz(1);
end
else
fprintf('\n Empty List ');
end
Cita come
timo (2024). linked list implementation (https://www.mathworks.com/matlabcentral/fileexchange/39827-linked-list-implementation), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.0.0 |