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
Citar como
timo (2024). linked list implementation (https://www.mathworks.com/matlabcentral/fileexchange/39827-linked-list-implementation), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 |