% function set_indices - reshuffle segmentation indices depending
% on which UASPEECH condition we're in
%
% Syntax: INDICES = set_indices(CONDITION)
% INDICES = vector of indices, a permutation of the numbers 1..161,
%   n'th word from condition 'set_1' is permuted to INDICES(n) in
%   CONDITION
% CONDITION = string between 'set_1' and 'set_10' inclusive
%
% Mark Hasegawa-Johnson, 7/15/2008
%
function INDICES=set_indices(CONDITION)
    
    if CONDITION == 'set_1',
        INDICES=[0:161]; 
        
    elseif CONDITION == 'set_2,
        INDICES = [...
            9, 2, 6, 5, 3, 4, 8, 1, 7, 0, 10, 11, 27, 29, 30, 16, ...
            37, 33, 28, 17, 32, 36, 14, 26, 19, 21, 22, 31, 13, 24, ...
            35, 12, 20, 23, 15, 18, 34, 25, 38, 39, 52, 47, 55, 50, ...
            40, 48, 53, 44, 41, 45, 43, 46, 58, 57, 51, 56, 54, 42, ...
            49, 59, 60, 103, 129, 99, 136, 156, 142, 63, 127, 138, ...
            97, 131, 98, 65, 123, 81, 134, 155, 88, 90, 83, 87, 160, ...
            61, 151, 128, 114, 66, 107, 93, 135, 77, 112, 94, 74, ...
            118, 100, 119, 111, 117, 110, 71, 147, 78, 137, 126, ...
            101, 108, 143, 150, 149, 130, 92, 158, 62, 146, 79, 140, ...
            80, 105, 82, 67, 68, 157, 125, 115, 159, 124, 72, 145, ...
            109, 148, 154, 113, 64, 91, 86, 75, 96, 69, 153, 133, ...
            106, 102, 76, 104, 122, 95, 84, 141, 70, 132, 152, 144, ...
            139, 73, 85, 89, 121, 120, 116, 161 ];
                   
    elseif CONDITION=='set_3',
        INDICES = [ 0, 8, 3, 2, 6, 1, 7, 5, 4, 9, 10, 11, 12, 13, ...
                    23, 22, 33, 36, 24, 21, 27, 28, 34, 25, 19, 37, ...
                    15, 16, 26, 30, 18, 32, 14, 31, 29, 17, 35, 20, ...
                    38, 39, 45, 58, 52, 46, 55, 41, 42, 51, 57, 40, ...
                    54, 43, 49, 50, 53, 44, 48, 56, 47, 59, 60, 79, ...
                    106, 83, 131, 158, 62, 65, 61, 141, 157, 159, ...
                    150, 98, 149, 94, 95, 147, 105, 142, 146, 78, ...
                    151, 87, 113, 88, 138, 153, 144, 126, 125, 114, ...
                    133, 101, 66, 134, 121, 128, 160, 154, 104, 80, ...
                    139, 69, 145, 148, 89, 135, 120, 72, 90, 116, ...
                    77, 107, 76, 96, 81, 118, 119, 67, 109, 74, 112, ...
                    124, 123, 122, 75, 85, 71, 70, 91, 64, 84, 99, ...
                    137, 132, 115, 86, 111, 129, 103, 130, 152, 82, ...
                    97, 136, 92, 63, 110, 68, 73, 140, 93, 143, 127, ...
                    100, 117, 156, 155, 102, 108, 161 ];
        
    elseif CONDITION=='set_4',
        INDICES = [9, 8, 5, 6, 0, 4, 3, 2, 1, 7, 10, 11, 26, 32, 36, ...
                   27, 15, 35, 17, 33, 12, 28, 23, 13, 19, 18, 31, ...
                   37, 24, 14, 34, 29, 16, 20, 25, 22, 30, 21, 38, ...
                   39, 53, 55, 52, 49, 40, 57, 56, 48, 46, 58, 42, ...
                   44, 54, 41, 45, 51, 47, 43, 50, 59, 60, 149, 140, ...
                   95, 129, 150, 133, 151, 121, 109, 73, 103, 153, ...
                   61, 62, 87, 75, 106, 100, 102, 92, 117, 110, 127, ...
                   138, 89, 114, 65, 120, 98, 160, 159, 93, 115, ...
                   107, 122, 148, 128, 76, 68, 74, 113, 154, 84, ...
                   158, 79, 91, 136, 77, 130, 112, 66, 135, 132, 78, ...
                   156, 80, 86, 137, 152, 104, 145, 146, 144, 116, ...
                   90, 82, 139, 119, 69, 155, 124, 99, 111, 67, 157, ...
                   108, 147, 94, 141, 85, 118, 123, 88, 71, 131, ...
                   134, 143, 70, 81, 125, 105, 97, 126, 64, 72, 63, ...
                   142, 96, 101, 83, 161 ];
        
    elseif CONDITION=='set_5',
        INDICES = [6, 3, 8, 4, 0, 5, 9, 1, 7, 2, 10, 11, 22, 15, 31, ...
                   23, 12, 34, 18, 17, 19, 24, 30, 27, 14, 33, 29, ...
                   26, 36, 21, 16, 13, 37, 25, 35, 32, 20, 28, 38, ...
                   39, 42, 57, 53, 41, 50, 58, 49, 55, 51, 40, 52, ...
                   56, 46, 44, 47, 48, 54, 43, 45, 59, 60, 76, 87, ...
                   144, 70, 121, 132, 84, 154, 151, 102, 64, 67, ...
                   156, 61, 110, 96, 113, 109, 150, 112, 131, 118, ...
                   106, 92, 130, 99, 83, 75, 94, 137, 79, 153, 114, ...
                   65, 72, 138, 145, 158, 155, 157, 125, 91, 90, 85, ...
                   71, 93, 107, 98, 128, 105, 63, 80, 116, 149, 135, ...
                   78, 103, 160, 122, 123, 127, 89, 68, 73, 108, 81, ...
                   129, 69, 62, 136, 117, 100, 115, 77, 146, 119, ...
                   148, 126, 95, 120, 133, 139, 66, 74, 142, 111, ...
                   88, 134, 124, 140, 101, 147, 104, 141, 97, 143, ...
                   86, 152, 82, 159, 161];
        
    elseif CONDITION=='set_6',
        INDICES = [3, 8, 5, 0, 9, 1, 2, 6, 4, 7, 10, 11, 28, 12, 19, ...
                   20, 37, 13, 33, 32, 29, 14, 34, 36, 16, 30, 23, ...
                   35, 26, 18, 27, 25, 15, 24, 21, 31, 17, 22, 38, ...
                   39, 51, 47, 53, 58, 56, 46, 44, 49, 45, 40, 50, ...
                   52, 57, 41, 42, 55, 48, 43, 54, 59, 60, 61, 111, ...
                   122, 69, 72, 147, 119, 153, 64, 84, 159, 114, ...
                   160, 154, 134, 107, 150, 121, 116, 79, 80, 103, ...
                   97, 74, 112, 109, 93, 82, 129, 94, 105, 85, 156, ...
                   143, 63, 78, 83, 142, 128, 138, 133, 152, 70, ...
                   106, 157, 113, 132, 66, 120, 96, 146, 144, 136, ...
                   88, 131, 91, 117, 89, 81, 95, 140, 100, 73, 155, ...
                   87, 115, 127, 125, 110, 71, 151, 99, 101, 76, 75, ...
                   65, 149, 135, 90, 124, 148, 68, 126, 158, 118, ...
                   139, 77, 123, 104, 145, 98, 67, 86, 108, 62, 130, ...
                   92, 137, 102, 141, 161];
        
    elseif CONDITION=='set_7',
        INDICES = [7, 3, 2, 0, 1, 4, 5, 9, 8, 6, 10, 11, 21, 31, 13, ...
                   28, 25, 26, 18, 22, 20, 16, 34, 15, 27, 32, 29, ...
                   14, 24, 33, 36, 17, 23, 37, 12, 19, 35, 30, 38, ...
                   39, 47, 51, 57, 44, 55, 48, 40, 46, 58, 53, 54, ...
                   50, 49, 41, 43, 42, 45, 52, 56, 59, 60, 123, 75, ...
                   125, 67, 112, 114, 82, 143, 116, 134, 160, 120, ...
                   108, 139, 127, 159, 148, 121, 126, 154, 83, 98, ...
                   101, 117, 96, 109, 156, 155, 68, 81, 106, 113, ...
                   88, 63, 135, 118, 90, 102, 119, 104, 87, 111, ...
                   133, 128, 152, 89, 124, 92, 145, 72, 78, 115, ...
                   132, 150, 69, 144, 136, 73, 66, 95, 147, 105, ...
                   151, 79, 140, 86, 131, 94, 149, 64, 153, 157, ...
                   107, 122, 129, 85, 93, 130, 110, 80, 137, 103, ...
                   158, 141, 74, 100, 97, 71, 70, 77, 65, 61, 142, ...
                   76, 91, 99, 146, 62, 84, 138, 161];
        
    elseif CONDITION=='set_8',
        INDICES = [7, 8, 4, 9, 5, 0, 2, 1, 6, 3, 10, 11, 32, 29, 14, ...
                   34, 37, 19, 18, 20, 21, 26, 17, 22, 25, 27, 36, ...
                   35, 24, 23, 31, 12, 28, 16, 33, 30, 15, 13, 38, ...
                   39, 49, 54, 56, 48, 53, 41, 46, 50, 45, 52, 58, ...
                   55, 57, 40, 44, 47, 51, 42, 43, 59, 60, 78, 139, ...
                   61, 119, 137, 90, 155, 70, 159, 85, 109, 89, 91, ...
                   108, 148, 77, 130, 116, 151, 135, 152, 160, 79, ...
                   112, 82, 147, 111, 127, 154, 87, 74, 157, 72, 64, ...
                   144, 88, 98, 136, 133, 94, 96, 129, 124, 62, 99, ...
                   113, 140, 95, 143, 67, 92, 118, 76, 69, 114, 138, ...
                   73, 125, 103, 105, 141, 123, 80, 106, 122, 75, ...
                   120, 110, 84, 115, 100, 149, 102, 145, 128, 83, ...
                   97, 150, 142, 68, 63, 146, 132, 126, 158, 71, ...
                   107, 156, 153, 66, 104, 134, 101, 131, 81, 93, ...
                   117, 86, 65, 121, 161];
        
    elseif CONDITION=='set_9',
        INDICES = [4, 1, 2, 6, 9, 0, 8, 7, 3, 5, 10, 11, 25, 24, 28, ...
                   27, 22, 31, 13, 37, 19, 32, 20, 23, 33, 12, 16, ...
                   36, 34, 15, 17, 21, 29, 30, 35, 26, 18, 14, 38, ...
                   39, 52, 43, 40, 50, 44, 45, 46, 47, 54, 58, 41, ...
                   51, 56, 48, 55, 49, 57, 42, 53, 59, 60, 149, 113, ...
                   80, 93, 94, 62, 127, 115, 154, 153, 68, 75, 119, ...
                   74, 145, 88, 146, 133, 155, 82, 122, 65, 151, 71, ...
                   66, 108, 156, 99, 131, 138, 89, 148, 110, 137, ...
                   106, 102, 79, 121, 123, 76, 118, 126, 70, 150, ...
                   141, 92, 72, 143, 120, 116, 140, 83, 107, 132, ...
                   86, 81, 129, 90, 101, 134, 135, 69, 64, 95, 67, ...
                   91, 104, 61, 98, 112, 158, 73, 109, 159, 117, ...
                   125, 96, 114, 139, 111, 97, 103, 130, 147, 152, ...
                   87, 124, 100, 77, 78, 144, 63, 160, 157, 105, 84, ...
                   128, 142, 136, 85, 161];
        
    elseif CONDITION=='set_10',
        INDICES = [1, 9, 7, 2, 6, 4, 8, 0, 5, 3, 10, 11, 35, 37, 33, ...
                   19, 27, 29, 20, 13, 14, 34, 30, 36, 24, 26, 21, ...
                   25, 18, 32, 16, 22, 23, 17, 28, 12, 15, 31, 38, ...
                   39, 55, 42, 48, 58, 52, 51, 49, 50, 57, 54, 53, ...
                   44, 56, 40, 41, 45, 43, 47, 46, 59, 60, 92, 74, ...
                   119, 154, 63, 107, 118, 113, 80, 147, 150, 66, ...
                   114, 138, 146, 86, 75, 151, 69, 152, 116, 130, ...
                   78, 67, 62, 156, 122, 131, 79, 132, 135, 103, 94, ...
                   128, 157, 87, 72, 71, 137, 140, 136, 88, 141, ...
                   124, 121, 155, 64, 123, 108, 73, 77, 100, 68, ...
                   105, 139, 93, 85, 133, 84, 83, 158, 143, 149, 89, ...
                   76, 91, 117, 126, 110, 148, 153, 109, 129, 160, ...
                   127, 81, 82, 90, 97, 61, 145, 112, 95, 106, 104, ...
                   99, 120, 98, 144, 70, 96, 65, 125, 134, 101, 142, ...
                   159, 111, 102, 115, 161];
        
    else
        sprintf( 'set_indices.m: condition %s not known',CONDITION)
        exit;
    end
    return(INDICES);
    
        