123456789101112131415161718192021222324252627282930313233 |
- function [] = DumpDataset(dataFilePath, dataFileName, iter, removedNodesList, outPath)
-
- fprintf('reading network information from file %s%s ...\n', dataFilePath, dataFileName);
- load(strcat(dataFilePath, dataFileName), 'data');
-
- % save original file only once
- %if iter == 1
- outFile = sprintf('%s_%d_orig', dataFileName, iter);
- SaveAsciiGraph(outPath, outFile, data);
- %end
-
- n = size(removedNodesList,1);
- m = size(removedNodesList,2);
-
- for i=1:m
-
- removedNodes = removedNodesList{i};
-
- partial_data = data;
- partial_data(removedNodes,:) = 0;
- partial_data(:,removedNodes) = 0;
-
- outFile = sprintf('%s_%d_%i_part', dataFileName, iter, i);
- SaveAsciiGraph(outPath, outFile, partial_data);
-
- outFile = sprintf('%s%s_%d_%i_miss.txt', outPath, dataFileName, iter, i);
- SaveIntMatrixToFile(outFile, removedNodes);
-
- LogMsg(sprintf('DumpDataset for %s%s iter %d/%d into %s%s.', dataFilePath, dataFileName, iter, i, outPath, outFile));
- end
- %fprintf('Completed DumpDataset.\n');
-
-
|