summaryrefslogtreecommitdiff
path: root/modules/elementary_functions/includes/idmax.h
blob: 5e0a493c400ac5bd02327070943539c5148ea37b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2007 - INRIA - Allan CORNET
 *
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
 *
 */
/*--------------------------------------------------------------------------*/
#ifndef __IDMAX_H__
#define __IDMAX_H__

#include "machine.h" /* C2F */
#include "dynlib_elementary_functions.h"

/**
* finds the index of the first element having maximum value
 * this function return 1 if x has only nan components : may be this is not a good behavior
 * this function doesn't test if n<1 or incx<1 : this is done
 *          by the scilab interface
 * @param n size of x
 * @param x vector
 * @param incr indice
 * @return 0
*/
ELEMENTARY_FUNCTIONS_IMPEXP int C2F(idmax)(int *n, double *x, int *incx);

#endif /* __IDMAX_H__ */
/*--------------------------------------------------------------------------*/