kerneltest/e32utils/nistsecurerng/include/matrix.h
author hgs
Wed, 20 Oct 2010 13:58:28 +0100
changeset 293 0659d0e1a03c
parent 291 206a6eaaeb71
permissions -rw-r--r--
201041_07
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
291
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
     1
/*
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
     2
* Portions Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
     3
* All rights reserved.
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
     8
*
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
     9
* Initial Contributors:
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    11
*
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    12
* Contributors:
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    13
*
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    14
* Description: 
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    15
* The original NIST Statistical Test Suite code is placed in public domain.
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    16
* (http://csrc.nist.gov/groups/ST/toolkit/rng/documentation_software.html) 
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    17
* 
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    18
* This software was developed at the National Institute of Standards and Technology by 
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    19
* employees of the Federal Government in the course of their official duties. Pursuant
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    20
* to title 17 Section 105 of the United States Code this software is not subject to 
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    21
* copyright protection and is in the public domain. The NIST Statistical Test Suite is
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    22
* an experimental system. NIST assumes no responsibility whatsoever for its use by other 
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    23
* parties, and makes no guarantees, expressed or implied, about its quality, reliability, 
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    24
* or any other characteristic. We would appreciate acknowledgment if the software is used.
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    25
*/
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    26
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    27
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    28
       R A N K  A L G O R I T H M  F U N C T I O N  P R O T O T Y P E S 
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    29
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    30
#ifndef _MATRIX_H_
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    31
#define _MATRIX_H_
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    32
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    33
int				computeRank(int M, int Q, BitSequence **matrix);
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    34
void			perform_elementary_row_operations(int flag, int i, int M, int Q, BitSequence **A);
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    35
int				find_unit_element_and_swap(int flag, int i, int M, int Q, BitSequence **A);
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    36
int				swap_rows(int i, int index, int Q, BitSequence **A);
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    37
int				determine_rank(int m, int M, int Q, BitSequence **A);
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    38
BitSequence**	create_matrix(int M, int Q);
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    39
void			display_matrix(int M, int Q, BitSequence **m);
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    40
void			def_matrix(int M, int Q, BitSequence **m,int k);
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    41
void			delete_matrix(int M, BitSequence **matrix);
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    42
206a6eaaeb71 201041_05
hgs
parents:
diff changeset
    43
#endif // _MATRIX_H_