12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- function initWorkspaceLibLinear
-
-
-
-
-
-
- if strcmp( getenv('USER'), 'freytag')
- LIBLINEARDIR = '/home/freytag/code/3rdParty/liblinear-1.93/matlab/';
- elseif strcmp( getenv('USER'), 'rodner')
- LIBLINEARDIR = '/home/freytag/code/3rdParty/liblinear-1.93/matlab/';
- elseif strcmp( getenv('USER'), 'kaeding')
- LIBLINEARDIR = '/home/kaeding/lib/liblinear-multicore-2.1-2/matlab/';
- else
- fprintf('Unknown user %s and unknown default settings', getenv('USER') );
- end
-
-
- b_recursive = false;
- b_overwrite = true;
- s_pathMain = fullfile(pwd);
- addPathSafely ( s_pathMain, b_recursive, b_overwrite )
- clear ( 's_pathMain' );
-
-
- b_recursive = true;
- b_overwrite = true;
- s_pathMisc = fullfile(pwd, 'misc');
- addPathSafely ( s_pathMisc, b_recursive, b_overwrite )
- clear ( 's_pathMisc' );
-
- b_recursive = true;
- b_overwrite = true;
- s_pathMisc = fullfile(pwd, 'binary');
- addPathSafely ( s_pathMisc, b_recursive, b_overwrite )
- clear ( 's_pathMisc' );
-
-
-
- if ( isempty(LIBLINEARDIR) )
- fprintf('InitPatchDiscovery-WARNING - no LIBLINEARDIR dir found on your machine. Code is available at http://www.csie.ntu.edu.tw/~cjlin/liblinear/ \n');
- else
- b_recursive = true;
- b_overwrite = true;
- addPathSafely ( LIBLINEARDIR, b_recursive, b_overwrite );
- end
-
-
-
- clear( 'LIBLINEARDIR' );
- end
- function addPathSafely ( s_path, b_recursive, b_overwrite )
- if ( ~isempty(strfind(path, [s_path , pathsep])) )
- if ( b_overwrite )
- if ( b_recursive )
- rmpath( genpath( s_path ) );
- else
- rmpath( s_path );
- end
- else
- fprintf('initWSLibLinear - %s already in your path but overwriting de-activated.\n', s_path);
- return;
- end
- end
-
- if ( b_recursive )
- addpath( genpath( s_path ) );
- else
- addpath( s_path );
- end
- end
|