1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- 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/';
- 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
|