Files
imdd_silas/Libs/mat2tikz/test/private/loadHashTable.m
sioe 397cfa61dd Auswertung Experiment
Database tüddelei
DBHanlder läuft gut für DIESE Datanbank struktur...
App begonnen aber weit entfernt von gutem Stand
2024-11-15 16:51:37 +01:00

20 lines
717 B
Matlab

function hashTable = loadHashTable(suite)
% loads a reference hash table from disk
hashTable.suite = suite;
hashTable.contents = struct();
filename = hashTableName(suite);
if exist(filename, 'file')
fid = fopen(filename, 'r');
finally_fclose_fid = onCleanup(@() fclose(fid));
data = textscan(fid, '%s : %s');
if ~isempty(data) && ~all(cellfun(@isempty, data))
functions = cellfun(@strtrim, data{1},'UniformOutput', false);
hashes = cellfun(@strtrim, data{2},'UniformOutput', false);
for iFunc = 1:numel(functions)
hashTable.contents.(functions{iFunc}) = hashes{iFunc};
end
end
end
end